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

Datastore: difficult to decipher gRPC stack trace #887

Open
andrewpollock opened this issue Jun 7, 2023 · 0 comments
Open

Datastore: difficult to decipher gRPC stack trace #887

andrewpollock opened this issue Jun 7, 2023 · 0 comments
Labels
api: datastore Issues related to the googleapis/python-ndb API.

Comments

@andrewpollock
Copy link

Hi,

We've seen some sort of failure in OSV.dev's API backend (in Cloud Run), where the instance's ability to make further Datastore queries was permanently impacted (we had to kill and restart it).

Any assistance on how to further troubleshoot what happened here would be appreciated.

Environment details

Steps to reproduce

Unfortunately due to not logging the queries, we're unsure of the exact query that triggered this.

Code example

https://github.com/google/osv.dev/blob/aed410e4badbc073a6910c11c8ca57f9fc49310a/gcp/api/server.py#L316

specifically

https://github.com/google/osv.dev/blob/aed410e4badbc073a6910c11c8ca57f9fc49310a/gcp/api/server.py#L610

or

https://github.com/google/osv.dev/blob/aed410e4badbc073a6910c11c8ca57f9fc49310a/gcp/api/server.py#L663

Stack trace

Exception in thread Thread-11366361 (_run):
Traceback (most recent call last): File "/usr/local/lib/python3.11/threading.py", line 1038, in _bootstrap_inner self.run() File "/usr/local/lib/python3.11/threading.py", line 975, in run self._target(*self._args, **self._kwargs) File "src/python/grpcio/grpc/_cython/_cygrpc/thread.pyx.pxi", line 53, in grpc._cython.cygrpc._run_with_context._run File "/usr/local/lib/python3.11/site-packages/grpc/_channel.py", line 1392, in channel_spin
event = state.channel.next_call_event()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi", line 489, in grpc._cython.cygrpc.Channel.next_call_event
File "src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi", line 171, in grpc._cython.cygrpc._next_call_event
File "src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi", line 172, in grpc._cython.cygrpc._next_call_event
File "src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi", line 481, in grpc._cython.cygrpc.Channel.next_call_event.on_success
File "src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi", line 263, in grpc._cython.cygrpc._process_integrated_call_tag
KeyError: <grpc._cython.cygrpc._BatchOperationTag object at 0x3eb06004e6b0>
@product-auto-label product-auto-label bot added the api: datastore Issues related to the googleapis/python-ndb API. label Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: datastore Issues related to the googleapis/python-ndb API.
Projects
None yet
Development

No branches or pull requests

1 participant