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

Thread safety warnings in rmw_node_info_and_types.cpp #299

Closed
emersonknapp opened this issue Jul 3, 2019 · 2 comments · Fixed by #301
Closed

Thread safety warnings in rmw_node_info_and_types.cpp #299

emersonknapp opened this issue Jul 3, 2019 · 2 comments · Fixed by #301
Labels
bug Something isn't working

Comments

@emersonknapp
Copy link
Contributor

Bug report

The nightly thread safety build is marked unstable because some potentially thread-unsafe code was introduced -

reading variable 'discovered_namespaces' requires holding mutex 'impl->listener->names_mutex_' [-Wthread-safety-analysis]

see the CI job for warning details https://ci.ros2.org/view/nightly/job/nightly_linux_clang_libcxx/67/warnings23Result/

Required Info:

  • Operating System:
    • Linux x86_64
  • Installation type:
    • CI Build
  • Version or commit hash:
    • Last 36 builds
  • DDS implementation:
    • rmw_fastrtps_shared_cpp
  • Client library (if applicable):
    • N/A
@ivanpauno
Copy link
Member

I guess the warning was introduced in #283.

@MiguelCompany
Copy link
Collaborator

I guess the warning was introduced in #283.

Good guess. That PR introduced a RCPPUTILS_TSA_GUARDED_BY annotation for the two maps the warnings are complaining about. The change was necessary because tsan was complaining on concurrent access to both of them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants