-
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
Problems forking a program with open zmq sockets #3223
Comments
Some things were fixed related to fork flags, check the latest release |
I'll try latest release. Thank you. |
I tested with latest release I see in github - 4.2.5 And it's still reproducible
I also tried modifying zmq to not abort on this cases and I haven't found issues so far. |
Can you provide a a working example to reproduce the issue? |
I'll try to extract something simple that reproduces the issue. |
I'm trying to provide a simple example that shows the issue but I'm not able to reproduce it even with the same versions than I'm using in the real case. |
@jcaden any chance in coming up with a test case? |
I have a program that is quite similar to the real case, but I can't reproduce the problem with it. This week I couldn't work on that but I'll try to get some time next week. |
I can't reproduce with a simple test. I think I can come back later to this ticket (or a new one if you prefer) if I manage to create a test program to reproduce the issue. Thank you for your time. |
I'm getting the same issue (src/epoll.cpp:119) |
This issue has been automatically marked as stale because it has not had activity for 365 days. It will be closed if no further activity occurs within 56 days. Thank you for your contributions. |
I am hitting this issue in my environment that uses libzmq 4.2.5 and here is the BT: Program terminated with signal 6, Aborted. Thread 1 (Thread 0x7f89a0a14700 (LWP 15)): |
same here. Thread 1 (Thread 0x7fc810fd4700 (LWP 30725)): errno is 2 and errmsg is "no such file". |
After hours of debugging, I found that the reason is that this pe->fd was (wrongfully) closed by user code. |
Issue description
I have a program that creates a DEALER socket using c API and connects to a remote host. At some point, when a particular message is received, the process forks and the child tries to correctly close previous zmq socket and open a new one, creating a new context to handle this new connection.
The program just has one active thread (appart from zmq ones) and the fork is done from that thread. I know that zmq threads are not cloned to the child process only the forker thread is. That's the reason I'm creating a new context, to restart zmq threads on child process.
The code works most of the time. But from time to time I get an abort in the child process in a zmq thread. This is the stacktrace:
Sometimes the error is different while running the same code.
Environment
The text was updated successfully, but these errors were encountered: