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.

Bug 107885 - IDE is freezing, not able to open projects (Ubuntu 7.04)
Summary: IDE is freezing, not able to open projects (Ubuntu 7.04)
Status: VERIFIED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: John Baker
URL:
Keywords: THREAD
Depends on:
Blocks: 106361
  Show dependency tree
 
Reported: 2007-06-22 20:01 UTC by pcmreddy
Modified: 2007-06-28 12:00 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Stack trace (15.60 KB, text/plain)
2007-06-22 20:02 UTC, pcmreddy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pcmreddy 2007-06-22 20:01:27 UTC
Build : netbeans-6.0-nightly-200706220000-full-linux.sh
JDK 1.6 

IDE is freezing not able to open projects Ubuntu 7.04
After starting IDE tried to open a new project.
IDE Not responding.

See attached thread dump for details.
Comment 1 pcmreddy 2007-06-22 20:02:07 UTC
Created attachment 44293 [details]
Stack trace
Comment 2 Jesse Glick 2007-06-22 20:22:37 UTC
Looks to be bad synchronization in DerbyWaiter.
Comment 3 John Baker 2007-06-22 20:35:35 UTC
I just made a change yesterday to fix DerbyWaiter.

I'll try to reproduce, in the meantime, please try an even more recent build :
http://deadlock.netbeans.org/hudson/job/trunk/1106/artifact/nbbuild/dist/zip/netbeans-hudson-trunk-1106-full.zip
Comment 4 John Baker 2007-06-22 20:44:26 UTC
It appears I had fixed this yesterday.

In the attached thread dump, currently there's no statement on line 50 of DerbyWaiter 
the last statement that is said to be executed.

Previously, I had an unsynchronized call to registerConnections and I fixed this yesterday.
Comment 5 Yousuf Haider 2007-06-22 21:47:54 UTC
I can verify the fix on the trunk build : 1107, running on JDK1.6 and Linux Ubuntu 7.04
Comment 6 John Baker 2007-06-22 21:57:22 UTC
this has been fixed.  Two calls to registerConnections(...) caused a deadlock.  One unnecessary call was removed.

File [changed]: DerbyWaiter.java
Url:
http://visualweb.netbeans.org/source/browse/visualweb/dataconnectivity/src/org/netbeans/modules/visualweb/dataconnectivity/naming/DerbyWaiter.java?r1=1.5&r2=1.6
Delta lines:  +14 -10
---------------------
--- DerbyWaiter.java	16 Jun 2007 01:20:34 -0000	1.5
+++ DerbyWaiter.java	22 Jun 2007 00:17:04 -0000	1.6
@@ -47,22 +47,26 @@
     public DerbyWaiter(boolean migration) {
         isMigration = migration;
         JDBCDriverManager.getDefault().addDriverListener(jdbcDriverListener);
-        registerConnections();
     }
     
     private synchronized void registerConnections() {
         if (registered) {
             return;
         }
+        
         JDBCDriver[] drvsArray = JDBCDriverManager.getDefault().getDrivers(DRIVER_CLASS_NET);
-        if (drvsArray.length > 0) {
             if (isMigration) {
                 DatabaseSettingsImporter.getInstance().locateAndRegisterDrivers();
                 DatabaseSettingsImporter.getInstance().locateAndRegisterConnections(true);
+            if (drvsArray.length > 0) {
                 SampleDatabaseCreator.createAll("travel", "travel", "travel", "TRAVEL", "modules/ext/travel.zip",
false, "localhost", 1527);
-            } else
-                SampleDatabaseCreator.createAll("travel", "travel", "travel", "TRAVEL", "modules/ext/travel.zip",
false, "localhost", 1527);
+            }
+            return;
+        }        
             
+        // Register sample database
+        if (drvsArray.length > 0) {
+            SampleDatabaseCreator.createAll("travel", "travel", "travel", "TRAVEL", "modules/ext/travel.zip", false,
"localhost", 1527);
             registered = true;
             JDBCDriverManager.getDefault().removeDriverListener(jdbcDriverListener);            
         }
Comment 7 Peter Pis 2007-06-26 09:45:15 UTC
Could you please verify this issue for M10? Thanks.
Comment 8 Peter Pis 2007-06-26 09:47:51 UTC
This issue is marked as a stopper for M10. Was the fix integrated into "release60-m10" branch?
Comment 9 pcmreddy 2007-06-26 19:53:05 UTC
Verified in "release60-m10" and not reproducible.