您尚未登录。

#1 2020-05-14 17:05:26

zzkdev
会员
注册时间: 2019-08-03
帖子: 9

在 archlinux 中无法使用 hsdb

使用 hsdb 连接到目标进程会报以下错误

Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: Unable to deduce type of thread from address 0x00007fc30016f800 (expected type JavaThread, CompilerThread, ServiceThread, JvmtiAgentThread or CodeCacheSweeperThread)
        at jdk.hotspot.agent/sun.jvm.hotspot.runtime.Threads.createJavaThreadWrapper(Threads.java:172)
        at jdk.hotspot.agent/sun.jvm.hotspot.runtime.Threads.first(Threads.java:156)
        at jdk.hotspot.agent/sun.jvm.hotspot.ui.JavaThreadsPanel.cache(JavaThreadsPanel.java:463)
        at jdk.hotspot.agent/sun.jvm.hotspot.ui.JavaThreadsPanel.<init>(JavaThreadsPanel.java:89)
        at jdk.hotspot.agent/sun.jvm.hotspot.HSDB$45.run(HSDB.java:1380)
        at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
        at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Caused by: sun.jvm.hotspot.types.WrongTypeException: No suitable match for type of address 0x00007fc30016f800
        at jdk.hotspot.agent/sun.jvm.hotspot.runtime.InstanceConstructor.newWrongTypeException(InstanceConstructor.java:62)
        at jdk.hotspot.agent/sun.jvm.hotspot.runtime.VirtualConstructor.instantiateWrapperFor(VirtualConstructor.java:80)
        at jdk.hotspot.agent/sun.jvm.hotspot.runtime.Threads.createJavaThreadWrapper(Threads.java:168)
        ... 17 more

在 openjdk8 和 openjdk11 都有这个问题

查询网上资源之后看到,在 CentOS 出现这个问题可以安装 openjdk-debuginfo 包来解决,不知道 arch 上有没有相关的包?

离线

#2 2020-05-14 17:36:45

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,919
个人网站

Re: 在 archlinux 中无法使用 hsdb

Arch 官方不提供 debug 包。

离线

#3 2020-05-14 18:41:17

zzkdev
会员
注册时间: 2019-08-03
帖子: 9

Re: 在 archlinux 中无法使用 hsdb

编译了带调试符号的 jdk 就可以运行了,但是要手动管理好麻烦  sad

离线

#4 2020-05-14 19:41:03

zzkdev
会员
注册时间: 2019-08-03
帖子: 9

Re: 在 archlinux 中无法使用 hsdb

编译完之后,用 hsdb 查看 stack memory 的时候又抛了个异常... 这是要安装字体吗?

Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: Error looking up monospace font Courier
        at jdk.hotspot.agent/sun.jvm.hotspot.ui.AnnotatedMemoryPanel.init(AnnotatedMemoryPanel.java:312)
        at jdk.hotspot.agent/sun.jvm.hotspot.ui.AnnotatedMemoryPanel.<init>(AnnotatedMemoryPanel.java:103)
        at jdk.hotspot.agent/sun.jvm.hotspot.HSDB.showThreadStackMemory(HSDB.java:852)
        at jdk.hotspot.agent/sun.jvm.hotspot.ui.SAPanel.showThreadStackMemory(SAPanel.java:91)
        at jdk.hotspot.agent/sun.jvm.hotspot.ui.JavaThreadsPanel.fireShowThreadStackMemory(JavaThreadsPanel.java:425)
        at jdk.hotspot.agent/sun.jvm.hotspot.ui.JavaThreadsPanel.actionPerformed(JavaThreadsPanel.java:330)
        at jdk.hotspot.agent/com.sun.java.swing.action.DelegateAction.actionPerformed(DelegateAction.java:61)
        at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
        at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308)
        at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
        at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
        at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279)
        at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
        at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
        at java.desktop/java.awt.Component.processMouseEvent(Component.java:6632)
        at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
        at java.desktop/java.awt.Component.processEvent(Component.java:6397)
        at java.desktop/java.awt.Container.processEvent(Container.java:2263)
        at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5008)
        at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
        at java.desktop/java.awt.Component.dispatchEvent(Component.java:4840)
        at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
        at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
        at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
        at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
        at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2762)
        at java.desktop/java.awt.Component.dispatchEvent(Component.java:4840)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:389)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
        at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
        at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:389)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
        at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

最近编辑记录 zzkdev (2020-05-14 19:41:28)

离线

页脚