Asynchronously shutting down while using `rclcpp::spin` `rclcpp:spin_some` in another thread throws an exception
Open
Nobody has claimed this yet.
backlog
- Dominant language
- C++
- Stars
- 805
- Forks
- 564
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 27
Description
This nightly failure is an example of the problem:
What is happening is that one thread is creating an executor, while other is trying to shutdown.
If shutdown is called before the creation of the Executor, an exception is thrown:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with rclcpp_lifecycle/test/test_lifecycle_service_client.cpp around lines 218-231 and the linked nightly failure. Reproduce the case where one thread creates an executor while another shuts down, including the rclcpp::spin or spin_some usage. Done means asynchronous shutdown no longer throws an exception in this scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- robotics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100