Open bjetal opened 4 years ago
We have a local fix which involves changing the concurrency management in JavaEEExtender to use a ReadWriteLock and treating deploy and undeploy as reads, with start and stop treated as writes (instead of strict monitor synchronization). This allows multiple deploys and undeploys to proceed in parallel and thus prevents the deadlock documented above.
When deploying and undeploying multiple OSGi bundles with Java EE functionality using Fighterfish, we sometimes get a deadlock between undeployment and deployment of the modules because undeployment locks the bundle first and then JavaEEExtender, while deployment locks JavaEEExtender and then the bundle.
The following fragment of a thread dump shows the issue: