gpt4 book ai didi

java - Jruby 堆转储失败

转载 作者:行者123 更新时间:2023-12-02 04:43:16 26 4
gpt4 key购买 nike

我正在使用 Jruby 和 Puma 运行应用程序。我们有一个潜在的内存泄漏问题,我想生成一个堆转储以便我可以调试。我的本地环境正在运行 Linux Mint 17。我运行了以下命令:

jmap -histo:live 6450

这导致了:

6450: 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

我也尝试过这个:

jmap -dump:live,format=b,file=heap.bin 6450

结果

6450: Unable to open socket file: target process not responding or HotSpot VM not loaded

正如 propmt 所建议的那样,我尝试使用 -F 标志运行:

jmap -F -dump:live,format=b,file=heap.bin 6450
Attaching to process ID 6450, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.45-b02
Dumping heap to heap.bin ...
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at sun.tools.jmap.JMap.runTool(JMap.java:201)
at sun.tools.jmap.JMap.main(JMap.java:130)
Caused by: sun.jvm.hotspot.utilities.AssertionFailure: can not get class data for java/lang/UNIXProcess$Platform$$Lambda$10x0000000100393428
at sun.jvm.hotspot.utilities.Assert.that(Assert.java:32)
at sun.jvm.hotspot.utilities.HeapHprofBinWriter.writeInstance(HeapHprofBinWriter.java:803)
at sun.jvm.hotspot.utilities.AbstractHeapGraphWriter$1.doObj(AbstractHeapGraphWriter.java:95)
at sun.jvm.hotspot.oops.ObjectHeap.iterateLiveRegions(ObjectHeap.java:353)
at sun.jvm.hotspot.oops.ObjectHeap.iterate(ObjectHeap.java:171)
at sun.jvm.hotspot.utilities.AbstractHeapGraphWriter.write(AbstractHeapGraphWriter.java:51)
at sun.jvm.hotspot.utilities.HeapHprofBinWriter.write(HeapHprofBinWriter.java:433)
at sun.jvm.hotspot.tools.HeapDumper.run(HeapDumper.java:62)
at sun.jvm.hotspot.tools.Tool.startInternal(Tool.java:260)
at sun.jvm.hotspot.tools.Tool.start(Tool.java:223)
at sun.jvm.hotspot.tools.Tool.execute(Tool.java:118)
at sun.jvm.hotspot.tools.HeapDumper.main(HeapDumper.java:83)
... 6 more`

有人对如何解决这些错误并生成堆转储有任何建议吗?我也尝试过使用 jvisualvm 和 Eclipse Memory Analyzer 来生成堆转储,并且遇到了同样的问题。

最佳答案

这看起来像是 jdk 1.8_45 中的 JVM 错误,请参阅此链接以获取更多信息

https://bugs.openjdk.java.net/browse/JDK-8065318

关于java - Jruby 堆转储失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29932014/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com