Repository navigation
jazzy, lyrical, rolling: fix class_loader exit abort (console_bridge static order) - #243
Tobias-Fischer wants to merge 1 commit into
Conversation
…l exit On exit, class_loader's static ClassLoaderPtrVectorImpl destroys the still-held ClassLoaders, and ~ClassLoader() logs through console_bridge, whose output handler (a function-local static) can already be gone: "mutex lock failed", std::terminate, exit 134 (e.g. `rqt --list-plugins` on macOS). ClassLoaderDependency() already orders class_loader's own statics before class_loader_ptrs_; console_bridge::getLogLevel() there does the same for console_bridge's. Same change as ros/class_loader#252. humble's class_loader 2.2.0 has no ClassLoaderDependency and doesn't abort. lyrical/rolling: the previous patch only made getAvailableClassesForLibrary's loader const, which upstream already has in 2.9.4/3.0.2 (on rolling it applied with an offset to another occurrence); it is replaced by this fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ABI check (linux-64)jazzy linux-64: 2 can be bumped on their own2 packages can be bumped on their own (compatible: 2)
Compared with the newest builds on https://conda.anaconda.org/robostack-jazzy/linux-64. lyrical linux-64: **1 need their dependents rebuilt**, 6 can be bumped on their own
6 packages can be bumped on their own (compatible: 6)
Compared with the newest builds on https://repo.prefix.dev/robostack-lyrical/linux-64. rolling linux-64: **1 need their dependents rebuilt**, 1 to review (changed headers), 5 can be bumped on their own
5 packages can be bumped on their own (compatible: 5)
Compared with the newest builds on https://repo.prefix.dev/robostack-rolling/linux-64. About this checkEach package this pull request built, compared with its newest released build (
Exported symbols are compared (the released packages are stripped, so struct layouts aren't); unchanged installed headers rule out layout and inline changes, changed ones are listed for review. Dependents to rebuild are the released ones linking to a changed library. A changed pin is part of the comparison. |
traversaro
left a comment
There was a problem hiding this comment.
Good to go for me, but those are the classical issues that it is quite easy to regress on. If the agent could find a test that captures this problem so we make sure we do not regress, it would be great.
On macOS, processes that still hold `ClassLoader`s at exit abort, for example `rqt --list-plugins` and closing rqt: `mutex lock failed`, then `std::terminate` and exit code 134.
Cause: class_loader's static `ClassLoaderPtrVectorImpl` destroys the remaining loaders at exit. `~ClassLoader()` logs through console_bridge, whose output handler (a function-local static) has already been destroyed by then. `ClassLoaderDependency()` already makes sure class_loader's own statics outlive `class_loader_ptrs_`. Calling `console_bridge::getLogLevel()` there does the same for console_bridge's.
Fix: the same one-line change as ros/class_loader#252, as `patch/ros2-class-loader.patch` with build-number bumps:
Tested on osx-arm64: built all three. `rqt --list-plugins`, run offscreen, exits with 134 using the published class_loader and 0 with the patched one, on lyrical and rolling. Jazzy was checked the same way earlier.
🤖 Generated with Claude Code