-
Notifications
You must be signed in to change notification settings - Fork 79
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
check for shutdown while waiting for a service response to avoid hang during shutdown #104
Conversation
… during shutdown Signed-off-by: William Woodall <[email protected]>
@wjwwood I'm away from the office right now, but I'll test this in the setup that hangs as soon as I'm in tomorrow morning |
@wjwwood A few new stack-traces:
Followed-by (and possibly the cause of):
Looks like a simple typo. Too many underbars Edit Weirdly, the same issue is on line 81 but nobody ever noticed? |
@wjwwood Even after fixing the triple-underbar calls to logger, I still see:
And then a little later:
Note that this is a 'sometimes' stack trace, not an all-the-time stack trace |
It was just never executed since it's a rare race condition. For the latest traceback (the first of the two in the latest comment), that's not even part of the modified code... It happens before it on line 79:
I think that's likely the other issue where (rclcpp_/rclpy_)shutdown causes functions to fail afterwards. For that one, I think we should just catch |
Signed-off-by: William Woodall <[email protected]>
I fixed the typos in 398cf8c |
@wjwwood Do you propose we deal with the invalid handle in another PR or this one? or third option not worry about it |
If it's causing a problem we can go ahead and fix it I guess, but it would be good to know if the original problem is fixed (it was a hang not a crash) and that this fix doesn't cause the crashes you see. |
I'm pretty confident that the original issue (hang) is resolved. I could make it happen in 10 minutes before your change, and I let your change run for about 90 minutes without hanging. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if ROSSpecificLaunchStartup
should somehow provide this feature, any future ROS service calls done from within launch
will run into the same problem, no?
Maybe so, but I think this is the only case so far. In general you need to think about these issues, as who ever wrote this (probably me) was thinking with the |
@wjwwood Any update on this? |
Comparing the CI results to nightly, e.g. https://ci.ros2.org/view/nightly/job/nightly_linux_release/1389/testReport/, I've manually verified that all the failures were preexisting. macOS is hung in the ros2cli tests (known issue), so I'm going to ignore that one. Despite these issues, I'm going to merge this if I can find a review, so that some downstream users can bring the patch in. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
… during shutdown (#104) * check for shutdown while waiting for a service response to avoid hang during shutdown Signed-off-by: William Woodall <[email protected]> * fix typo in logger call Signed-off-by: William Woodall <[email protected]>
… during shutdown (#104) * check for shutdown while waiting for a service response to avoid hang during shutdown Signed-off-by: William Woodall <[email protected]> * fix typo in logger call Signed-off-by: William Woodall <[email protected]> Signed-off-by: ivan <[email protected]>
* Add pid to launch_ros node name as suffix Signed-off-by: Brian Ezequiel Marchi <[email protected]> Signed-off-by: ivan <[email protected]> * Pass the node-name attribute through the substitution parser (#101) Signed-off-by: ivan <[email protected]> * Fix push-ros-namespace in xml/yaml launch files (#100) Signed-off-by: Ivan Santiago Paunovic <[email protected]> Signed-off-by: ivan <[email protected]> * Maintain order of parameters regarding name and from (#99) Signed-off-by: Brian Ezequiel Marchi <[email protected]> Signed-off-by: ivan <[email protected]> * Use imperative mood in constructor docstrings. (#103) * Use imperative mood in constructor docstrings. Fixes D401 in pycodestyle 5.0.0 and flake8. Signed-off-by: Steven! Ragnarök <[email protected]> * Use imperative mood in docstring. Signed-off-by: Steven! Ragnarök <[email protected]> * Use imperative mood in docstrings. Signed-off-by: Steven! Ragnarök <[email protected]> Signed-off-by: ivan <[email protected]> * Fix misleading deprecated warnings when using launch arguments (#106) Signed-off-by: Ivan Santiago Paunovic <[email protected]> Signed-off-by: ivan <[email protected]> * check for shutdown while waiting for a service response to avoid hang during shutdown (#104) * check for shutdown while waiting for a service response to avoid hang during shutdown Signed-off-by: William Woodall <[email protected]> * fix typo in logger call Signed-off-by: William Woodall <[email protected]> Signed-off-by: ivan <[email protected]> * Fix frontend topic remapping (#111) * Add frontend remap test Signed-off-by: Jacob Perron <[email protected]> * Pass data_type parameter to remap entity This resolves an issue where frontend remaps are not parsed. Signed-off-by: Jacob Perron <[email protected]> Signed-off-by: ivan <[email protected]> Co-authored-by: Brian Marchi <[email protected]> Co-authored-by: Grey <[email protected]> Co-authored-by: Steven! Ragnarök <[email protected]> Co-authored-by: William Woodall <[email protected]> Co-authored-by: Jacob Perron <[email protected]>
Should fix #102