-
Notifications
You must be signed in to change notification settings - Fork 914
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
roslaunch exit code 0 even if requried node died with non-zero exit code #919
Comments
One could directly check the exit code of the started nodes as roslaunch prints the node's pid, but I don`t see a way to do this programmatically and agree that roslaunch should forward the exit code of the node. But what if multiple nodes have been started by roslaunch? |
At least if a required node dies, I think it would be better if roslaunch returned any non-zero exit code instead of 0. |
This makes it challenging to containerize ROS nodes or stacks.
is what I see when a node has an unhandled exception, then the container goes down,
No obvious way to intercept this, either. Can't trust presence of stderr, as some applications will roslog error but then recover. |
Was there a conclusion to this? I also want to be able to programmatically check whether or not a roslaunch failed. @dirk-thomas I see you added the enhancement tag - do you know if there is some way of getting the exit code of the child node? |
I assume not at the moment. Please consider to contribute a pull request to enable this. |
I might be able to do it if someone could point roughly in the stack where to look or what keywords to grep for. |
…process at least for a regular parent launch process, child and remote processes need looking at. May solve ros#919 but needs to be cleaned up and put into standalone branch.
…process at least for a regular parent launch process, child and remote processes need looking at. May solve ros#919 but needs to be cleaned up and put into standalone branch.
@xkortex I'm also trying to get failed required nodes to make ci jobs fail, and started experimenting with this in lucasw@0eb9ba4 . Use with caution- there were some odd cases where roslaunch lost track of child processes but I think I'm avoiding that now. |
…process at least for a regular parent launch process, child and remote processes need looking at. May solve ros#919 but needs to be cleaned up and put into standalone branch.
@lucasw any update on your branch? is there anything we can do to assist you in getting this finalized/tested? i got here due to the same reason: a simple smoketest in ci :) |
… a regular parent launch process, child and remote processes need looking at. May solve ros#919
… a regular parent launch process, child and remote processes need looking at. May solve ros#919
… a regular parent launch process, child and remote processes need looking at. May solve ros#919
…process at least for a regular parent launch process, child and remote processes need looking at. May solve ros#919 but needs to be cleaned up and put into standalone branch.
… a regular parent launch process, child and remote processes need looking at. May solve ros#919
…process at least for a regular parent launch process, child and remote processes need looking at. May solve ros#919 but needs to be cleaned up and put into standalone branch.
…process at least for a regular parent launch process, child and remote processes need looking at. May solve ros#919 but needs to be cleaned up and put into standalone branch.
…process at least for a regular parent launch process, child and remote processes need looking at. May solve ros#919 but needs to be cleaned up and put into standalone branch.
…process at least for a regular parent launch process, child and remote processes need looking at. May solve ros#919 but needs to be cleaned up and put into standalone branch.
…process at least for a regular parent launch process, child and remote processes need looking at. May solve ros#919 but needs to be cleaned up and put into standalone branch.
…process at least for a regular parent launch process, child and remote processes need looking at. May solve ros#919 but needs to be cleaned up and put into standalone branch.
…process at least for a regular parent launch process, child and remote processes need looking at. May solve ros#919 but needs to be cleaned up and put into standalone branch.
…process at least for a regular parent launch process, child and remote processes need looking at. May solve ros#919 but needs to be cleaned up and put into standalone branch.
…process at least for a regular parent launch process, child and remote processes need looking at. May solve ros#919 but needs to be cleaned up and put into standalone branch.
…process at least for a regular parent launch process, child and remote processes need looking at. May solve ros#919 but needs to be cleaned up and put into standalone branch.
…process at least for a regular parent launch process, child and remote processes need looking at. May solve ros#919 but needs to be cleaned up and put into standalone branch.
…process at least for a regular parent launch process, child and remote processes need looking at. May solve ros#919 but needs to be cleaned up and put into standalone branch.
…process at least for a regular parent launch process, child and remote processes need looking at. May solve ros#919 but needs to be cleaned up and put into standalone branch.
…process at least for a regular parent launch process, child and remote processes need looking at. May solve ros#919 but needs to be cleaned up and put into standalone branch.
…process at least for a regular parent launch process, child and remote processes need looking at. May solve ros#919 but needs to be cleaned up and put into standalone branch.
…process at least for a regular parent launch process, child and remote processes need looking at. May solve ros#919 but needs to be cleaned up and put into standalone branch.
…process at least for a regular parent launch process, child and remote processes need looking at. May solve ros#919 but needs to be cleaned up and put into standalone branch.
…process at least for a regular parent launch process, child and remote processes need looking at. May solve ros#919 but needs to be cleaned up and put into standalone branch.
…process at least for a regular parent launch process, child and remote processes need looking at. May solve ros#919 but needs to be cleaned up and put into standalone branch.
…process at least for a regular parent launch process, child and remote processes need looking at. May solve ros#919 but needs to be cleaned up and put into standalone branch.
Currently (at least in my indigo installation), if one of the nodes launched by roslaunch dies due to an error or from a signal, roslaunch is able to catch that and report, but its exit code is still 0.
This makes if hard to verify whether roslaunch was successful or not.
I am not sure if it's a bug report or a feature request, but I think propagating required node's exit code to ros roslaunch exit code would be a useful imp.
The described behavior was confirmed here:
http://answers.ros.org/question/219115/exit-code-of-roslaunch-shutdown-on-node-death/
It can also be easily verified with a simple launch file:
run it, then kill the node:
$ kill -9 <TURTLESIM_NODE_PID>
roslaunch then shuts down with:
The reported error code is:
I believe that even if not via exit code, there should be some easy mechanism to check whether roslaunch succeeded or failed (based on the required node exit code).
The text was updated successfully, but these errors were encountered: