Skip to content

fix(logging): avoid overriding global rcutils log handler#626

Draft
esteve wants to merge 1 commit into
ros2-rust:mainfrom
esteve:fix-logging-crash
Draft

fix(logging): avoid overriding global rcutils log handler#626
esteve wants to merge 1 commit into
ros2-rust:mainfrom
esteve:fix-logging-crash

Conversation

@esteve

@esteve esteve commented Apr 15, 2026

Copy link
Copy Markdown
Collaborator

This PR makes the logging tests run sequentially. Logging in ROS is not thread-safe as it uses global state, when cargo test runs these tests in parallel, sometimes cargo crashes with a SIGSEGV.

@esteve esteve requested review from maspe36 and mxgrey April 15, 2026 15:50
@esteve

esteve commented Apr 15, 2026

Copy link
Copy Markdown
Collaborator Author

Perhaps a more complete approach would be to protect such global state inside rclrs, but these changes should suffice.

@esteve

esteve commented Apr 15, 2026

Copy link
Copy Markdown
Collaborator Author

The issues with the rolling job are caused by action-ros-ci, I think the APT repos are not updated with the latest rolling sync.

@esteve

esteve commented Apr 15, 2026

Copy link
Copy Markdown
Collaborator Author

Here's an example of a failing CI job crashing:

https://github.com/ros2-rust/ros2_rust/actions/runs/24464336823/job/71487081210?pr=625

error: test failed, to rerun pass `-p rclrs --lib`
  
  Caused by:
    process didn't exit successfully: `/__w/ros2_rust/ros2_rust/ros_ws/build/rclrs/debug/deps/rclrs-051c2c557ee4ff13 --color=never --quiet` (signal: 11, SIGSEGV: invalid memory reference)

@esteve esteve force-pushed the fix-logging-crash branch 4 times, most recently from 35c2acc to 3138c2f Compare May 17, 2026 19:52
@esteve esteve marked this pull request as draft May 17, 2026 19:52
@esteve esteve force-pushed the fix-logging-crash branch from 3138c2f to 50d468a Compare June 14, 2026 10:46
Signed-off-by: Esteve Fernandez <esteve@apache.org>
@esteve esteve force-pushed the fix-logging-crash branch from 50d468a to 4cf3724 Compare June 14, 2026 11:28
@esteve esteve changed the title fix: do not run logging tests in parallel fix(logging): avoid overriding global rcutils log handler Jun 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant