tango 9.1.0 crash with zeromq 4.1.2 or zeromq 4.1.3

Building Tango 9.1.0 with zeromq 4.1.2 or 4.1.3 produces this crash during connection setup in a multi threaded client.
The same code runs fine if tango is compiled against zmq 4.0.x.
Both tests have been performed rebuilding tango, client libraries and client executable completely, using the two zmq library versions in turn.

Giacomo Strangolino.

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `./bin/simplereader test/device/1/double_scalar'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f77fbe8d4cd in ?? () from /usr/lib64/libzmq.so.5
[Current thread is 1 (Thread 0x7f77f1491f00 (LWP 22906))]
(gdb) bt
#0 0x00007f77fbe8d4cd in ?? () from /usr/lib64/libzmq.so.5
#1 0x00007f77fe3f8489 in zmq::message_t::~message_t (this=<optimized out>, __in_chrg=<optimized out>) at ./zmq.hpp:100
#2 0x00007f77fe3eea79 in Tango::DelayEvent::DelayEvent (this=0x7f77f14901a0, ec=<optimized out>) at zmqeventconsumer.cpp:3699
#3 0x00007f77fe3d52e6 in Tango::EventConsumer::subscribe_event (this=0x7f77e0005710, device=device@entry=0x698fb0,
attribute="double_scalar", event=event@entry=Tango::CHANGE_EVENT, callback=callback@entry=0x7f77e0003660,
ev_queue=ev_queue@entry=0x0, filters=std::vector of length 0, capacity 0, stateless=stateless@entry=false) at event.cpp:1239
#4 0x00007f77fe3d58b5 in Tango::EventConsumer::subscribe_event (this=<optimized out>, device=device@entry=0x698fb0,
attribute="double_scalar", event=event@entry=Tango::CHANGE_EVENT, callback=callback@entry=0x7f77e0003660,
filters=std::vector of length 0, capacity 0, stateless=stateless@entry=false) at event.cpp:1123
#5 0x00007f77fe301aa6 in Tango::DeviceProxy::subscribe_event (this=0x698fb0, attr_name="double_scalar",
event=Tango::CHANGE_EVENT, callback=0x7f77e0003660, filters=std::vector of length 0, capacity 0, stateless=<optimized out>)
at devapi_base.cpp:7636
#6 0x00007f77fb4f084e in TAction::completeConfiguration (this=0x7f77e0003650) at src/taction.cpp:238
#7 0x00007f77fb4effc6 in TAction::startConfiguration (this=0x7f77e0003650) at src/taction.cpp:186
#8 0x00007f77fb4eecc6 in TAction::TAction (this=0x7f77e0003650, s=…, dev=0x698fb0, dt=ATTRIBUTE, pt=…, args=…,
attrProp=…, attrPropDbTimeoutMillis=-1, m=AUTO_REFRESH, p=400) at src/taction.cpp:49
#9 0x00007f77fb51e231 in ActionFactory::create (this=0x68af60, device=0x698fb0, ev=0x690240) at src/action_factory.cpp:241
#10 0x00007f77fb4ed27c in DeviceThread::process (this=0x6965b0) at src/devicethread.cpp:158
#11 0x00007f77fb5613ce in DeviceThread::qt_static_metacall (_o=0x6965b0, _c=QMetaObject::InvokeMetaMethod, _id=4,
_a=0x7f77f1490ef0) at moc/moc_devicethread.cpp:98
#12 0x00007f77fa40aa91 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib64/libQt5Core.so.5
#13 0x00007f77fa47bd31 in ?? () from /usr/lib64/libQt5Core.so.5
#14 0x00007f77fa40bbde in QObject::event(QEvent*) () from /usr/lib64/libQt5Core.so.5
#15 0x00007f77fac1186c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#16 0x00007f77fac16690 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#17 0x00007f77fa3e455d in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
#18 0x00007f77fa3e6b67 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) ()
from /usr/lib64/libQt5Core.so.5
#19 0x00007f77fa42e983 in ?? () from /usr/lib64/libQt5Core.so.5
#20 0x00007f77f7030d64 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#21 0x00007f77f7030fb8 in ?? () from /usr/lib64/libglib-2.0.so.0
#22 0x00007f77f703105c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#23 0x00007f77fa42e64b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
from /usr/lib64/libQt5Core.so.5
#24 0x00007f77fa3e319b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#25 0x00007f77fa2407ca in QThread::exec() () from /usr/lib64/libQt5Core.so.5
#26 0x00007f77fb4ecfcd in DeviceThread::run (this=0x6965b0) at src/devicethread.cpp:90
#27 0x00007f77fa244ed3 in ?? () from /usr/lib64/libQt5Core.so.5
#28 0x00007f77f9d025c4 in start_thread () from /lib64/libpthread.so.0
#29 0x00007f77f922db8d in clone () from /lib64/libc.so.6
Hi Giacomo,

As it is written in the README file, Tango 9 has been tested and developed with ZMQ 4.0.5.
ZMQ is frequently updated and we don't always follow them!
Nevertheless, thank's for the info. We will look into this ASAP

Manu
Hi Giacomo,

I have run the event test suite using zmq 4.1.3 and I don't have problem. On top of that, I have used a small test clients
to have a really multi-threaded software as you mention in your post. I have attached this small client to this post.
I have started it with 10 devices and 100 threads (using zmq 4.1.3). No problem reported.
At a glance, this small client start thread(s). Each thread subscribe to event, wait some time and then
unsubscribe from the event.
Could you have a look at this small client and tell me if it is similar to what you are doing?
If not, please tell me what you are doing in order to reproduce the problem here

Cheers and have a nice week-end

Manu
 
Register or login to create to post a reply.