-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
2.0.7/2.0.8 crash/hang/assert when calling zmq_close on a blocked socket #53
Comments
If calling zmq_close on a socket owned by another thread is not safe, what is the suggested technique for cleaning up a socket from a finalizer? Languages with garbage collection may reap objects containing sockets. It makes sense that the destructors/finalizers should call zmq_close on those sockets to clean them up. These reaper threads are always different from the thread where a socket was allocated. |
This wil be (is) fixed by socket migration feature in 0MQ/2.1 (see the trunk). |
Fixed formatting on zmq_getsockopt.txt
I finally have a somewhat reproducible case for this problem. Unfortunately it is in Ruby but the code should be easily converted to C by someone who knows it better than I.
Here are the steps behind the crash (sometimes it asserts on object.cpp line 342 [process_pipe_term]).
BTW, calling zmq_term succeeds every time. Internally it is probably calling zmq_close on all associated sockets but it doesn't trigger a crash as far as I can see.
Sometimes it crashes with:
Sample code in Ruby.
The text was updated successfully, but these errors were encountered: