SICKAG / sick_safetyscanners

ROS driver for SICK safety laser scanners
https://www.sick.com/de/en/opto-electronic-protective-devices/safety-laser-scanners/c/g187225
Apache License 2.0
61 stars 59 forks source link

Deadlock occurs inside the Command::waitForCompletion(). #149

Open suffeeen opened 2 weeks ago

suffeeen commented 2 weeks ago

Microscan and the arm board are simultaneously started CODE: comm_settings.setSensorIp(sensorip); comm_settings.setSensorTcpPort(2122); comm_settings.setHostIp(hostip); 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_iodata); device = new sickSickSafetyscanners( stdbind(&Nanoscan3DriverreceivedUDPPacket, this, stdplaceholders::1), &commsettings); 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_queue&) ()

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_ptr const&) ()

6 0x00000055910308f4 in sick::cola2::Cola2Session::executeCommand(std::shared_ptr 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&) ()

puck-fzi commented 2 days ago

Dear suffeen, are you using the ROS driver? or did you setup the code yourself, that you provided?