Deadlock in MultiThreadedHttpConnectionManager.shutdown

Solution Unverified - Updated -

Issue

  • We see a deadlock like below in MultiThreadedHttpConnectionManager.shutdown
"ODEServer-570":
  waiting to lock Monitor@0x000000007794d7d8 (Object@0x00000004ea9810f0, a java/util/HashMap),
  which is held by "ServerService Thread Pool -- 90"
"ServerService Thread Pool -- 90":
  waiting to lock Monitor@0x000000006e9756f8 (Object@0x00000004eb0f6288, a org/apache/commons/httpclient/MultiThreadedHttpConnectionManager$ConnectionPool),
  which is held by "ODEServer-570"

Thread 388: (state = BLOCKED)
 - org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.shutdown() @bci=7, line=276 (Interpreted frame)
 - org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.shutdownAll() @bci=56, line=129 (Interpreted frame)
 - org.apache.axis2.transport.http.AxisServlet.destroy() @bci=46, line=523 (Interpreted frame)
 - org.apache.ode.axis2.hooks.ODEAxisServlet.destroy() @bci=1, line=67 (Interpreted frame)
 - sun.reflect.NativeMethodAccessorImpl.invoke0(java.lang.reflect.Method, java.lang.Object, java.lang.Object[]) @bci=0 (Interpreted frame)
 - sun.reflect.NativeMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) @bci=87, line=57 (Interpreted frame)
 - sun.reflect.DelegatingMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) @bci=6, line=43 (Compiled frame)
 - java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) @bci=57, line=606 (Compiled frame)
 - org.apache.catalina.security.SecurityUtil$1.run() @bci=12, line=264 (Interpreted frame)
 - org.apache.catalina.security.SecurityUtil$1.run() @bci=1, line=262 (Interpreted frame)
 - java.security.AccessController.doPrivileged(java.security.PrivilegedExceptionAction, java.security.AccessControlContext) @bci=0 (Interpreted frame)
 - javax.security.auth.Subject.doAsPrivileged(javax.security.auth.Subject, java.security.PrivilegedExceptionAction, java.security.AccessControlContext) @bci=59, line=536 (Interpreted frame)
 - org.apache.catalina.security.SecurityUtil.execute(java.lang.reflect.Method, java.lang.Object, java.lang.Object[], java.security.Principal) @bci=136, line=296 (Interpreted frame)
 - org.apache.catalina.security.SecurityUtil.doAsPrivilege(java.lang.String, javax.servlet.Servlet, java.lang.Class[], java.lang.Object[], java.security.Principal) @bci=74, line=156 (Interpreted frame)
 - org.apache.catalina.security.SecurityUtil.doAsPrivilege(java.lang.String, javax.servlet.Servlet) @bci=5, line=87 (Interpreted frame)
 - org.apache.catalina.core.StandardWrapper.unload() @bci=49, line=1369 (Interpreted frame)
 - org.apache.catalina.core.StandardWrapper.stop() @bci=49, line=1669 (Interpreted frame)
 - org.apache.catalina.core.StandardContext.stop() @bci=110, line=3906 (Interpreted frame)
 - org.jboss.as.web.deployment.WebDeploymentService.doStop() @bci=19, line=171 (Interpreted frame)
...
Thread 387: (state = BLOCKED)
 - org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.removeReferenceToConnection(org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionWithReference) @bci=6, line=233 (Interpreted frame)
 - org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.access$1300(org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionWithReference) @bci=1, line=65 (Interpreted frame)
 - org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$ConnectionPool.freeConnection(org.apache.commons.httpclient.HttpConnection) @bci=140, line=1005 (Interpreted frame)
 - org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.releaseConnection(org.apache.commons.httpclient.HttpConnection) @bci=34, line=643 (Interpreted frame)
 - org.apache.commons.httpclient.HttpConnection.releaseConnection() @bci=52, line=1179 (Interpreted frame)
 - org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.releaseConnection() @bci=25, line=1423 (Interpreted frame)
 - org.apache.commons.httpclient.HttpMethodBase.ensureConnectionRelease() @bci=11, line=2430 (Interpreted frame)
 - org.apache.commons.httpclient.HttpMethodBase.responseBodyConsumed() @bci=113, line=2422 (Interpreted frame)
 - org.apache.commons.httpclient.HttpMethodBase$1.responseConsumed() @bci=4, line=1892 (Interpreted frame)
 - org.apache.commons.httpclient.AutoCloseInputStream.notifyWatcher() @bci=27, line=198 (Interpreted frame)
 - org.apache.commons.httpclient.AutoCloseInputStream.close() @bci=13, line=158 (Interpreted frame)
 - org.apache.commons.httpclient.HttpMethodBase.releaseConnection() @bci=11, line=1181 (Interpreted frame)
 - org.apache.axis2.transport.http.CommonsHTTPTransportSender.cleanup(org.apache.axis2.context.MessageContext) @bci=15, line=84 (Interpreted frame)
...

Environment

  • JBoss Enterprise Application Platform (EAP)
  • Java
  • Apache commons httpclient

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.