Logger::set_level does not lock the logging mutex
Open
Nobody has claimed this yet.
help wanted
- Dominant language
- C++
- Stars
- 805
- Forks
- 564
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 27
Description
Shouldn't set_level() also lock the global logging mutex?
Since it writes to the rcutils hashmap, which has no locks (see also https://github.com/ros2/rcutils/issues/397).
See also get_child() which does lock:
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 in rclcpp/src/rclcpp/logger.cpp at Logger::set_level(), then compare its synchronization with get_child(). Review the linked rcutils hashmap locking concern and confirm that the level update is protected by the global logging mutex; done means the write no longer races with other logging operations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100