Apache Celix is a framework for C and C++14 to develop dynamic modular software applications using component and in-process service-oriented programming.
However, this issue is still not fixed (https://github.com/apache/celix/actions/runs/6032316074/job/16367552785), since its root cause is very special:
callCommand(ctx, "quit", true); workes by calling celix_bundleContext_stopBundle/celix_framework_stopBundleAsync via celix_bundleContext_useServiceWithOptions on the framework context to be stopped.
The culprit is the last celix_framework_fireGenericEvent in celix_bundleContext_useServiceWithOptions, which may leak an event carrying a reference to the framework instance, which has no chance to be processed (the event loop has already been stopped).
Note that calling celix_bundleContext_stopBundle/celix_framework_stopBundleAsync via celix_bundleContext_useServiceWithOptions on a normal bundle context is OK. Because celix_bundleActivator_stop of that bundle will synchronize with framework_shutdown.
That said, there is nothing to worry about using quit/stop command via TUI or within any other normal bundle.
This issue has been with us for a very long time, though recently it seldom reproduces. https://github.com/apache/celix/commit/b706d163543f403921498b5250244e561ad04298 has fixed a framework reference leak, which could lead to deadlock when shutting down a framework instance.
However, this issue is still not fixed (https://github.com/apache/celix/actions/runs/6032316074/job/16367552785), since its root cause is very special:
callCommand(ctx, "quit", true);
workes by callingcelix_bundleContext_stopBundle
/celix_framework_stopBundleAsync
viacelix_bundleContext_useServiceWithOptions
on the framework context to be stopped.The culprit is the last
celix_framework_fireGenericEvent
incelix_bundleContext_useServiceWithOptions
, which may leak an event carrying a reference to the framework instance, which has no chance to be processed (the event loop has already been stopped).Note that calling
celix_bundleContext_stopBundle
/celix_framework_stopBundleAsync
viacelix_bundleContext_useServiceWithOptions
on a normal bundle context is OK. Becausecelix_bundleActivator_stop
of that bundle will synchronize withframework_shutdown
.That said, there is nothing to worry about using
quit
/stop
command via TUI or within any other normal bundle.