Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Task exception was never retrieved (BadSession: Session not found) #569

Open
vladkolotvin opened this issue Mar 4, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@vladkolotvin
Copy link

Bug Report

YDB Python SDK version:

3.18.17

Environment

python 3.12.16
linux
x86_64

Current behavior:

Task exception was never retrieved
future: <Task finished name='Task-25851' coro=<SessionPool._send_keep_alive() done, defined at /usr/local/lib/python3.12/site-packages/ydb/aio/table.py:682> exception=BadSession('message: "Session not found." severity: 1 (server_code: 400100)')>
Traceback (most recent call last):
  File \"/usr/local/lib/python3.12/site-packages/ydb/aio/table.py\", line 688, in _send_keep_alive
    await session.keep_alive(self._req_settings)
  File \"/usr/local/lib/python3.12/site-packages/ydb/aio/table.py\", line 61, in keep_alive
    return await super().keep_alive(settings)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/local/lib/python3.12/site-packages/ydb/aio/pool.py\", line 254, in __call__
    return await connection(
           ^^^^^^^^^^^^^^^^^
  File \"/usr/local/lib/python3.12/site-packages/ydb/aio/connection.py\", line 195, in __call__
    return response if wrap_result is None else wrap_result(rpc_state, response, *wrap_args)
                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/local/lib/python3.12/site-packages/ydb/_session_impl.py\", line 20, in decorator
    return func(rpc_state, response_pb, session_state, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/local/lib/python3.12/site-packages/ydb/_session_impl.py\", line 237, in wrap_keep_alive_response
    issues._process_response(response_pb.operation)
  File \"/usr/local/lib/python3.12/site-packages/ydb/issues.py\", line 226, in _process_response
    raise exc_obj(_format_response(response_proto), response_proto.issues)
    ydb.issues.BadSession: message: \"Session not found.\" severity: 1 (server_code: 400100)

Expected behavior:

Task exception is retrieved

Steps to reproduce:

This is some floating bug

@vladkolotvin vladkolotvin added the bug Something isn't working label Mar 4, 2025
@vgvoleg
Copy link
Collaborator

vgvoleg commented Mar 5, 2025

Hi! Can you add more details? BasSession is fine to appear time to time, when server reconnect happens. Can you tell about client side behavior and server side behavior during this error?

@vladkolotvin
Copy link
Author

It's not fine, when task result is not retrieved. It follows that the library may not handle this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants