This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | DB Explorer calls swing out of EDT causing deadlock | ||
---|---|---|---|
Product: | db | Reporter: | euswdwj |
Component: | Code | Assignee: | matthias42 |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | brettryan, jonguymer, jrechtacek, tijet |
Priority: | P3 | ||
Version: | 8.0 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 208196 |
Attachments: |
stacktrace
stacktrace stacktrace |
Description
euswdwj
2014-04-10 23:56:14 UTC
Created attachment 146681 [details]
stacktrace
IMHO the problem is on line org.netbeans.modules.db.explorer.action.RecreateTableAction$1.run(RecreateTableAction.java:129) being called in request processor thread instead of in AWT EDT. That causes deadlocks. I was unable to reproduce. If somebody had sure steps to reproduce, please write it here. Also it's not easy to switch it to AWT EDT, cause there is a check on it. Created attachment 149385 [details]
stacktrace
Used the "Recreate Table..." function for a h2 database.
Created attachment 152052 [details]
stacktrace
Deadlock appreared when I invoke Recreate table in DB explorer|Tables node.
Found one Java-level deadlock:
=============================
"Default RequestProcessor":
waiting to lock monitor 0x00007feacca6f108 (object 0x00000007fe02eec0, a java.lang.Object),
which is held by "AWT-EventQueue-0"
"AWT-EventQueue-0":
waiting to lock monitor 0x00007feaca576ed8 (object 0x00000007c0176730, a java.awt.Component$AWTTreeLock),
which is held by "Default RequestProcessor"
Java stack information for the threads listed above:
===================================================
"Default RequestProcessor":
at com.apple.laf.AquaFileSystemModel.getRowCount(AquaFileSystemModel.java:194)
- waiting to lock <0x00000007fe02eec0> (a java.lang.Object)
at javax.swing.JTable.getRowCount(JTable.java:2662)
at javax.swing.plaf.basic.BasicTableUI.createTableSize(BasicTableUI.java:1692)
at javax.swing.plaf.basic.BasicTableUI.getPreferredSize(BasicTableUI.java:1733)
at javax.swing.JComponent.getPreferredS
I just pushed this fix: http://hg.netbeans.org/core-main/rev/80aef89189c9 The stacktraces consistently point to the FileChooser code and indeed the file chooser is invoked outside the EDT. I reworked that code so that the Swing interaction happens on the EDT, while the DB tasks are dispatched off the EDT. This bug looks like it only affects Mac OS X (all stacktraces lock in com.apple.laf.AquaFileSystemModel.getRowCount) - so while I checked it to still work on linux, please verify on Mac OS X. Thank you! Integrated into 'main-silver', will be available in build *201502230001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/80aef89189c9 User: Matthias Blaesing <matthias42@netbeans.org> Log: #243747: correct swing EDT handling in RecreateTableAction and remove now uncessary helper class |