ZettaScaleLabs / rmw_zenoh

RMW for ROS 2 using Zenoh as the middleware
Apache License 2.0
0 stars 0 forks source link

Session close deadlock #35

Open yellowhatter opened 3 weeks ago

yellowhatter commented 3 weeks ago

@fuzzypixelz : I finally understand the deadlock. It's between a TaskController::wait in zenoh (Rust) and a C++ std::recursive_mutex in rmw_zenoh.

@yellowhatter : Okay, let me take care of this I think we need to solve it on Rust side to make our core more safe in terms of user-dependent deadlocks like this

YuanYuYuan commented 1 day ago

To reproduce, compile the test_communication and run the test with the following.

colcon test --event-handlers console_cohesion+ console_direct+ --packages-select test_rclcpp --ctest-args -R test_n_nodes__rmw_zenoh_cpp

The deadlock happens upon acquiring the lock here https://github.com/ZettaScaleLabs/rmw_zenoh/blob/28d917e0532fed6e9703f044662298f2b3553716/rmw_zenoh_cpp/src/detail/rmw_context_impl_s.cpp?plain=1#L62