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
Node: Segmentation fault #12608
Comments
Can you share a script that reproduces this? Also, what version of Node are you using? |
Node is v6.11.3 - I'll have a go at making a small repro script tomorrow. |
A better backtrace:
|
This one works for me most of the time (but not always), hence the shell loop. Source of
Source of
Run until it crashes:
|
So, "gir.me.uk:8888" is simply an arbitrary dns name + port that is expected to never exist; is that right? |
It's a port on my website that I know will drop connections, as upposed to reset them which will trigger a different error in the client. |
The state is used both in the callback for the actual connect as well as in the additional timeout that is setup for the operation. Both code paths decrease the reference count and if they happen to be queued at the same time, memory is corrupted. Subsequent behavior is undefined and segfaults can be observed as a result. Fixes grpc#12608
@borisovg hey, would you be able to give my PR a spin and provide feedback whether it fixes your crash? |
@vosst Looks like it does indeed fix it. :) |
The state is used both in the callback for the actual connect as well as in the additional timeout that is setup for the operation. Both code paths decrease the reference count and if they happen to be queued at the same time, memory is corrupted. Subsequent behavior is undefined and segfaults can be observed as a result. Fixes grpc#12608
The state is used both in the callback for the actual connect as well as in the additional timeout that is setup for the operation. Both code paths decrease the reference count and if they happen to be queued at the same time, memory is corrupted. Subsequent behavior is undefined and segfaults can be observed as a result. Fixes grpc#12608
What version of gRPC and what language are you using?
1.6.0 for Node.js
What operating system (Linux, Windows, …) and version?
Debian Sid
What runtime / compiler are you using (e.g. python version or version of gcc)
gcc (Debian 7.2.0-4) 7.2.0
What did you do?
I am connecting to etcd using
grpc.load()
of etcd's proto file. While testing client behaviour when the etcd server is not accessible my app segfaults after several connection errors ("Failed to connect before the deadline" fromgrpc.waitForClientReady()
).Backtrace:
What did you expect to see?
Something other than a segfault.
What did you see instead?
A segfault.
The text was updated successfully, but these errors were encountered: