ydb-platform / ydb-platform/ydb-python-sdk

bug: "Task was destroyed but it is pending"

Open
#764 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
102
Forks
75
Avg merge
1d 23h
Merged PRs (30d)
13

Description

Bug Report

YDB Python SDK version:

3.25.0

Environment

linux amd64, python 3.12.6, grpcio 1.76.0

Current behavior:

We have this message in logs

Task was destroyed but it is pending!
task: <Task pending name='Task-8703' coro=<_StreamRequestMixin._consume_request_iterator() done, defined at /usr/local/lib/python3.12/site-packages/grpc/aio/_call.py:439> wait_for=<Future cancelled>>

Expected behavior:

We don't have this message in logs.

Steps to reproduce:

We don't have exact steps

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the SDK's asynchronous request and shutdown paths around grpc.aio._call.py, especially _StreamRequestMixin._consume_request_iterator(), which appears in the warning. Look for a reproducible cancellation or cleanup sequence, then add a focused regression test. Done means the scenario no longer logs a pending-task warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
grpc, python
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.