You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am getting an assertion failure when a parent process is doing zmq communication and it spawns a child process doing zmq communication with a different context. When the child process exits, the parent gets an assertion error with this stack:
(gdb) bt
#0 0x0000003574a30265 in raise () from /lib64/libc.so.6
#1 0x0000003574a31d10 in abort () from /lib64/libc.so.6
#2 0x00002aaaaad6d180 in zmq::mailbox_t::recv (this=0x6311c0, cmd_=0x2aaab05763a0,
timeout_=<value optimized out>)
at /build/jenkins/workspace/codebase@0/agent/php/scripts/buildEnv/../../../../thirdparty/lib/zeromq/zeromq/src/mailbox.cpp:79
#3 0x00002aaaaad70f85 in zmq::reaper_t::in_event (this=0x6311a0)
at /build/jenkins/workspace/codebase@0/agent/php/scripts/buildEnv/../../../../thirdparty/lib/zeromq/zeromq/src/reaper.cpp:64
#4 0x00002aaaaad6b54e in zmq::epoll_t::loop (this=0x630e10)
at /build/jenkins/workspace/codebase@0/agent/php/scripts/buildEnv/../../../../thirdparty/lib/zeromq/zeromq/src/epoll.cpp:161
#5 0x00002aaaaad759cc in thread_routine (arg_=0x630e80)
at /build/jenkins/workspace/codebase@0/agent/php/scripts/buildEnv/../../../../thirdparty/lib/zeromq/zeromq/src/thread.cpp:75
#6 0x000000357520683d in start_thread () from /lib64/libpthread.so.0
#7 0x0000003574ad526d in clone () from /lib64/libc.so.6
(gdb)
The corresponding zmq code is this:
55 int zmq::mailbox_t::recv (command_t *cmd_, int timeout_)
- 56 {
| 57 // Try to get the command straight away.
- 58 if (active) {
2 59 bool ok = cpipe.read (cmd_);
2 60 if (ok)
2 61 return 0;
2 62
2 63 // If there are no more commands available, switch into passive state.
2 64 active = false;
2 65 signaler.recv ();
2 66 }
| 67
| 68 // Wait for signal from the command sender.
| 69 int rc = signaler.wait (timeout_);
| 70 if (rc != 0 && (errno == EAGAIN || errno == EINTR))
| 71 return -1;
| 72
| 73 // We've got the signal. Now we can switch into active state.
| 74 active = true;
| 75
| 76 // Get a command.
| 77 errno_assert (rc == 0);
| 78 bool ok = cpipe.read (cmd_);
| 79 zmq_assert (ok);
| 80 return 0;
| 81 }
82
Could the pipe read be getting another EINTR when the child process exits and a SIGCHLD is raised?
The text was updated successfully, but these errors were encountered:
I tried zmq 3.2.4 and the same error repeats. Could it be that the child process has a reference to zmq_context from the parent and when it exits, the parent's context is invalidated and it gets the assert failure?
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 getting an assertion failure when a parent process is doing zmq communication and it spawns a child process doing zmq communication with a different context. When the child process exits, the parent gets an assertion error with this stack:
The corresponding zmq code is this:
Could the pipe read be getting another EINTR when the child process exits and a SIGCHLD is raised?
The text was updated successfully, but these errors were encountered: