jstack -l 失效 -F NPE

线上一个IM机器 不停fullgc CPU load 上升,HEAP space 100% used

环境信息

java version "1.6.0_27-ea"
Java(TM) SE Runtime Environment (build 1.6.0_27-ea-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.2-b03, mixed mode)

问题定位

jstack -l $(pgrep java)

半天不响应,换-F模式

jstack -F $(pgrep java)

控制台报NPE(NullPointException),所有dump后的线程状态全部为BLOCKED:

Deadlock Detection:

Can't print deadlocks:null
Thread 6125: (state = BLOCKED)
 - sun.net.www.http.KeepAliveCache.get(java.net.URL, java.lang.Object) @bci=0, line=133 (Compiled frame)
 - sun.net.www.http.HttpClient.New(java.net.URL, java.net.Proxy, int, boolean) @bci=20, line=294 (Compiled frame)
 - sun.net.www.http.HttpClient.New(java.net.URL, java.net.Proxy, int) @bci=4, line=324 (Compiled frame)
 - sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(java.net.URL, java.net.Proxy, int) @bci=3, line=970 (Compiled frame)
 - sun.net.www.protocol.http.HttpURLConnection.plainConnect() @bci=236, line=911 (Compiled frame)
 - sun.net.www.protocol.http.HttpURLConnection.connect() @bci=1, line=836 (Compiled frame)
 - sun.net.www.protocol.http.HttpURLConnection.getOutputStream() @bci=134, line=1014 (Compiled frame)
 - com.caucho.hessian.client.HessianURLConnection.getOutputStream() @bci=4, line=97 (Compiled frame)
 - com.caucho.hessian.client.HessianProxy.sendRequest(java.lang.String, java.lang.Object[]) @bci=31, line=279 (Compiled frame)
 - com.caucho.hessian.client.HessianProxy.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[]) @bci=388, line=171 (Compiled frame)
 - $Proxy5.getTokenByUid(java.lang.String) @bci=16 (Compiled frame)
 - com.uplus.im.websock.session.WebSockSession.onTextMessage(java.nio.CharBuffer) @bci=64, line=66 (Compiled frame)
 - org.apache.catalina.websocket.MessageInbound.onTextData(java.io.Reader) @bci=80, line=74 (Compiled frame)
 - org.apache.catalina.websocket.StreamInbound.doOnTextData(java.io.Reader) @bci=19, line=187 (Compiled frame)
 - org.apache.catalina.websocket.StreamInbound.onData() @bci=88, line=135 (Compiled frame)
 - org.apache.coyote.http11.upgrade.UpgradeProcessor.upgradeDispatch() @bci=4, line=83 (Interpreted frame)
 - org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(org.apache.tomcat.util.net.SocketWrapper, org.apache.tomcat.util.net.SocketStatus) @bci=146, line=587 (Interpreted frame)
 - org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run() @bci=129, line=1686 (Compiled frame)
 - java.util.concurrent.ThreadPoolExecutor$Worker.runTask(java.lang.Runnable) @bci=59, line=886 (Compiled frame)
 - java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=28, line=908 (Compiled frame)
 - java.lang.Thread.run() @bci=11, line=662 (Interpreted frame)


Thread 6124: (state = BLOCKED)
 - sun.net.www.http.KeepAliveCache.get(java.net.URL, java.lang.Object) @bci=0, line=133 (Compiled frame)
 - sun.net.www.http.HttpClient.New(java.net.URL, java.net.Proxy, int, boolean) @bci=20, line=294 (Compiled frame)
 - sun.net.www.http.HttpClient.New(java.net.URL, java.net.Proxy, int) @bci=4, line=324 (Compiled frame)
 - sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(java.net.URL, java.net.Proxy, int) @bci=3, line=970 (Compiled frame)
 - sun.net.www.protocol.http.HttpURLConnection.plainConnect() @bci=236, line=911 (Compiled frame)
 - sun.net.www.protocol.http.HttpURLConnection.connect() @bci=1, line=836 (Compiled frame)
 - sun.net.www.protocol.http.HttpURLConnection.getOutputStream() @bci=134, line=1014 (Compiled frame)
 - com.caucho.hessian.client.HessianURLConnection.getOutputStream() @bci=4, line=97 (Compiled frame)
 - com.caucho.hessian.client.HessianProxy.sendRequest(java.lang.String, java.lang.Object[]) @bci=31, line=279 (Compiled frame)
 - com.caucho.hessian.client.HessianProxy.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[]) @bci=388, line=171 (Compiled frame)
 - $Proxy5.getTokenByUid(java.lang.String) @bci=16 (Compiled frame)
 - com.uplus.im.websock.session.WebSockSession.onTextMessage(java.nio.CharBuffer) @bci=64, line=66 (Compiled frame)
 - org.apache.catalina.websocket.MessageInbound.onTextData(java.io.Reader) @bci=80, line=74 (Compiled frame)
 - org.apache.catalina.websocket.StreamInbound.doOnTextData(java.io.Reader) @bci=19, line=187 (Compiled frame)
 - org.apache.catalina.websocket.StreamInbound.onData() @bci=88, line=135 (Compiled frame)
 - org.apache.coyote.http11.upgrade.UpgradeProcessor.upgradeDispatch() @bci=4, line=83 (Interpreted frame)
 - org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(org.apache.tomcat.util.net.SocketWrapper, org.apache.tomcat.util.net.SocketStatus) @bci=146, line=587 (Interpreted frame)
 - org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run() @bci=129, line=1686 (Compiled frame)
 - java.util.concurrent.ThreadPoolExecutor$Worker.runTask(java.lang.Runnable) @bci=59, line=886 (Compiled frame)
 - java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=28, line=908 (Compiled frame)
 - java.lang.Thread.run() @bci=11, line=662 (Interpreted frame)

不知道是不是bug, 升级JDK后等下次情况出现。
https://bugs.openjdk.java.net/browse/JDK-6370241
http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6370241

你可能感兴趣的:(jstack -l 失效 -F NPE)