Potential deadlock when updating attribute configuration?
Hi,
We observed the crash of a device server which occurred immediately after a user changed an attribute configuration (display format in this case from a valid value to another valid value).
It looks like there is a risk of deadlock in this case which would raise an unexpected exception (API_CommandTimedOut, "Not able to acquire serialization (dev, class or proces s) monitor", from TangoMonitor::get_monitor).
Here is the generated core file backtrace (I replaced the # with F letter to avoid github to mess up with the issues):
(gdb) bt
F0 0x00007fc833965165 in *__GI_raise (sig=<optimized out>)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
F1 0x00007fc8339683e0 in *__GI_abort () at abort.c:92
F2 0x00007fc8341bb89d in __gnu_cxx::__verbose_terminate_handler() ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
F3 0x00007fc8341b9996 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
F4 0x00007fc8341b99c3 in std::terminate() ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
F5 0x00007fc8341b9bee in __cxa_throw ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
F6 0x0000000000415689 in Tango::Except::throw_exception (
reason=0x7fc8361a14ff "API_CommandTimedOut",
desc=0x7fc8361a23b0 "Not able to acquire serialization (dev, class or proces
s) monitor", origin=0x7fc8361a1717 "TangoMonitor::get_monitor",
sever=Tango::ERR) at /segfs/tango/release/debian7/include/except.h:135
F7 0x00007fc835e9b57b in Tango::TangoMonitor::get_monitor() ()
from /opt/dserver/lib/libtango.so.91
F8 0x00007fc836042d5c in Tango::EventSupplier::detect_and_push_periodic_event(T
ango::DeviceImpl*, Tango::EventSupplier::SuppliedEventData&, Tango::Attribute&,
std::string&, Tango::DevFailed*, timeval*) ()
from /opt/dserver/lib/libtango.so.91
F9 0x00007fc83604632b in Tango::EventSupplier::detect_and_push_events(Tango::De
viceImpl*, Tango::EventSupplier::SuppliedEventData&, Tango::DevFailed*, std::str
ing&, timeval*) () from /opt/dserver/lib/libtango.so.91
F10 0x00007fc83602a851 in Tango::PollThread::poll_attr(Tango::WorkItem&) ()
from /opt/dserver/lib/libtango.so.91
F11 0x00007fc83602c0f2 in Tango::PollThread::one_more_poll() ()
from /opt/dserver/lib/libtango.so.91
F12 0x00007fc83602d9e3 in Tango::PollThread::run_undetached(void*) ()
from /opt/dserver/lib/libtango.so.91
F13 0x00007fc834b3898e in omni_thread_wrapper ()
from /opt/dserver/lib/libomnithread.so.4
F14 0x00007fc834463b50 in start_thread (arg=<optimized out>)
at pthread_create.c:304
F15 0x00007fc833a0e95d in clone ()
at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
F16 0x0000000000000000 in ?? ()
Edited by Thomas Braun