-
Notifications
You must be signed in to change notification settings - Fork 155
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
Some ActionClients being left waiting forever when server sends results to two or more clients in a very short span of time #144
Comments
Poking @mikaelarguedas who knows this code. |
i do agree with you, it is so unlikely to happen but eventually there is a possibility. since it is configurable using parameter actionlib_client_pub_queue_size/actionlib_client_sub_queue_size, it is user responsibility what to set. |
@fujitatomoya I have to strongly disagree. As far as I understand it, the idea of the ActionClient is explicitly to support multiple goals whereas the SimpleActionClient simplifies that to tracking a single goal. This is a critical bug and no sane user would expect the queue size to be set to such a low value by default as there is no reason to do so. I would suggest to at least change this: actionlib/actionlib/include/actionlib/client/action_client.h Lines 223 to 226 in 6673539
to a I can make a PR if you want, though it may be a bit overkill for at most 10 line changes. |
correct,
i do understand, and yes logically that is possible or probable.
None means infinite(default), agreed on this. at least this should be consistent as ActionClient python. (i cannot explain why there is a difference between cpp and python.) |
#162, that is an easy fix, but could you check just in case? |
I found an issue when the cpp Action Server sends results to two or more clients during a very short span of time, which causes all but one of the clients to be left hanging in most cases.
I tracked the problem to being very likely related to the default value of the queue length (only one message long) used for the feedback and result subscribers in the ActionClient, see action_client.h:224.
This is related to the changes made in PR #55
Since all clients share the same feedback and result topics, when the server sends multiple messages addressed to different clients in quick succession, all of the clients subscriber queues become full after the first message and drop the following messages.
As a result, in most cases the clients that were meant to receive the second, third or later messages become hanged waiting for results that were lost and will not be resent.
A similar problem may cause feedback messages to be silently dropped.
While the queue length can be configured using the parameter server, a higher default value may reduce the chances of this problem arising. This would be specially useful since it's hard to track the symptoms to the cause when clients are left waiting indefinitely.
This issue was noted in ROS Kinetic, but it's probably present in other versions as well.
The text was updated successfully, but these errors were encountered: