Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Assertion failed: (src/mailbox.cpp:99) #3313
I'm from a project called pmacct ( https://github.com/pmacct/pmacct ) which can optionally make use of ZeroMQ for passing messages internally. I got three reports in the last three weeks of users compiling pmacct against ZeroMQ 4.2.5 and getting a failed assertion message back:
shell> nfacctd -f ./nfacctd.detailed.conf
Only an hint: one of the users made some testing and apparently all works well with up to gcc6. But compiling with gcc7 or gcc8 shows the above issue.
Minimal test code / Steps to reproduce the issue
What's the actual result? (include assertion message & call stack if applicable)
gdb /usr/local/sbin/nfacctd core
Yes and no. zmq_socket() is called in one thread, followed-up by a call zmq_threadstart() passing the socket as argument; then only that specific thread uses the created socket. Effectively the issue happens on trying to read for the first time from the socket in the thread. I will correct the issue, test all and report back. Thanks, Paolo
Hi @bluca ,
Unfortunately the change did not help. Just FYI this is the patch i made ( pmacct/pmacct@b1b61ce ) but it still bails out on the same call as before, that is, the first use of the socket inside p_zmq_zap_handler().
Is it possible it does not like that the socket is part of a structure passed as argument of zmq_threadstart() - even if never used/initialised/touched outside the thread itself?