sick_safetyscanners icon indicating copy to clipboard operation
sick_safetyscanners copied to clipboard

Deadlock occurs inside the Command::waitForCompletion().

Open suffeeen opened this issue 5 months ago • 1 comments

Microscan and the arm board are simultaneously started CODE: comm_settings.setSensorIp(sensor_ip_); comm_settings.setSensorTcpPort(2122); comm_settings.setHostIp(host_ip_); comm_settings.setChannel(0); comm_settings.setEnabled(true); comm_settings.setPublishingFrequency(2); bool general_system_state = true; bool derived_settings = true; bool measurement_data = true; bool intrusion_data = true; bool application_io_data = true; comm_settings.setStartAngle(radToDeg(0)); comm_settings.setEndAngle(radToDeg(0)); comm_settings.setFeatures(general_system_state, derived_settings, measurement_data, intrusion_data, application_io_data); device_ = new sickSickSafetyscanners( stdbind(&Nanoscan3DriverreceivedUDPPacket, this, stdplaceholders::1), &comm_settings); device->run(); readTypeCodeSettings(); device_->changeSensorSettings(comm_settings);

LOG: Thread 14 (Thread 0x7f83215cc0 (LWP 2706) "main"): #0 0x0000007f8a6f5f3c in __GI_epoll_pwait (epfd=, events=0x7f83214a78, maxevents=128, timeout=-1, set=0x0) at ../sysdeps/unix/sysv/linux/epoll_pwait.c:40 #1 0x0000005590da2478 in boost::asio::detail::epoll_reactor::run(long, boost::asio::detail::op_queueboost::asio::detail::scheduler_operation&) () #2 0x0000005591029f8c in sick::SickSafetyscanners::udpClientThread() () #3 0x0000007f8b1d4978 in ?? () from target:/lib/aarch64-linux-gnu/libboost_thread.so.1.74.0 #4 0x0000007f8a68d5c8 in start_thread (arg=0x0) at ./nptl/pthread_create.c:442 #5 0x0000007f8a6f5d9c in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone.S:79 Thread 13 (Thread 0x7f83a25cc0 (LWP 2705) "agv_main"): #0 futex_wait (private=0, expected=2, futex_word=0x7f70006c40) at ../sysdeps/nptl/futex-internal.h:146 #1 __GI___lll_lock_wait (futex=futex@entry=0x7f70006c40, private=private@entry=0) at ./nptl/lowlevellock.c:49 #2 0x0000007f8a69070c in lll_mutex_lock_optimized (mutex=0x7f70006c40) at ./nptl/pthread_mutex_lock.c:48 #3 ___pthread_mutex_lock (mutex=0x7f70006c40) at ./nptl/pthread_mutex_lock.c:93 #4 0x00000055910324b0 in sick::cola2::Command::waitForCompletion() () #5 0x00000055910304e4 in sick::cola2::Cola2Session::sendTelegramAndListenForAnswer(std::shared_ptrsick::cola2::Command const&) () #6 0x00000055910308f4 in sick::cola2::Cola2Session::executeCommand(std::shared_ptrsick::cola2::Command const&) () #7 0x00000055910314ec in sick::cola2::Cola2Session::open() () #8 0x000000559102bf98 in sick::SickSafetyscanners::startTCPConnection(sick::datastructure::CommSettings const&) () #9 0x000000559102c0c8 in sick::SickSafetyscanners::requestTypeCode(sick::datastructure::CommSettings const&, sick::datastructure::TypeCode&) ()

suffeeen avatar Sep 11 '24 09:09 suffeeen