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

标签 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

defect吗? JVM?

最佳答案

你确定线程转储没有发生吗?我们收到此错误,但在短暂等待后我们仍然收到线程转储

关于java - 无法针对我的 java 应用程序运行 jstack -l,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25970990/

相关文章:

java - CMS 相对于 Java 的垃圾收集器意味着什么?

Java ConcurrentHashMap.keySet() 挂起

java - 我如何在 Room 中的对象中保留自定义对象

java - 为什么 JVM 不缓存 JIT 编译的代码?

java - 文章管理网站选择什么

java - 浪费内存来加速jvm

java - pyCharm调试: JRE without jstack?

java - jstack: "JNI global references"是什么意思?

java - 如何使我自己的通用结构具有动态比较器

java - 从 Java 调用 Minizinc 模型