Add timeout fundamentals for daemon client communication #886
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is more of a proof-of-concept than a concrete proposal.
If there is a broken ROS 2 daemon process or another completely unrelated TCP server listening on the corresponding XMLRPC port, it's possible for calls like
is_daemon_running
to hang for a VERY long time.For example:
nc -k -l 11511
ros2 daemon status
You can see the XMLRPC request on the server, but without a response, the call to
ros2 daemon status
will just sit there. I'm not sure how long it will go before the "global default" timeout will kick in, but I haven't waited long enough to see it.This can be a particularly bad problem in this package's tests, many of which connect to and sometimes create and destroy daemon processes. It would be nice if those tests didn't hang.
Possible mitigation for problems like #610 and #737