[jboss-jira] [JBoss JIRA] (WFLY-5604) Weld deployment services not cleaned up properly if a deployment fails

Martin Kouba (JIRA) issues at jboss.org
Thu Oct 29 09:06:00 EDT 2015


Martin Kouba created WFLY-5604:
----------------------------------

             Summary: Weld deployment services not cleaned up properly if a deployment fails
                 Key: WFLY-5604
                 URL: https://issues.jboss.org/browse/WFLY-5604
             Project: WildFly
          Issue Type: Bug
          Components: CDI / Weld
    Affects Versions: 10.0.0.CR4
            Reporter: Martin Kouba
            Assignee: Martin Kouba


The cleanup is currently only performed as a part of {{org.jboss.as.weld.WeldStartService.stop(StopContext)}} invocation. However, if {{WeldStartService.start()}} fails (e.g. because of a validation error) the stop method is never invoked. Some Weld bootstrap services need to clean up resources even if the deployment fails, e.g. {{org.jboss.weld.bootstrap.events.ContainerLifecycleEvents}} (deactivable optimization) maintains a separate thread pool and so the referenced {{ExecutorService}} is never shut down explicitly and the only hope to free resources is the GC and finalizers whose execution is deferred and may never even occur.

We've run into this problem when executing Weld and CDI TCK test suites on a specific HP-UX machine. Both test suites contain a lot of scenarios where the deployment fails. HP-UX jvm cannot handle this load and the test suite fails with _"java.lang.OutOfMemoryError: unable to create new native thread"_.



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list