Skip to content

[CI] Segfaults in CI with ROS2 Humble unit tests #759

@Juliaj

Description

@Juliaj

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions