-
Notifications
You must be signed in to change notification settings - Fork 434
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
ActionClient deadlocks if accessing goalHandle in feedback_callback #2243
Comments
What GoalHandle are you calling with the feedback_callback, I set up a minimal ActionClient and can't seem to find how you're getting a deadlock, for instance I have:
Then I just have a |
https://github.com/jmachowinski/rclcppActionDeadlock This code demonstrates the issue. There are two ways to fix this problem, either release the handle_mutex_ before calling the callback (here
or make the handle_mutex a std::recursive_mutex. |
Would |
I tried using the code @jmachowinski provided and none of the those three public methods, which use a Since things like the return functions don't even work and we're using |
So, what's the way forward here, should I provide a merge request that changes to recursive mutex ? |
That is probably the way forward. Dropping and then reacquiring the lock can lead to its own set of problems/race conditions, so I'd rather not do that. |
Bug report
Steps to reproduce issue
Create a ActionClient with a custom feedback_callback
wait for the fallback to be called
call get_status() on the passes GoalHandle
Expected behavior
It should not deadlock
Actual behavior
It deadlocks
Additional information
The function call_feedback_callback (
rclcpp/rclcpp_action/include/rclcpp_action/client_goal_handle_impl.hpp
Line 163 in c0d72c3
feedback_callback. Therefore using any method on the handle, that tries to also acquire
the mutex will deadlock the system.
The text was updated successfully, but these errors were encountered: