Problem
I've seen more CI failures on humble during recent runs due to segfault. After initial looking, it appears that the segfaults were around rclpy.executors._wait_for_ready_callbacks which may be due to freqent rclpy.init()/rclpy.shutdown() cycles. The backtrace shows executor threads accessing ROS2 resources during shutdown.
Potential cause
CI tests have function-scoped ros_setup fixture causes multiple init/shutdown cycles per test run, triggering race conditions in Humble's C++ layer.
Potential fix
Change fixture scope to session: Update ros_setup and ros2_context fixtures from scope="function"/scope="module" to scope="session" to reduce init/shutdown cycles.
Problem
I've seen more CI failures on humble during recent runs due to segfault. After initial looking, it appears that the segfaults were around
rclpy.executors._wait_for_ready_callbackswhich may be due to freqent rclpy.init()/rclpy.shutdown() cycles. The backtrace shows executor threads accessing ROS2 resources during shutdown.Potential cause
CI tests have function-scoped ros_setup fixture causes multiple init/shutdown cycles per test run, triggering race conditions in Humble's C++ layer.
Potential fix
Change fixture scope to session: Update ros_setup and ros2_context fixtures from scope="function"/scope="module" to scope="session" to reduce init/shutdown cycles.