← Back to team overview

openjdk team mailing list archive

Bug#787955: Backtrace for OpenJDK8 deadlocks with GTK UIs.

 

As you can see, the deadlock is somewhere in GTK native code:

"AWT-EventQueue-1" #17 prio=6 os_prio=0 tid=0x00007f53a85d9800
nid=0x6e1e runnable [0x00007f5376d98000]
   java.lang.Thread.State: RUNNABLE
    at com.sun.java.swing.plaf.gtk.GTKStyle.nativeGetClassValue(Native Method)
    at com.sun.java.swing.plaf.gtk.GTKStyle.getClassSpecificValue(GTKStyle.java:603)
    - locked <0x00000005ca601d88> (a java.lang.Object)
    at com.sun.java.swing.plaf.gtk.GTKStyle.getClassSpecificIntValue(GTKStyle.java:620)
    at com.sun.java.swing.plaf.gtk.GTKStyle.get(GTKStyle.java:791)
    at javax.swing.plaf.synth.SynthArrowButton$SynthArrowButtonUI.getPreferredSize(SynthArrowButton.java:106)
    at javax.swing.JComponent.getPreferredSize(JComponent.java:1662)
    at javax.swing.plaf.basic.BasicScrollBarUI.layoutVScrollbar(BasicScrollBarUI.java:662)
    at javax.swing.plaf.basic.BasicScrollBarUI.layoutContainer(BasicScrollBarUI.java:866)
    at javax.swing.plaf.basic.BasicScrollBarUI$ModelListener.stateChanged(BasicScrollBarUI.java:1054)
    at javax.swing.DefaultBoundedRangeModel.fireStateChanged(DefaultBoundedRangeModel.java:364)
    at javax.swing.DefaultBoundedRangeModel.setRangeProperties(DefaultBoundedRangeModel.java:302)
    at javax.swing.JScrollBar.setValues(JScrollBar.java:623)
    at javax.swing.plaf.basic.BasicScrollPaneUI.syncScrollPaneWithViewport(BasicScrollPaneUI.java:285)
    at javax.swing.plaf.basic.BasicScrollPaneUI$Handler.stateChanged(BasicScrollPaneUI.java:1039)
    at javax.swing.JViewport.fireStateChanged(JViewport.java:1369)
    at javax.swing.JViewport.setViewSize(JViewport.java:1021)
    at javax.swing.ViewportLayout.layoutContainer(ViewportLayout.java:201)
    at java.awt.Container.layout(Container.java:1510)
    at java.awt.Container.doLayout(Container.java:1499)
    at java.awt.Container.validateTree(Container.java:1695)
    at java.awt.Container.validateTree(Container.java:1704)
    at java.awt.Container.validate(Container.java:1630)
    - locked <0x00000005ca6018a0> (a java.awt.Component$AWTTreeLock)
    at javax.swing.JViewport.validateView(JViewport.java:482)
    at javax.swing.JViewport.scrollRectToVisible(JViewport.java:393)
    at javax.swing.JComponent.scrollRectToVisible(JComponent.java:3111)
    at javax.swing.JTable.changeSelection(JTable.java:2467)
    at javax.swing.plaf.basic.BasicTableUI$Handler.adjustSelection(BasicTableUI.java:1115)
    at javax.swing.plaf.basic.BasicTableUI$Handler.mousePressed(BasicTableUI.java:1038)
    at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:280)
    at java.awt.Component.processMouseEvent(Component.java:6532)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
    at java.awt.Component.processEvent(Component.java:6300)
    at java.awt.Container.processEvent(Container.java:2236)
    at java.awt.Component.dispatchEventImpl(Component.java:4891)
    at java.awt.Container.dispatchEventImpl(Container.java:2294)
    at java.awt.Component.dispatchEvent(Component.java:4713)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4522)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
    at java.awt.Container.dispatchEventImpl(Container.java:2280)
    at java.awt.Window.dispatchEventImpl(Window.java:2750)
    at java.awt.Component.dispatchEvent(Component.java:4713)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.awt.EventQueue$4.run(EventQueue.java:731)
    at java.awt.EventQueue$4.run(EventQueue.java:729)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
    at org.GNOME.Accessibility.AtkWrapper$5.dispatchEvent(AtkWrapper.java:697)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

There is a second thread waiting for the AWTTreeLock:
"Thread-1" #21 prio=5 os_prio=0 tid=0x00007f5304007000 nid=0x6e1f
waiting for monitor entry [0x00007f5376a9a000]
   java.lang.Thread.State: BLOCKED (on object monitor)
    at java.awt.Component.setFont(Component.java:1895)
    - waiting to lock <0x00000005ca6018a0> (a java.awt.Component$AWTTreeLock)
    at java.awt.Container.setFont(Container.java:1750)
    at javax.swing.JComponent.setFont(JComponent.java:2754)
    at javax.swing.table.DefaultTableCellRenderer.getTableCellRendererComponent(DefaultTableCellRenderer.java:230)
    at javax.swing.JTable$AccessibleJTable$AccessibleJTableCell.getCurrentAccessibleContext(JTable.java:7949)
    at javax.swing.JTable$AccessibleJTable$AccessibleJTableCell.getAccessibleAction(JTable.java:8221)

There is no further backtrace here, maybe this thread is triggered by GTK?

By any means, using the Java Metal style, the problem does not occur,
only in GTK PLAF.

Regards,
Erich


Follow ups