Using an EE concurrency executor causes classloader leak from leftover contextClassLoader references

Solution Unverified - Updated

Environment

  • JBoss Enterprise Application Platform (EAP) 7.2.0 and earlier

Issue

  • We configure an executor within the ee subsystem and call this within our application:
<managed-executor-services>
    <managed-executor-service name="default" jndi-name="java:jboss/ee/concurrency/executor/default" context-service="default" hung-task-threshold="60000" keepalive-time="5000"/>
</managed-executor-services>
  • Redeploys of this application cause classloader leaks until an OutOfMemoryError occurs. The classloaders are still referenced as the contextClassLoader by ManagedExecutorService threads.

Resolution

  • Upgrade to 7.2.1+

Root Cause

Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.