fix: Prevent client destruction race condition#1183
fix: Prevent client destruction race condition#1183bjsowa merged 3 commits intoRobotWebTools:ros2from
Conversation
|
Overall LGTM. Just one minor change I added in field-ai#4 |
Sounds good! Merged your change in. |
|
Please update the branch with the base branch |
|
@FieldSwan Tested this. It fixes the fact that you can no longer use the executor. Which is great. But any goal send after that forces it to spawn threads that are not destroyed. Making this change a killer in the long run. Same for the hotfix @YannickdeHoop and I made mentioned in #1144 (comment) This video demonstrates the following: Using the rosbridge I am calling the navigation of my robot using teleoperation, basically sending "go to XYZ", I limited the cpu usage allowed for the rosbridge to be 10% which is equivalent to the actual robots we use at lowpad. Considering I have that much of a beefy cpu. As shown in the video, once this happens threads keep spawning and the rosbridge keeps functioning as /intended/, but the threads keep and keep coming which will eventually grind the entire system to a halt. output2.mp4 |
420c1e4 to
eb76081
Compare
I'm still merging it as it also fixes one race condition. |
|
@Mergifyio backport kilted jazzy humble |
✅ Backports have been createdDetails
Cherry-pick of 5b20a2e has failed: 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
Cherry-pick of 5b20a2e has failed: 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 |
* fix: Prevent client destruction race condition (#1183) * Client creation/destruction race condition stress test * Fix race condition with client destruction * Use ros isolated pytest (#4) --------- Co-authored-by: Błażej Sowa <bsowa123@gmail.com> (cherry picked from commit 5b20a2e) # Conflicts: # rosbridge_server/CMakeLists.txt * Fix conflicts --------- Co-authored-by: FieldSwan <michael.swan@fieldai.com> Co-authored-by: Błażej Sowa <bsowa123@gmail.com>
* fix: Prevent client destruction race condition (#1183) * Client creation/destruction race condition stress test * Fix race condition with client destruction * Use ros isolated pytest (#4) --------- Co-authored-by: Błażej Sowa <bsowa123@gmail.com> (cherry picked from commit 5b20a2e) # Conflicts: # rosbridge_server/CMakeLists.txt * Fix conflicts --------- Co-authored-by: FieldSwan <michael.swan@fieldai.com> Co-authored-by: Błażej Sowa <bsowa123@gmail.com>
Public API Changes
None
Description
Note that this stress test is relatively slow, takes 20 seconds on my machine.
Tested on ROS2 kilted.
May be related to: #1144