PengZheng opened a new issue, #629:
URL: https://github.com/apache/celix/issues/629

   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, since its root cause is very special:
   calling `celix_bundleContext_stopBundle`/`celix_framework_stopBundleAsync` 
via `celix_bundleContext_useServiceWithOptions` on the framework instance 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**(non-framework) 
bundle 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 is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@celix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to