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

Martin Kouba (JIRA) issues at jboss.org
Wed Jan 20 02:26:00 EST 2016


    [ https://issues.jboss.org/browse/WFLY-5604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13150976#comment-13150976 ] 

Martin Kouba commented on WFLY-5604:
------------------------------------

For the record, this was a regression introduced by the fix for WFLY-5232 (the cleanup was originally performed in {{WeldBootstrapService.stop()}}).

> 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
>             Fix For: 10.0.0.CR5
>
>
> 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