felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Felix Meschberger (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (FELIX-2391) Potential dead locking issue in OsgiManager.init
Date Wed, 16 Jun 2010 08:44:22 GMT

     [ https://issues.apache.org/jira/browse/FELIX-2391?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Felix Meschberger resolved FELIX-2391.

    Resolution: Fixed

Committed the attached patch in Rev. 955159: Move initialization of console provided plugins
to the constructor and only bind to the Http Service in the init method. Likewise move cleanup
to the dispose method and only dispose off bound (external) services in the destroy method.
Further improve concurrency behaviour with the registered plugins.

> Potential dead locking issue in OsgiManager.init
> ------------------------------------------------
>                 Key: FELIX-2391
>                 URL: https://issues.apache.org/jira/browse/FELIX-2391
>             Project: Felix
>          Issue Type: Improvement
>          Components: Web Console
>    Affects Versions: webconsole-3.0.0
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: webconsole-3.1.2
>         Attachments: FELIX-2391.patch
> The OsgiManager.init method is called when the OSGiManager is registered with the OSGi
Http Service and is used to complete the setup of the web console. Some implementations of
the OSGi Http Service call the init method while holding a lock (this is an issue in itself,
see FELIX- for the case of the Felix implementation).
> The current OsgiManager.init methods loads and initializes all predefined plugins and
configuration printers. This may involve registering services, thus calling into the framework.
This is a problematic thing while holding a lock.
> We have experienced a complex dead lock situation with this setup involving bundle installations,
configuration updates and web console startup.
> To fix this issue, the main setup (and diposal) of the console should be moved:
>   * from the init method to the constructor, except recording the ServletContext
>   * from the destroy method to the dispose method, except resetting the ServletContext
> The ServletContext may lazily be set on the init method after actual internal setup because
plugin services are only actually accessed and initialized (init() called) when really needed,
which always takes place after init.
> On the other hand, the destroy() method must make sure that all plugins which are already
initialized are destroyed since the servlet context is being taken away.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message