Repository navigation
Keep logging plugin loaded during process exit - #150
Quchaosheng wants to merge 4 commits into
Conversation
Signed-off-by: Chaosheng Qu <[email protected]>
Signed-off-by: Chaosheng Qu <[email protected]>
Signed-off-by: Chaosheng Qu <[email protected]>
Signed-off-by: Chaosheng Qu <[email protected]>
|
This change also fixes a second exit crash, and that one doesn't need the I opened #152 for that before I found this PR; it makes the same change. It adds |
This is the logging half of the exit-time
dlclose()crash tracked by ros2/rclcpp#2567 and ros2/rmw_implementation#301.rcl_logging_implementationregistered anatexithandler that released the logging plugin. During process teardown, thatdlclose()could unmap the DSO containing the handler while it was still returning, producing a SIGSEGV.Keep the logging plugin handle in a function-local allocation that is intentionally never destroyed, and stop registering the unload handler at process exit. Explicit
unload_logging_library()remains available for tests. The reload test shuts down the active implementation before explicit unload and then verifies a second initialization.Validation
Rpr__rcl_logging__ubuntu_resolute_amd64: passed (compile and test).Draft deliberately: this needs to land together with the matching
rmw_implementationchange, and that PR still has unrelated Fast DDS test failures to separate.