RFR: 8259008: ArithmeticException was thrown at "Monitor Cache Dump" on HSDB [v6]
David Holmes
dholmes at openjdk.java.net
Wed Jan 27 04:53:45 UTC 2021
On Wed, 27 Jan 2021 00:59:59 GMT, Yasumasa Suenaga <ysuenaga at openjdk.org> wrote:
>> I saw the exception as following when I chose "Monitor Cache Dump" menu on HSDB:
>>
>> Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
>> at jdk.hotspot.agent/sun.jvm.hotspot.ui.MonitorCacheDumpPanel.dumpOn(MonitorCacheDumpPanel.java:92)
>> at jdk.hotspot.agent/sun.jvm.hotspot.ui.MonitorCacheDumpPanel.<init>(MonitorCacheDumpPanel.java:59)
>> at jdk.hotspot.agent/sun.jvm.hotspot.HSDB.showMonitorCacheDumpPanel(HSDB.java:1556)
>> at jdk.hotspot.agent/sun.jvm.hotspot.HSDB$16.actionPerformed(HSDB.java:338)
>> at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)
>> at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2313)
>> 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.AbstractButton.doClick(AbstractButton.java:374)
>> at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1022)
>> at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1066)
>> at java.desktop/java.awt.Component.processMouseEvent(Component.java:6617)
>> at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
>> at java.desktop/java.awt.Component.processEvent(Component.java:6382)
>> at java.desktop/java.awt.Container.processEvent(Container.java:2264)
>> at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4993)
>> at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2322)
>> at java.desktop/java.awt.Component.dispatchEvent(Component.java:4825)
>> at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4934)
>> at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4563)
>> at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4504)
>> at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2308)
>> at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2773)
>> at java.desktop/java.awt.Component.dispatchEvent(Component.java:4825)
>> 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:391)
>> 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:391)
>> 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)
>> Caused by: java.lang.ArithmeticException: / by zero
>> at jdk.hotspot.agent/sun.jvm.hotspot.runtime.ObjectSynchronizer.initialize(ObjectSynchronizer.java:55)
>> at jdk.hotspot.agent/sun.jvm.hotspot.runtime.ObjectSynchronizer$1.update(ObjectSynchronizer.java:40)
>> at jdk.hotspot.agent/sun.jvm.hotspot.runtime.VM.registerVMInitializedObserver(VM.java:578)
>> at jdk.hotspot.agent/sun.jvm.hotspot.runtime.ObjectSynchronizer.<clinit>(ObjectSynchronizer.java:38)
>> ... 41 more
>>
>> This exception seems to be caused by [JDK-8253064](https://bugs.openjdk.java.net/browse/JDK-8253064). It has changed `ObjectSynchronizer`, but it has not changed SA code.
>
> Yasumasa Suenaga has updated the pull request incrementally with one additional commit since the last revision:
>
> Update testcase
Hi Yasumasa,
I thought the comments regarding the test were to use an if statement to check iter.hasNext() and return after seeing one Monitor, rather than keeping the while-loop and reporting every single Monitor found. The latter seems a waste of timer as we don't know how many Monitors to expect, so it adds no value to report them all.
Cheers,
David
-------------
PR: https://git.openjdk.java.net/jdk/pull/1910
More information about the serviceability-dev
mailing list