Skip to content

Data race on the random number generator used in rclcpp_action for creating the UUID #3182

Description

@iv461

Generated by Generative AI

No

Operating System:

ubuntu 24

ROS version or commit hash:

Rolling

RMW implementation (if applicable):

No response

RMW Configuration (if applicable):

No response

Client library (if applicable):

rclcpp

'ros2 doctor --report' output

No response

Steps to reproduce issue

In rclcpp_action, when calling async_send_goal concurrently (that's public API, so I assume it to be thread-safe), there is a data race on the random number generator (RNG) that used to create the UUID of the goal. The RNG should be protected by a mutex.

Expected behavior

No data race

Actual behavior

Data race detected by ThreadSanitizer

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions