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

Add resources_lock_ lock_guards to avoid race condition when loading robot_description through topic (backport #1451) #1599

Merged
merged 6 commits into from
Oct 13, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jul 1, 2024

As reported in #1442, loading the robot_description through the topic will cause a segmentation fault or some undefined behaviors as the read and write methods real-time methods are continuously executed, and when the robot description is received and the resource_manager is to be initialized, there is no lock_guard of recursive mutex resources_lock_, which should avoid the RM to execute the components when they are changing state or being loaded and initialized

Fixes #1442


This is an automatic backport of pull request #1451 done by Mergify.

…robot_description through topic (#1451)

(cherry picked from commit 25f2c97)

# Conflicts:
#	hardware_interface/src/resource_manager.cpp
@mergify mergify bot added the conflicts label Jul 1, 2024
Copy link
Contributor Author

mergify bot commented Jul 1, 2024

Cherry-pick of 25f2c97 has failed:

On branch mergify/bp/humble/pr-1451
Your branch is up to date with 'origin/humble'.

You are currently cherry-picking commit 25f2c97.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   hardware_interface/src/resource_manager.cpp

no changes added to commit (use "git add" and/or "git commit -a")

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

Copy link

codecov bot commented Jul 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 62.37%. Comparing base (cd55739) to head (0151d10).
Report is 1 commits behind head on humble.

Additional details and impacted files
@@            Coverage Diff             @@
##           humble    #1599      +/-   ##
==========================================
+ Coverage   62.34%   62.37%   +0.02%     
==========================================
  Files         108      108              
  Lines       11405    11407       +2     
  Branches     7979     7981       +2     
==========================================
+ Hits         7111     7115       +4     
+ Misses        817      815       -2     
  Partials     3477     3477              
Flag Coverage Δ
unittests 62.37% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
hardware_interface/src/resource_manager.cpp 78.53% <100.00%> (+0.07%) ⬆️

... and 1 file with indirect coverage changes

@christophfroehlich christophfroehlich merged commit 847e655 into humble Oct 13, 2024
10 of 11 checks passed
@christophfroehlich christophfroehlich deleted the mergify/bp/humble/pr-1451 branch October 13, 2024 11:50
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.

3 participants