Open MishkaMN opened 6 months ago
This issue occurs because plugin manager in subsystem controller depends on plugin_discovery topic to manage whether if a plugin is active or not. However, when a plugin is deactivated, its publisher gets deactivated too, so the plugin_discovery topic never receives the signal that it was deactivated. In order to handle this situation, 1) ros2_lifecycle base class should wait for its deriving nodes to finish its derived functions (handle_on_deactivate or on_plugin_deactivate etc) before deactivating publishers. This is so that the derived classes can publish its deactivated status before base class deactivates the publishers. 2) on each state transition of the plugins, they should publish its plugin status (active or not and available or not) to the discovery topic. 3) since a node can segfault and just exit, its lifecycle transition may not get picked up on the plugin_discovery topic. In that case, perhaps plugin_manager should also monitor outdated plugins and prune. We should still keep 2. so that we can get the status update immediately without waiting to prune with this 3. logic.
Summary
During VRU validation testing, it was discovered that some strategic plugins that failed to get configured or activated still publishes its capability to the plugin_discovery topic. This makes arbitrator to continuously call those plugins and time out repeatedly. From log:
Yet, the capability is available:
And this results in repeated time-outs (although it is also a design flaw to try 10 times with 0.5 timeout for strategic plugins):
Since the capability is published from base classes, this type of issue probably exist for tactical and control plugins as well, which needs to be verified.
Version
4.5.0 (Current)
Expected Behavior
Inactive plugins should not publish to discovery
Actual Behavior
See above.
Steps to Reproduce the Actual Behavior
Intentionally make some plugins inactive and engage carma-platform to see arbitrator still calling those plugins
Related Work
Jira: https://usdot-carma.atlassian.net/browse/CAR-6040 No response