JDK-8259008 : ArithmeticException was thrown at "Monitor Cache Dump" on HSDB
  • Type: Bug
  • Component: hotspot
  • Sub-Component: svc-agent
  • Affected Version: 16
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-12-30
  • Updated: 2023-09-25
  • Resolved: 2021-01-30
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 17
17 b08Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
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. It has changed `ObjectSynchronizer`, but it has not changed SA code.
Comments
The iterator code that was added here is broken, but effectively unused. See JDK-8316417.
25-09-2023

Changeset: 6b24e98c Author: Yasumasa Suenaga <ysuenaga@openjdk.org> Date: 2021-01-30 03:46:23 +0000 URL: https://git.openjdk.java.net/jdk/commit/6b24e98c
30-01-2021