无法对我的java应用程序运行jstack -l

时间:2014-09-22 09:41:11

标签: java jvm jstack

我的应用程序卡住了,然后我想检查线程状态。但我无法从我的应用程序通过jstack -l 33822进行线程转储..

Unable to open socket file: target process not responding or HotSpot VM not loaded
The -F option can be used when the target process is not responding

然后我使用-F尝试进行线程转储。我收到如下错误:

    Attaching to process ID 33822, please wait...
    Debugger attached successfully.
    Server compiler detected.
    JVM version is 23.21-b01
    Deadlock Detection:
    sun.jvm.hotspot.debugger.UnmappedAddressException: 3780320
            at sun.jvm.hotspot.debugger.PageCache.checkPage(PageCache.java:208)
            at sun.jvm.hotspot.debugger.PageCache.getData(PageCache.java:63)
            at sun.jvm.hotspot.debugger.DebuggerBase.readBytes(DebuggerBase.java:217)
            at sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal.readCInteger(LinuxDebuggerLocal.java:482)
            at sun.jvm.hotspot.debugger.DebuggerBase.readCompOopAddressValue(DebuggerBase.java:459)
            at sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal.readCompOopHandle(LinuxDebuggerLocal.java:442)
            at sun.jvm.hotspot.debugger.linux.LinuxAddress.getCompOopHandleAt(LinuxAddress.java:125)
            at sun.jvm.hotspot.oops.Oop.getKlassForOopHandle(Oop.java:231)
            at sun.jvm.hotspot.oops.ObjectHeap.newOop(ObjectHeap.java:380)
            at sun.jvm.hotspot.runtime.JavaThread.getThreadObj(JavaThread.java:331)
            at sun.jvm.hotspot.runtime.JavaThread.getCurrentParkBlocker(JavaThread.java:383)
            at sun.jvm.hotspot.runtime.DeadlockDetector.print(DeadlockDetector.java:82)
            at sun.jvm.hotspot.runtime.DeadlockDetector.print(DeadlockDetector.java:39)
            at sun.jvm.hotspot.tools.StackTrace.run(StackTrace.java:52)
            at sun.jvm.hotspot.tools.StackTrace.run(StackTrace.java:45)
            at sun.jvm.hotspot.tools.JStack.run(JStack.java:60)
            at sun.jvm.hotspot.tools.Tool.start(Tool.java:221)
            at sun.jvm.hotspot.tools.JStack.main(JStack.java:86)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:601)
            at sun.tools.jstack.JStack.runJStackTool(JStack.java:136)
            at sun.tools.jstack.JStack.main(JStack.java:102)
    sun.jvm.hotspot.debugger.UnmappedAddressException: 10
            at sun.jvm.hotspot.debugger.PageCache.checkPage(PageCache.java:208)
            at sun.jvm.hotspot.debugger.PageCache.getData(PageCache.java:63)
            at sun.jvm.hotspot.debugger.DebuggerBase.readBytes(DebuggerBase.java:217)
            at sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal.readCInteger(LinuxDebuggerLocal.java:482)
            at sun.jvm.hotspot.debugger.DebuggerBase.readCompOopAddressValue(DebuggerBase.java:459)
            at sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal.readCompOopHandle(LinuxDebuggerLocal.java:442)
            at sun.jvm.hotspot.debugger.linux.LinuxAddress.getCompOopHandleAt(LinuxAddress.java:125)
            at sun.jvm.hotspot.oops.Oop.getKlassForOopHandle(Oop.java:231)
            at sun.jvm.hotspot.oops.ObjectHeap.newOop(ObjectHeap.java:356)
            at sun.jvm.hotspot.oops.NarrowOopField.getValue(NarrowOopField.java:44)
            at sun.jvm.hotspot.oops.OopUtilities.threadOopGetParkBlocker(OopUtilities.java:294)
            at sun.jvm.hotspot.runtime.JavaThread.getCurrentParkBlocker(JavaThread.java:385)
            at sun.jvm.hotspot.runtime.DeadlockDetector.print(DeadlockDetector.java:82)
            at sun.jvm.hotspot.runtime.DeadlockDetector.print(DeadlockDetector.java:39)
            at sun.jvm.hotspot.tools.StackTrace.run(StackTrace.java:52)
            at sun.jvm.hotspot.tools.StackTrace.run(StackTrace.java:45)
            at sun.jvm.hotspot.tools.JStack.run(JStack.java:60)
            at sun.jvm.hotspot.tools.Tool.start(Tool.java:221)
            at sun.jvm.hotspot.tools.JStack.main(JStack.java:86)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:601)
            at sun.tools.jstack.JStack.runJStackTool(JStack.java:136)
            at sun.tools.jstack.JStack.main(JStack.java:102)
    Can't print deadlocks:10

它是JVM的defect吗?

1 个答案:

答案 0 :(得分:1)

你确定还没有发生过threaddump吗?我们收到此错误,但在等待一小段时间后仍然会收到一个线程转储