Daemon hangs on service restart and stop
Encountered and easily reproducible with development version. When a service restart or stop is issued, SIGTERM times out and SIGKILL is sent instead.
GDB trace of threads after SIGTERM is sent (output from armbian gw):
Thread 1: Main thread, TaskQueue destructor
#0 __libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:46
#1 0xb6e8cbd4 in __GI___pthread_timedjoin_ex (threadid=2962916432, thread_return=0x0, abstime=<optimized out>, block=<optimized out>) at pthread_join_common.c:89
#2 0xb6e08612 in std::thread::join() () from /lib/arm-linux-gnueabihf/libstdc++.so.6
#3 0xb11bc306 in TaskQueue<std::__cxx11::basic_string<unsigned char, std::char_traits<unsigned char>, std::allocator<unsigned char> > >::~TaskQueue (this=0x1e51e68, __in_chrg=<optimized out>)
at /usr/include/c++/8/ext/new_allocator.h:86
#4 TaskQueue<std::__cxx11::basic_string<unsigned char, std::char_traits<unsigned char>, std::allocator<unsigned char> > >::~TaskQueue (this=0x1e51e68, __in_chrg=<optimized out>)
at ../../../src/include/TaskQueue.h:65
#5 iqrf::MqMessaging::deactivate (this=0x1ee1bc0) at ../../../src/MqMessaging/MqMessaging.cpp:97
#6 0x004b32b2 in shape::ComponentInstance::~ComponentInstance (this=0x1e6f508, __in_chrg=<optimized out>) at ../../shape/launcher/Component.h:43
#7 0x004b37bc in shape::ComponentInstance::~ComponentInstance (this=0x1e6f508, __in_chrg=<optimized out>) at ../../shape/launcher/ComponentInstance.cpp:170
#8 0x004b2384 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x216c420) at /usr/include/c++/8/bits/shared_ptr_base.h:148
#9 std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x216c420) at /usr/include/c++/8/bits/shared_ptr_base.h:148
#10 std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count (this=0x20671d4, __in_chrg=<optimized out>) at /usr/include/c++/8/bits/shared_ptr_base.h:728
#11 std::__shared_ptr<shape::ComponentInstance, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr (this=0x20671d0, __in_chrg=<optimized out>) at /usr/include/c++/8/bits/shared_ptr_base.h:1167
#12 std::shared_ptr<shape::ComponentInstance>::~shared_ptr (this=0x20671d0, __in_chrg=<optimized out>) at /usr/include/c++/8/bits/shared_ptr.h:103
#13 std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::shared_ptr<shape::ComponentInstance> >::~pair (this=0x20671b8, __in_chrg=<optimized out>)
at /usr/include/c++/8/bits/stl_pair.h:208
#14 __gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::shared_ptr<shape::ComponentInstance> > > >::destroy<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::shared_ptr<shape::ComponentInstance> > > (this=0x1a70dac, __p=0x20671b8)
at /usr/include/c++/8/ext/new_allocator.h:140
#15 std::allocator_traits<std::allocator<std::_Rb_tree_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::shared_ptr<shape::ComponentInstance> > > > >::destroy<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::shared_ptr<shape::ComponentInstance> > > (__a=..., __p=0x20671b8)
at /usr/include/c++/8/bits/alloc_traits.h:487
#16 std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::shared_ptr<shape::ComponentInstance> >, std::_Select1st<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::shared_ptr<shape::ComponentInstance> > >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::shared_ptr<shape::ComponentInstance> > > >::_M_destroy_node (this=0x1a70dac, __p=0x20671a8) at /usr/include/c++/8/bits/stl_tree.h:661
#17 std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::shared_ptr<shape::ComponentInstance> >, std::_Select1st<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::shared_ptr<shape::ComponentInstance> > >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::shared_ptr<shape::ComponentInstance> > > >::_M_drop_node (this=0x1a70dac, __p=0x20671a8) at /usr/include/c++/8/bits/stl_tree.h:669
#18 std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::shared_ptr<shape::ComponentInstance> >, std::_Select1st<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::shared_ptr<shape::ComponentInstance> > >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::shared_ptr<shape::ComponentInstance> > > >::_M_erase_aux (this=this@entry=0x1a70dac, __position=...) at /usr/include/c++/8/bits/stl_tree.h:2493
#19 0x004a9d54 in std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::shared_ptr<shape::ComponentInstance> >, std::_Select1st<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::shared_ptr<shape::ComponentInstance> > >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::shared_ptr<shape::ComponentInstance> > > >::erase[abi:cxx11](std::_Rb_tree_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::shared_ptr<shape::ComponentInstance> > >) (__position=..., this=0x1a70dac) at /usr/include/c++/8/bits/stl_tree.h:1136
#20 std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::shared_ptr<shape::ComponentInstance>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::shared_ptr<shape::ComponentInstance> > > >::erase[abi:cxx11](std::_Rb_tree_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::shared_ptr<shape::ComponentInstance> > >) (__position=..., this=0x1a70dac)
at /usr/include/c++/8/bits/stl_map.h:1037
#21 shape::Component::removeInstances (this=this@entry=0x1a70d48) at ../../shape/launcher/Component.cpp:263
#22 0x004ac9c4 in shape::Component::stopInstances (this=0x1a70d48) at ../../shape/launcher/Component.cpp:241
#23 0x0048047e in shape::ComponentManager::eraseComponents (this=this@entry=0x4f30d8 <shape::ComponentManager::getInst()::s>) at /usr/include/c++/8/bits/shared_ptr_base.h:1018
#24 0x00481f40 in shape::ComponentManager::run (this=0x4f30d8 <shape::ComponentManager::getInst()::s>) at ../../shape/launcher/ComponentManager.cpp:583
#25 0x00477e3c in main (argc=<optimized out>, argv=<optimized out>) at ../../../src/start-IqrfDaemon/main.cpp:111
Thread 2: WsApi / WsMonitor thread
#0 __libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:47
#1 0xb6c77920 in epoll_wait (epfd=6, events=events@entry=0xb6004470, maxevents=maxevents@entry=128, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
#2 0xb60729d0 in asio::detail::epoll_reactor::run (this=0x1a6d7d0, usec=<optimized out>, ops=...) at ../../shapeware/external/asio/asio/include/asio/detail/impl/epoll_reactor.ipp:470
#3 0xb6075cec in asio::detail::scheduler::do_run_one (ec=..., this_thread=..., lock=..., this=0x1422080) at ../../shapeware/external/asio/asio/include/asio/detail/impl/scheduler.ipp:430
#4 asio::detail::scheduler::run (this=this@entry=0x1422080, ec=...) at ../../shapeware/external/asio/asio/include/asio/detail/impl/scheduler.ipp:199
#5 0xb606df2a in asio::io_context::run (this=<optimized out>) at ../../shapeware/external/asio/asio/include/asio/impl/io_context.ipp:62
#6 websocketpp::transport::asio::endpoint<websocketpp::config::asio::transport_config>::run (this=<optimized out>) at ../../shapeware/external/websocketpp/websocketpp/transport/asio/endpoint.hpp:641
#7 shape::WsServerTyped<websocketpp::server<websocketpp::config::asio> >::run (this=<optimized out>) at ../../shapeware/WebsocketCppService/WsServer.h:141
#8 shape::WsServerPlain::run (this=<optimized out>) at ../../shapeware/WebsocketCppService/WsServerPlain.cpp:46
#9 0xb6068dc2 in shape::WebsocketCppService::Imp::runThd (this=0x17ac1a8) at /usr/include/c++/8/bits/unique_ptr.h:342
#10 0xb6e0849e in ?? () from /lib/arm-linux-gnueabihf/libstdc++.so.6
#11 0xb6e8bbbe in start_thread (arg=0x976755a2) at pthread_create.c:486
#12 0xb6c7762c in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:73 from /lib/arm-linux-gnueabihf/libc.so.6
Thread 3: WsApi / WsMonitor thread
#0 __libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:47
#1 0xb6c77920 in epoll_wait (epfd=10, events=events@entry=0xb56fe470, maxevents=maxevents@entry=128, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
#2 0xb60729d0 in asio::detail::epoll_reactor::run (this=0x1a6d148, usec=<optimized out>, ops=...) at ../../shapeware/external/asio/asio/include/asio/detail/impl/epoll_reactor.ipp:470
#3 0xb6075cec in asio::detail::scheduler::do_run_one (ec=..., this_thread=..., lock=..., this=0x17cd4f8) at ../../shapeware/external/asio/asio/include/asio/detail/impl/scheduler.ipp:430
#4 asio::detail::scheduler::run (this=this@entry=0x17cd4f8, ec=...) at ../../shapeware/external/asio/asio/include/asio/detail/impl/scheduler.ipp:199
#5 0xb606df2a in asio::io_context::run (this=<optimized out>) at ../../shapeware/external/asio/asio/include/asio/impl/io_context.ipp:62
#6 websocketpp::transport::asio::endpoint<websocketpp::config::asio::transport_config>::run (this=<optimized out>) at ../../shapeware/external/websocketpp/websocketpp/transport/asio/endpoint.hpp:641
#7 shape::WsServerTyped<websocketpp::server<websocketpp::config::asio> >::run (this=<optimized out>) at ../../shapeware/WebsocketCppService/WsServer.h:141
#8 shape::WsServerPlain::run (this=<optimized out>) at ../../shapeware/WebsocketCppService/WsServerPlain.cpp:46
#9 0xb6068dc2 in shape::WebsocketCppService::Imp::runThd (this=0x17cd9d0) at /usr/include/c++/8/bits/unique_ptr.h:342
#10 0xb6e0849e in ?? () from /lib/arm-linux-gnueabihf/libstdc++.so.6
#11 0xb6e8bbbe in start_thread (arg=0x976755a2) at pthread_create.c:486
#12 0xb6c7762c in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:73 from /lib/arm-linux-gnueabihf/libc.so.6
Thread 4: Dpa thread, TaskQueue worker sleeping
#0 __libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:46
#1 0xb6e9067e in futex_wait_cancelable (private=0, expected=0, futex_word=0x1a6df30) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#2 __pthread_cond_wait_common (abstime=0x0, mutex=0x1a6deec, cond=0x1a6df08) at pthread_cond_wait.c:502
#3 __pthread_cond_wait (cond=0x1a6df08, mutex=0x1a6deec) at pthread_cond_wait.c:655
#4 0xb6e04934 in std::condition_variable::wait(std::unique_lock<std::mutex>&) () from /lib/arm-linux-gnueabihf/libstdc++.so.6
#5 0xb4ebec72 in std::condition_variable::wait<TaskQueue<std::shared_ptr<DpaTransaction2> >::worker()::{lambda()#1}>(std::unique_lock<std::mutex>&, TaskQueue<std::shared_ptr<DpaTransaction2> >::worker()::{lambda()#1}) (__p=..., __lock=..., this=0x1a6df08) at ../../../../libraries/clibdpa/include/TaskQueue.h:121
#6 TaskQueue<std::shared_ptr<DpaTransaction2> >::worker (this=0x1a6dee8) at ../../../../libraries/clibdpa/include/TaskQueue.h:121
#7 0xb6e0849e in ?? () from /lib/arm-linux-gnueabihf/libstdc++.so.6
#8 0xb6e8bbbe in start_thread (arg=0x976755a2) at pthread_create.c:486
#9 0xb6c7762c in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:73 from /lib/arm-linux-gnueabihf/libc.so.6
Thread 5: Uart thread listening
#0 __libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:46
#1 0xb6e933ec in __libc_read (nbytes=255, buf=0x1a70218, fd=14) at ../sysdeps/unix/sysv/linux/read.c:26
#2 __libc_read (fd=14, buf=0x1a70218, nbytes=nbytes@entry=255) at ../sysdeps/unix/sysv/linux/read.c:24
#3 0xb4eea260 in read (__nbytes=255, __buf=<optimized out>, __fd=<optimized out>) at /usr/include/arm-linux-gnueabihf/bits/unistd.h:44
#4 uart_iqrf_read (readBuffer=0x17cc0c8 "3", dataLen=dataLen@entry=0xb44fdd2b "", timeout=<optimized out>, timeout@entry=100) at ../../../../libraries/clibuart/uart_iqrf/uart_iqrf.c:461
#5 0xb4ee6d04 in iqrf::IqrfUart::Imp::listen (this=0x17cbe10) at ../../../src/IqrfUart/IqrfUart.cpp:472
#6 0xb6e0849e in ?? () from /lib/arm-linux-gnueabihf/libstdc++.so.6
#7 0xb6e8bbbe in start_thread (arg=0x976755a2) at pthread_create.c:486
#8 0xb6c7762c in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:73 from /lib/arm-linux-gnueabihf/libc.so.6
Thread 6: Monitor notifier, waiting until report period passes
#0 __libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:46
#1 0xb6e90956 in futex_abstimed_wait_cancelable (private=0, abstime=0xb38fec84, expected=0, futex_word=0x15f1bf8) at ../sysdeps/unix/sysv/linux/futex-internal.h:205
#2 __pthread_cond_wait_common (abstime=0xb38fec84, mutex=0x15f1bb8, cond=0x15f1bd0) at pthread_cond_wait.c:539
#3 __pthread_cond_timedwait (cond=0x15f1bd0, mutex=0x15f1bb8, abstime=0xb38fec84) at pthread_cond_wait.c:667
#4 0xb3ae6d70 in __gthread_cond_timedwait (__abs_timeout=0xb38fec84, __mutex=0x15f1bb8, __cond=0x15f1bd0) at /usr/include/arm-linux-gnueabihf/c++/8/bits/gthr-default.h:871
#5 std::condition_variable::__wait_until_impl<std::chrono::duration<long long, std::ratio<1ll, 1000000000ll> > > (__atime=..., __lock=<synthetic pointer>..., this=0x15f1bd0)
at /usr/include/c++/8/condition_variable:178
#6 std::condition_variable::wait_until<std::chrono::duration<long long, std::ratio<1ll, 1000000000ll> > > (__atime=..., __lock=<synthetic pointer>..., this=0x15f1bd0)
at /usr/include/c++/8/condition_variable:106
#7 std::condition_variable::wait_for<long long, std::ratio<1ll, 1ll> > (__rtime=..., __lock=<synthetic pointer>..., this=0x15f1bd0) at /usr/include/c++/8/condition_variable:143
#8 iqrf::MonitorService::Imp::worker (this=0x15f1ba0) at ../../../src/MonitorService/MonitorService.cpp:69
#9 0xb6e0849e in ?? () from /lib/arm-linux-gnueabihf/libstdc++.so.6
#10 0xb6e8bbbe in start_thread (arg=0x976755a2) at pthread_create.c:486
#11 0xb6c7762c in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:73 from /lib/arm-linux-gnueabihf/libc.so.6
Thread 7: Scheduler thread, TaskQueue
#0 __libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:46
#1 0xb6e9067e in futex_wait_cancelable (private=0, expected=0, futex_word=0x17daacc) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#2 __pthread_cond_wait_common (abstime=0x0, mutex=0x17daa84, cond=0x17daaa0) at pthread_cond_wait.c:502
#3 __pthread_cond_wait (cond=0x17daaa0, mutex=0x17daa84) at pthread_cond_wait.c:655
#4 0xb6e04934 in std::condition_variable::wait(std::unique_lock<std::mutex>&) () from /lib/arm-linux-gnueabihf/libstdc++.so.6
#5 0xb3a4b8cc in std::condition_variable::wait<TaskQueue<iqrf::ScheduleRecord>::worker()::{lambda()#1}>(std::unique_lock<std::mutex>&, TaskQueue<iqrf::ScheduleRecord>::worker()::{lambda()#1}) (
__p=..., __lock=..., this=0x17daaa0) at ../../../src/include/TaskQueue.h:121
#6 TaskQueue<iqrf::ScheduleRecord>::worker (this=0x17daa80) at ../../../src/include/TaskQueue.h:121
#7 0xb6e0849e in ?? () from /lib/arm-linux-gnueabihf/libstdc++.so.6
#8 0xb6e8bbbe in start_thread (arg=0x976755a2) at pthread_create.c:486
#9 0xb6c7762c in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:73 from /lib/arm-linux-gnueabihf/libc.so.6
Thread 8: Scheduler task timer thread, waiting for the next event
#0 __libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:46
#1 0xb6e90956 in futex_abstimed_wait_cancelable (private=0, abstime=0xb26fdd10, expected=0, futex_word=0x17d9e80) at ../sysdeps/unix/sysv/linux/futex-internal.h:205
#2 __pthread_cond_wait_common (abstime=0xb26fdd10, mutex=0x17d9e3c, cond=0x17d9e58) at pthread_cond_wait.c:539
#3 __pthread_cond_timedwait (cond=0x17d9e58, mutex=0x17d9e3c, abstime=0xb26fdd10) at pthread_cond_wait.c:667
#4 0xb3a46a66 in __gthread_cond_timedwait (__abs_timeout=0xb26fdd10, __mutex=<optimized out>, __cond=<optimized out>) at /usr/include/arm-linux-gnueabihf/c++/8/bits/gthr-default.h:871
#5 std::condition_variable::__wait_until_impl<std::chrono::duration<long long, std::ratio<1ll, 1000000000ll> > > (__atime=..., __lock=..., this=0x17d9e58) at /usr/include/c++/8/condition_variable:178
#6 std::condition_variable::wait_until<std::chrono::duration<long long, std::ratio<1ll, 1000000000ll> > > (__atime=..., __lock=..., this=0x17d9e58) at /usr/include/c++/8/condition_variable:106
#7 std::condition_variable::wait_until<std::chrono::_V2::system_clock, std::chrono::duration<long long int, std::ratio<1, 1000000000> >, iqrf::Scheduler::timer()::<lambda()> > (__p=..., __atime=...,
__lock=..., this=0x17d9e58) at /usr/include/c++/8/condition_variable:129
#8 iqrf::Scheduler::timer (this=0x17d9d98) at ../../../src/Scheduler/Scheduler.cpp:397
#9 0xb6e0849e in ?? () from /lib/arm-linux-gnueabihf/libstdc++.so.6
#10 0xb6e8bbbe in start_thread (arg=0x976755a2) at pthread_create.c:486
#11 0xb6c7762c in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:73 from /lib/arm-linux-gnueabihf/libc.so.6
Thread 9: DB enumeration thread, waiting for a topology altering event
#0 __libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:46
#1 0xb6eff67e in futex_wait_cancelable (private=0, expected=0, futex_word=0x1dab5f0) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#2 __pthread_cond_wait_common (abstime=0x0, mutex=0x1dab5ac, cond=0x1dab5c8) at pthread_cond_wait.c:502
#3 __pthread_cond_wait (cond=0x1dab5c8, mutex=0x1dab5ac) at pthread_cond_wait.c:655
#4 0xb6e73934 in std::condition_variable::wait(std::unique_lock<std::mutex>&) () from /lib/arm-linux-gnueabihf/libstdc++.so.6
#5 0xb4ed7678 in iqrf::IqrfInfo::Imp::runEnum (this=0x1dab540) at ../../../src/IqrfInfo/IqrfInfo.cpp:387
#6 0xb6e7749e in ?? () from /lib/arm-linux-gnueabihf/libstdc++.so.6
#7 0xb6efabbe in start_thread (arg=0x95e29930) at pthread_create.c:486
#8 0xb6ce662c in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:73 from /lib/arm-linux-gnueabihf/libc.so.6
Thread 10: MqChannel/Messaging, TaskQueue
#0 __libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:46
#1 0xb6c398f8 in __GI___mq_timedsend (abs_timeout=0x0, msg_prio=0, msg_len=2132,
msg_ptr=0xb570deb0 "{\n \"mType\": \"iqrfSensor_ReadSensorsWithTypes\",\n \"data\": {\n \"msgId\": \"async-6\",\n \"rsp\": {\n", ' ' <repeats 12 times>, "\"nAdr\": 51,\n", ' ' <repeats 12 times>, "\"hwpId\": 12292,\n", ' ' <repeats 12 times>, "\"rCode\": 0,\n", ' ' <repeats 12 times>, "\"dp"..., mqdes=21) at ../sysdeps/unix/sysv/linux/mq_timedsend.c:28
#2 __GI___mq_timedsend (mqdes=mqdes@entry=21,
msg_ptr=msg_ptr@entry=0xb570deb0 "{\n \"mType\": \"iqrfSensor_ReadSensorsWithTypes\",\n \"data\": {\n \"msgId\": \"async-6\",\n \"rsp\": {\n", ' ' <repeats 12 times>, "\"nAdr\": 51,\n", ' ' <repeats 12 times>, "\"hwpId\": 12292,\n", ' ' <repeats 12 times>, "\"rCode\": 0,\n", ' ' <repeats 12 times>, "\"dp"..., msg_len=msg_len@entry=2132, msg_prio=msg_prio@entry=0,
abs_timeout=abs_timeout@entry=0x0) at ../sysdeps/unix/sysv/linux/mq_timedsend.c:25
#3 0xb6c3989c in mq_send (mqdes=mqdes@entry=21,
msg_ptr=msg_ptr@entry=0xb570deb0 "{\n \"mType\": \"iqrfSensor_ReadSensorsWithTypes\",\n \"data\": {\n \"msgId\": \"async-6\",\n \"rsp\": {\n", ' ' <repeats 12 times>, "\"nAdr\": 51,\n", ' ' <repeats 12 times>, "\"hwpId\": 12292,\n", ' ' <repeats 12 times>, "\"rCode\": 0,\n", ' ' <repeats 12 times>, "\"dp"..., msg_len=msg_len@entry=2132, msg_prio=msg_prio@entry=0)
at ../sysdeps/unix/sysv/linux/mq_send.c:30
#4 0xb1234300 in writeMq (written=<synthetic pointer>: <optimized out>, toWrite=2132,
tx=0xb570deb0 "{\n \"mType\": \"iqrfSensor_ReadSensorsWithTypes\",\n \"data\": {\n \"msgId\": \"async-6\",\n \"rsp\": {\n", ' ' <repeats 12 times>, "\"nAdr\": 51,\n", ' ' <repeats 12 times>, "\"hwpId\": 12292,\n", ' ' <repeats 12 times>, "\"rCode\": 0,\n", ' ' <repeats 12 times>, "\"dp"..., mqDescr=21) at ../../../src/MqMessaging/MqChannel.cpp:128
#5 MqChannel::sendTo (this=0x27ca330, message=...) at ../../../src/MqMessaging/MqChannel.cpp:313
#6 0xb1241714 in std::function<void (std::__cxx11::basic_string<unsigned char, std::char_traits<unsigned char>, std::allocator<unsigned char> >)>::operator()(std::__cxx11::basic_string<unsigned char, std::char_traits<unsigned char>, std::allocator<unsigned char> >) const (Python Exception <class 'ValueError'> Invalid length.:
__args#0=, this=<optimized out>) at /usr/include/c++/8/bits/std_function.h:682
#7 TaskQueue<std::__cxx11::basic_string<unsigned char, std::char_traits<unsigned char>, std::allocator<unsigned char> > >::worker (this=0x27bd8c8) at ../../../src/include/TaskQueue.h:130
#8 0xb6e7749e in ?? () from /lib/arm-linux-gnueabihf/libstdc++.so.6
#9 0xb6efabbe in start_thread (arg=0x95e29930) at pthread_create.c:486
#10 0xb6ce662c in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:73 from /lib/arm-linux-gnueabihf/libc.so.6
Edited by Karel Hanák