Setting qos_overriding_options in create_publisher or create_subscription for a new Pub or Sub from within a dynamic parameter callback creates a deadlock condition when resource locking is required
Maintainers usually reply within 1 day
@fujitatomoya is already working on this.
Since Jun 25, 2025.
Assessment
This issue has not been assessed yet.
Description
Operating System:
Ubuntu 24.04
ROS version or commit hash:
Rolling
Client library (if applicable):
rclcpp
Steps to reproduce issue
We use create_publisher for creating publishers generally and I have been working to expose more of the advanced features within Nav2's LifecycleNode. Including among them qos_overriding_options for overriding the QoS policies based on a single parameter allow_parameter_qos_overrides.
I found that generally this works fine and there is no issue in the lifecycle transition functions. However, when using create_publisher in the callback of a dynamic parameter to reinitialize an object, the program deadlocks at rclcpp::create_publisher.
What's interesting is that in all cases, these publishers previously existed so the parameters should have already been declared that this logic is declare or getting. That makes me think that (a) its declaring again and that causes a problem or (b) the get logic is wrong and this is being uncovered by running this 2x.
I suspect this is also true of create_subscription, but create_publisher is the only one I was debugging at the moment. I see some tests passing in my refactor with subscriptions interestingly enough, but I'm not sure if that is because we didn't test them thoroughly enough or it really is only create_publisher that has this error
Expected behavior
Publisher is created and program can continue as normal
Actual behavior
Publisher is created and program is permanently deadlocked
Additional information
No response
- Dominant language
- C++
- Stars
- 829
- Forks
- 587
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 30
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing 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.
More from ros2/rclcpp
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
-
Memory grows per callback group created and destroyed on long lived nodesPossibly taken @jwallace42 claimed this 1 day ago. Openbug
Difficulty 4/5 3-5 days Newbie friendliness 28/100
ros2/rclcpp#3428 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
removing and immediately re-adding a node to the EventsCBGExecutor leaves its entities unregisteredPossibly taken @skyegalaxy claimed this 10 days ago. Openbug
ros2/rclcpp#3418 · 1 assignee ·
Maintainers usually reply within 1 day
-
[Humble] Removing a node with more than one auto-added callback group leaves a dangling guard condition in the executorPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 4/5 3-5 days Newbie friendliness 55/100
ros2/rclcpp#3410 · 2 comments ·
Maintainers usually reply within 1 day
Similar issues
-
bug
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
EchoTools/nevr-runtime#2912 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day
-
category:port-update
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 2 days
-
bug-unconfirmed
Difficulty 1/5 Under an hour Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
libc++
Difficulty 1/5 Under an hour Newbie friendliness 88/100
llvm/llvm-project#246508 ·
Maintainers usually reply within 1 day