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: | deadlock when resolve data sources | ||
---|---|---|---|
Product: | javaee | Reporter: | liujiaguang <liujiaguang> |
Component: | Code | Assignee: | John Baker <jbaker> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | alexpetrov, blaha, phejl, romanmostyka |
Priority: | P2 | Keywords: | THREAD |
Version: | 6.x | ||
Hardware: | PC | ||
OS: | Windows ME/2000 | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
the messages log file of 6.0rc1
deadlock_when_ResolveDataSources_1.png deadlock_when_ResolveDataSources_2.png deadlock_when_ResolveDataSources_3.png deadlock_when_ResolveDataSources_4.png thread dump |
Description
liujiaguang
2007-11-12 05:22:30 UTC
Created attachment 52857 [details]
the messages log file of 6.0rc1
Created attachment 52858 [details]
deadlock_when_ResolveDataSources_1.png
Created attachment 52859 [details]
deadlock_when_ResolveDataSources_2.png
Created attachment 52860 [details]
deadlock_when_ResolveDataSources_3.png
Created attachment 52861 [details]
deadlock_when_ResolveDataSources_4.png
Looks like the problem is in the db api. Can you provide thread dump (To generate a stack trace on Windows 95, or Windows NT platforms, enter the key sequence <ctrl><break> in the window where the Java program is running, or click the Close button on the window.)? When exactly the deadlock occurs. When click ok in add driver dialog or when you click ok in new connection dialog? The dialog box "New JDBC Driver" is good, I can click "OK" button in it(deadlock_when_ResolveDataSources_3.png). Then dialog box "New JDBC Driver" is closed correctly, and the focus return on the dialog box "New Database Connection"(deadlock_when_ResolveDataSources_4.png). In the dialog box "New Database Connection", the three buttons(OK/Cancel/Help) can't handle any key event and can't handle any mouse click event. The deadlock occurs! The same say, I can't close the dialog box "New Database Connection" after set a new driver, and I can't use the IDE anymore. Can you provide the thread dump mentioned in desc7? *** Issue 122315 has been marked as a duplicate of this issue. *** Seems to be related to resolving missing oracle connection. p2 according to priority guideline Hi, John. I know this is in the DB area, but it appears to be closely related to the work you did on resolving data sources. Do you want to take this? It doesn't need to be fixed in 6.0, but it's a P2 for the 6.1. Thanks! Get "lucky" with reproducing. Please never use swing components outside of the event dispatch thread (as described here: http://java.sun.com/docs/books/tutorial/uiswing/concurrency/dispatch.html), unless it is explicitly allowed in javadoc. There is manipulation with JButton in a helper thread causing the deadlock. Attaching thread dump. Created attachment 53748 [details]
thread dump
I'll work on this next week It looks like the button action handler code is run outside the EDT the bug is the jButton is reset in a RequestProcessor thread instead of EDB. Fix is available. Listen for list data model changes then in EDT, if list is empty reset the button Fixed in the trunk Checking in j2ee/utilities/src/org/netbeans/modules/j2ee/common/ui/MissingDatabaseConnectionWarning.java; /cvs/j2ee/utilities/src/org/netbeans/modules/j2ee/common/ui/MissingDatabaseConnectionWarning.java,v <-- MissingDatabaseConnectionWarning new revision: 1.8; previous revision: 1.7 done Small mistake in last integration. If data source is removed then the list should be checked if empty, not if data source is added Checking in j2ee/utilities/src/org/netbeans/modules/j2ee/common/ui/MissingDatabaseConnectionWarning.java; /cvs/j2ee/utilities/src/org/netbeans/modules/j2ee/common/ui/MissingDatabaseConnectionWarning.java,v <-- MissingDatabaseConnectionWarning new revision: 1.9; previous revision: 1.8 done will provide a better fix improved the fix, also found a problem in the fireContentsChanged call Checking in j2ee/utilities/src/org/netbeans/modules/j2ee/common/ui/MissingDatabaseConnectionWarning.java; /cvs/j2ee/utilities/src/org/netbeans/modules/j2ee/common/ui/MissingDatabaseConnectionWarning.java,v <-- MissingDatabaseConnectionWarning.java new revision: 1.11; previous revision: 1.10 done No need to use weak listener. The listener will be GC'd when the panel closes Checking in j2ee/utilities/src/org/netbeans/modules/j2ee/common/ui/MissingDatabaseConnectionWarning.java; /cvs/j2ee/utilities/src/org/netbeans/modules/j2ee/common/ui/MissingDatabaseConnectionWarning.java,v <-- MissingDatabaseConnectionWarning.java new revision: 1.12; previous revision: 1.11 done *** Issue 125530 has been marked as a duplicate of this issue. *** Reporter, can you please verify the fix in the latest daily build? The bug has been fixed,so close this issue. ========== Product Version: NetBeans IDE 6.0 (Build 200711261600) Test result: deadlock Product Version: NetBeans IDE 6.1 Dev (Build 200801030000) Test result: work fine Product Version: NetBeans IDE 6.1 Dev (Build 200801220000) Test result: work fine Product Version: NetBeans IDE 6.0.1 ml Dev (Build 200801190000 Simplified Chinese) Test result: deadlock Product Version: NetBeans IDE 6.0.1 ml Dev (Build 200801061200 Simplified Chinese) Test result: deadlock ========== Chinese: 缺陷已修正,因此关闭此事件。 产品版本:NetBeans IDE 6.0 (Build 200711261600) 测试结果:死锁 产品版本:NetBeans IDE 6.1 Dev (Build 200801030000) 测试结果:工作正常 产品版本:NetBeans IDE 6.1 Dev (Build 200801220000) 测试结果:工作正常 产品版本:NetBeans IDE 6.0.1 ml Dev (Build 200801190000 简体中文版) 测试结果:死锁 产品版本:NetBeans IDE 6.0.1 ml Dev (Build 200801061200 简体中文版) 测试结果:死锁 The reporter has tested the fix on 6.1 dev trunk (1/3 and 1/22/08) therefore marking verified so fix can be merged into next 6.0.1 patch candidate Mark the bug as verified Shouldn't be reopened just to mark verified. Reporter has verified. The fix has been ported into the release601_fixes branch. Checking in MissingDatabaseConnectionWarning.java; /cvs/j2ee/utilities/src/org/netbeans/modules/j2ee/common/ui/Attic/MissingDatabaseConnectionWarning.java,v <-- MissingDatabaseConnectionWarning.java new revision: 1.7.8.1; previous revision: 1.7 done |