You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1.) node spawns a subscriber and a publisher
2.1) main thread spins the executor, having sub and pub talking
2.2) second thread randomly stops the subscription (resetting the shared_ptr of it)
3.) program crashes with the backtrace at the bottom of the gist.
quickly discussed the problem with @wjwwood, when resetting the subscription, the executor still has a raw handle on it which leads to race conditions. The problem can be addressed by turning the handle into a shared pointer.
concretely speaking, this function should return a shared_ptr instead of a raw pointer.
We have been hitting this issue when using the ROS2-to-ROS1 ros1_bridge with bridge_all_2to1_topics set to false. When the ROS1 subscriber for a topic disappers the ROS2 subscriber is destroyed and sometimes this happens while the wait set is still holding a raw pointer to a member of that object. The result is various segfault errors within rmw_wait.
Activity
dhood commentedon Aug 23, 2017
this is the permalink to the function @Karsten1987 is referencing in his post (in case those lines move around):
rclcpp/rclcpp/include/rclcpp/subscription.hpp
Lines 81 to 83 in b906768
Store the subscriber, client, service and timer
deng02 commentedon Jan 16, 2018
We have been hitting this issue when using the ROS2-to-ROS1 ros1_bridge with bridge_all_2to1_topics set to false. When the ROS1 subscriber for a topic disappers the ROS2 subscriber is destroyed and sometimes this happens while the wait set is still holding a raw pointer to a member of that object. The result is various segfault errors within rmw_wait.
Convert all rcl_*_t types to shared pointers
Convert all rcl_*_t types to shared pointers
Convert all rcl_*_t types to shared pointers
Convert all rcl_*_t types to shared pointers
Convert all rcl_*_t types to shared pointers
Convert all rcl_*_t types to shared pointers
Convert all rcl_*_t types to shared pointers
Convert all rcl_*_t types to shared pointers
Convert all rcl_*_t types to shared pointers
Store the subscriber, client, service and timer (#431)
wjwwood commentedon Mar 12, 2018
I believe #431 closes this, please comment here if this is still an issue.
Convert all rcl_*_t types to shared pointers
Convert all rcl_*_t types to shared pointers
Convert all rcl_*_t types to shared pointers
Revert "Revert "Store the subscriber, client, service and timer"" (#449)
add wait_for_action_server() for action clients (ros2#349)
Test all RMW implementations for rosbag2_transport (ros2#349)
Store the subscriber, client, service and timer (ros2#431)
Revert "Revert "Store the subscriber, client, service and timer"" (ro…