Marcel Hanser created ARIES-867:
-----------------------------------
Summary: Deadlock if stopping a blueprint bundle while the
blueprint container is in the create state.
Key: ARIES-867
URL: https://issues.apache.org/jira/browse/ARIES-867
Project: Aries
Issue Type: Bug
Components: Blueprint
Affects Versions: blueprint-0.3.1
Environment: Felix 4.0.2, Fileinstall 3.2.4, Pax Logging 1.6.3.
Reporter: Marcel Hanser
Attachments: com.test.deadlock.1.blueprint-0.0.1-SNAPSHOT.jar,
com.test.deadlock.2.stopper-0.0.1-SNAPSHOT.jar, felix-framework-4.0.2.zip
Assume a updating mechanism which installs a bundle using fileinstall. It
places a bundle in a folder watched by fileinstall. If the bundle is removed in
a short manner a deadlock may occur. This issue can occur if a bundles
blueprintcontainer is registering services during the create state and the
bundle is stopped concurrently. See attached Threaddump. We also attached a
sample environment to reproduce the deadlock.
For reproduction:
- start the container in debug mode.
- put the com.test.deadlock.1.blueprint-0.0.1-SNAPSHOT.jar into the ./load
folder and wait for GRACE_PERIOD state of the blueprint container.
- set breakpoint on line 3205 in class org.apache.felix.framework.Felix.
- put the com.test.deadlock.2.stopper-0.0.1-SNAPSHOT.jar into the ./load folder.
- skip the breakpoint the FIRST time!
- remove the com.test.deadlock.1.blueprint-0.0.1-SNAPSHOT.jar from ./load
folder, fileinstall will now remove the bundle, wait a until fileinstall loggs
the that.
- resuming now the debugger. This leads to the deadlock and to the attached
thread dump.
Richard S.Hall does describe the problem in the comment here:
https://issues.apache.org/jira/browse/FELIX-3393?focusedCommentId=13244548&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13244548
You might consider to register services in a <code>open call</code>, if easily
possible.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira