-
Notifications
You must be signed in to change notification settings - Fork 207
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
crash: free(): invalid pointer #414
Comments
I can reproduce this (and no k8s required) on a M1 MBP.
Using either of these starting images: image
image
@hazcod observed a fault when importing
But importing
Importing either by itself doesn't crash. Further, importing them in the other order doesn't crash. I do not understand why.
|
Opened up https://bugs.python.org/issue44161 |
This sounds like an external issue in one of the dependencies. It's the first time I'm seeing this, thanks for the report! @lidizheng Is this issue familiar? Can you reproduce it as reported? @hazcod Can you please also share the versions of the |
Crashing depending on the import order of CC @gnossen who found the ABI incompatibility in the first place. EDIT: can not reproduce with macOS |
Actually, this issue should be fixed, regardless of protobuf version. @alanjcastonguay Some questions for you:
If upgrading doesn't fix the issue for you, please help me generate a symbolized core dump. Install |
I just noticed that this is in Docker on Mac M1, not x86 Mac OS, which the fix was for. Can you confirm which artifacts you're downloading? Is it |
Starting from
So installing
The simple-case reproduction from above:
The questions posed:
Questions not posed:
|
CC @jtattermusch who built both the aarch64 |
Using only grpcio-1.39.0 + grpcio_tools-1.39.0 + proto_plus-1.18.1 (+ six-1.16.0 + protobuf-3.17.0, which are pulled in as dependencies).
Attached: py39-googleapis-python-pubsub-issue-414.core.gz decompressing to give
|
Either my
|
I can install gdb inside that same container and grab a backtrace, though I've no idea how to get the inner python bits or what you might be looking for.
|
Yeah, I need to figure out what's wrong with my gdb setup to effectively debug this, but what you just posted is super helpful on it's own. This line in particular is telling:
It looks like the problem has to do with static variable initialization/destruction. @jtattermusch is probably better equipped to reproduce/debug at this point. |
@gnossen Thanks for jumping in and the research so far! Should we transfer this issue to grpcio, as it's not directly related to PubSub, the latter just uses OTOH it would still be good to keep it here for visibility, and if you guys don't mind tracking it here, I'm also fine with it. |
Thank you all for co-debugging! I've opened up grpc/grpc#26279 to the best of my knowledge. |
Curiously, is there a workaround for now to use
|
One workaround appears to be: import in this order: import grpc
import proto.message
from google.cloud import pubsub_v1 |
The issue has now been fixed in grpc/grpc#26279. |
@jtattermusch This sounds great, thanks! |
This has been fixed and release in |
Very odd, but I have a Docker container on Apple Silicon (M1) which crashes when I import
google.cloud
.It works when I remove the import line.
Environment details
python:3.9.5-slim-buster
on Dockergoogle-cloud-pubsub
version: 2.8.6Steps to reproduce
from google.cloud import pubsub_v1
Code example
Stack trace
strace excerpt
The text was updated successfully, but these errors were encountered: