线程在sun.misc.Unsafe.park等待

时间:2018-04-04 14:20:52

标签: java jboss threadpool visualvm

我在JBoss应用程序中遇到一个非常恼人的问题,系统在一天中的某些时候崩溃,我无法弄清楚原因。

通过VisualVM监控应用程序我可以看到一些线程正在等待我无法弄清楚的东西。

分析线程转储卡住的线程会收到以下日志:

"http-/0.0.0.0:8080-459" - Thread t@2309
   java.lang.Thread.State: WAITING
        at sun.misc.Unsafe.park(Native Method)
        - parking to wait for <105c9d1d> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
        at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
        at org.apache.http.pool.PoolEntryFuture.await(PoolEntryFuture.java:131)
        at org.apache.http.pool.AbstractConnPool.getPoolEntryBlocking(AbstractConnPool.java:281)
        at org.apache.http.pool.AbstractConnPool.access$000(AbstractConnPool.java:62)
        at org.apache.http.pool.AbstractConnPool$2.getPoolEntry(AbstractConnPool.java:176)
        at org.apache.http.pool.AbstractConnPool$2.getPoolEntry(AbstractConnPool.java:169)
        at org.apache.http.pool.PoolEntryFuture.get(PoolEntryFuture.java:100)
        at org.apache.http.impl.conn.PoolingClientConnectionManager.leaseConnection(PoolingClientConnectionManager.java:212)
        at org.apache.http.impl.conn.PoolingClientConnectionManager$1.getConnection(PoolingClientConnectionManager.java:199)
        at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:456)
        at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
        at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:827)
        at adapter.proxy.controller.ProxyServlet.service(ProxyServlet.java:291)
        at adapter.proxy.controller.Proxy.service(Proxy.java:46)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149)
        at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)
        at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)
        at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926)
        at java.lang.Thread.run(Thread.java:748)

   Locked ownable synchronizers:
        - None

我想要一些提示或工具,我可以用它来找出使应用程序挂起的原因。 如果我有必要提供更多信息,请询问。

下面的图片显示了系统的一些线程,其中几个处于状态“park”(橙色)的时刻是它挂起的时间。

Threads

0 个答案:

没有答案