-
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
ZMQ crash problem on ubuntu #3346
Comments
Are sockets being used from multiple threads? |
|
But I've locked each socket |
As the docs say, sockets are not thread safe. Locks on the application side are not enough. Each socket must be created, used and closed from a single thread. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue description
Here is the error message debugged from the coredump file:
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `./verifier'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007ff5d4005cf0 in ?? ()
[Current thread is 1 (Thread 0x7ff5e8000700 (LWP 15101))]
(gdb) bt
#0 0x00007ff5d4005cf0 in ?? ()
#1 0x000000000093aa47 in zmq::pipe_t::check_read (this=0x7ff5d4005cc0) at src/pipe.cpp:166
#2 0x0000000000957b90 in zmq::fq_t::has_in (this=0x7ff5d4005120) at src/fq.cpp:139
#3 0x00000000009403f5 in zmq::socket_base_t::has_in (this=0x7ff5d4004b60) at src/socket_base.cpp:1274
#4 zmq::socket_base_t::getsockopt (this=0x7ff5d4004b60, option_=option_@entry=15, optval_=optval_@entry=0x7ff5e7fff6d4,
optvallen_=optvallen_@entry=0x7ff5e7fff6d8) at src/socket_base.cpp:458
#5 0x00000000009240ba in zmq_getsockopt (s_=, option_=option_@entry=15,
optval_=optval_@entry=0x7ff5e7fff6d4, optvallen_=optvallen_@entry=0x7ff5e7fff6d8) at src/zmq.cpp:267
#6 0x000000000092500d in zmq_poll (items_=0x7ff5e7fff820, nitems_=1, timeout_=10) at src/zmq.cpp:943
#7 0x000000000061f42e in ZmqWorker::run (this=0x2363e60) at /home/wsg/detector_sdk/src/zmqServer/ZmqServer.cpp:26
#8 0x000000000063b687 in std::_Mem_fn_base<void (ZmqWorker::)(), true>::operator()<, void>(ZmqWorker) const (
this=0x2363f20, __object=0x2363e60) at /usr/include/c++/5/functional:600
#9 0x000000000063b5b3 in std::_Bind_simple<std::_Mem_fn<void (ZmqWorker::)()> (ZmqWorker)>::_M_invoke<0ul>(std::_Index_tuple<0ul>) (this=0x2363f18) at /usr/include/c++/5/functional:1531
#10 0x000000000063b35d in std::_Bind_simple<std::_Mem_fn<void (ZmqWorker::)()> (ZmqWorker)>::operator()() (this=0x2363f18)
at /usr/include/c++/5/functional:1520
#11 0x000000000063b0cc in std::thread::_Impl<std::_Bind_simple<std::_Mem_fn<void (ZmqWorker::)()> (ZmqWorker)> >::_M_run()
(this=0x2363f00) at /usr/include/c++/5/thread:115
#12 0x00007ff8f7066c80 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#13 0x00007ff8f92da6ba in start_thread (arg=0x7ff5e8000700) at pthread_create.c:333
#14 0x00007ff8f65aa41d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
(gdb)
Environment
ubuntu 16.04
libzmq 4.3.0
Minimal test code / Steps to reproduce the issue
The problem was discovered during a stress test
I'd like to know what factors contributed to the error,thank you !!
The text was updated successfully, but these errors were encountered: