Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

does rcl_subscription_get_default_options has data race? #1187

Open
comicfans opened this issue Sep 19, 2024 · 1 comment · May be fixed by #1188
Open

does rcl_subscription_get_default_options has data race? #1187

comicfans opened this issue Sep 19, 2024 · 1 comment · May be fixed by #1188

Comments

@comicfans
Copy link

Bug report

please note this is only guess.

during checking source code of rcl, I found
```

 static rcl_subscription_options_t default_options;
  // Must set these after declaration because they are not a compile time constants.
  default_options.qos = rmw_qos_profile_default;
  default_options.allocator = rcl_get_default_allocator();
  default_options.rmw_subscription_options = rmw_get_default_subscription_options();

while being called from multi thread, is this data race? recently some data race being found for similar code pattern, please see
ros2/rmw#377
ros2/rcutils#477

and a (maybe) error log for this

 'invalid allocator, at external/ros2_rcl/rcl/src/rcl/subscription.c:219'
rcutils_reset_error() should be called after error handling to avoid this.
invalid allocator, at external/ros2_rcl/rcl/src/rcl/subscription.c:219
terminate called after throwing an instance of 'rclcpp::exceptions::RCLError'
what():  could not create subscription: invalid allocator, at external/ros2_rcl/rcl/src/rcl/subscription.c:219
  • Operating System:
    • ubuntu 22.04
  • Installation type:
    • build from source
  • Version or commit hash:
    • 5.3.7
  • DDS implementation:
    • not sure
  • Client library (if applicable):
    • rclcpp

Steps to reproduce issue

this is only guess

Expected behavior

Actual behavior

Additional information


Feature request

Feature description

Implementation considerations

@fujitatomoya fujitatomoya linked a pull request Sep 19, 2024 that will close this issue
@fujitatomoya
Copy link
Collaborator

@comicfans if you can review #1188, that is really appreciated.

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 a pull request may close this issue.

2 participants