-
Notifications
You must be signed in to change notification settings - Fork 78
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
LoadComposableNodes action hangs #169
Labels
bug
Something isn't working
Comments
jacobperron
added a commit
to ros2/launch
that referenced
this issue
Aug 11, 2020
Fixes ros2/launch_ros#169 Otherwise, it's possible to run into a race condition between checking for 'idle' and processing events from the queue. I.e. it's possible that an event is completed between executing the following two lines: https://github.com/ros2/launch/blob/657745c315ba6a61984b66f168f9c34b3a7e2108/launch/launch/launch_service.py#L158 https://github.com/ros2/launch/blob/657745c315ba6a61984b66f168f9c34b3a7e2108/launch/launch/launch_service.py#L272 To fix the race, this changes makes all accesses to the event queue thread safe and introduces a helper function get_next_event() that first checks if the queue is empty before potentially blocking forever with asynchio.Queue.get(). Signed-off-by: Jacob Perron <jacob@openrobotics.org>
This was referenced Aug 11, 2020
jacobperron
added a commit
to ros2/launch
that referenced
this issue
Aug 12, 2020
…ame time Fixes ros2/launch_ros#169 Otherwise, it's possible to get into a hung state where we wait for an event, even though there are no more events. This is because the check for an "idle" state evaluates to "True" as we wait for some futures to complete. By waiting for futures and events concurrently, we can avoid this problem. Further, we don't have to wait for an event if there's nothing in the queue. Signed-off-by: Jacob Perron <jacob@openrobotics.org>
jacobperron
added a commit
to ros2/launch
that referenced
this issue
Aug 13, 2020
…events (#449) Fixes ros2/launch_ros#169 Otherwise, it's possible to get into a hung state where we wait for an event, even though there are no more events. This is because the check for an "idle" state evaluates to "True" as we wait for some futures to complete. By waiting for futures and events concurrently, we can avoid this problem. Further, we don't have to wait for an event if there's nothing in the queue. Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Wait until one event is processed or nothing done (timeout) Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Fix bugs Always create a task to wait on and cancel it if there is a timeout. Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Avoid canceling an event mid-processing Signed-off-by: Jacob Perron <jacob@openrobotics.org> * minor refactor Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Guard against leaving a task pending Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Further refactoring We don't need to have an inner loop or timeout when waiting on futures. Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Only wait on futures if there are no events in the queue This prevents spurious wake-ups when we're waiting for an event to finish processing. Signed-off-by: Jacob Perron <jacob@openrobotics.org>
jacobperron
added a commit
to ros2/launch
that referenced
this issue
Aug 20, 2020
…events (#449) Fixes ros2/launch_ros#169 Otherwise, it's possible to get into a hung state where we wait for an event, even though there are no more events. This is because the check for an "idle" state evaluates to "True" as we wait for some futures to complete. By waiting for futures and events concurrently, we can avoid this problem. Further, we don't have to wait for an event if there's nothing in the queue. Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Wait until one event is processed or nothing done (timeout) Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Fix bugs Always create a task to wait on and cancel it if there is a timeout. Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Avoid canceling an event mid-processing Signed-off-by: Jacob Perron <jacob@openrobotics.org> * minor refactor Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Guard against leaving a task pending Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Further refactoring We don't need to have an inner loop or timeout when waiting on futures. Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Only wait on futures if there are no events in the queue This prevents spurious wake-ups when we're waiting for an event to finish processing. Signed-off-by: Jacob Perron <jacob@openrobotics.org>
jacobperron
added a commit
to ros2/launch
that referenced
this issue
Aug 27, 2020
…events (#449) (#455) Fixes ros2/launch_ros#169 Otherwise, it's possible to get into a hung state where we wait for an event, even though there are no more events. This is because the check for an "idle" state evaluates to "True" as we wait for some futures to complete. By waiting for futures and events concurrently, we can avoid this problem. Further, we don't have to wait for an event if there's nothing in the queue. Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Wait until one event is processed or nothing done (timeout) Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Fix bugs Always create a task to wait on and cancel it if there is a timeout. Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Avoid canceling an event mid-processing Signed-off-by: Jacob Perron <jacob@openrobotics.org> * minor refactor Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Guard against leaving a task pending Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Further refactoring We don't need to have an inner loop or timeout when waiting on futures. Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Only wait on futures if there are no events in the queue This prevents spurious wake-ups when we're waiting for an event to finish processing. Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Required Info:
Steps to reproduce issue
Expected behavior
Node is loaded into the container and the launch process exits.
Alternatively, if the launch process doesn't exit, sending a SIGINT or SIGQUIT should cause the launch process to exit.
Actual behavior
The node is successfully loaded, but the launch process hangs. Event SIGINT and SIGQUIT have no affect.
The text was updated successfully, but these errors were encountered: