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 67472

Summary: Deadlock on IDE startup
Product: ide Reporter: Dusan Balek <dbalek>
Component: Internal ServerAssignee: Petr Jiricka <pjiricka>
Status: VERIFIED FIXED    
Severity: blocker CC: jpospisil, jtulach
Priority: P1    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: Deadlock thread dump.
Patch in httpserver module
Module with the patch

Description Dusan Balek 2005-10-25 09:05:09 UTC
See attached thread dump.
Comment 1 Dusan Balek 2005-10-25 09:06:01 UTC
Created attachment 26302 [details]
Deadlock thread dump.
Comment 2 rmatous 2005-10-25 12:13:28 UTC
filesystems aren't involved at all -> lookup versus datasystems.
Comment 3 Jaroslav Tulach 2005-10-25 18:56:32 UTC
I wrote a test, but alas, it seems that the deadlock in 67472 cannot be 
properly fixed in XMLDataObject, that would create possible access to 
not-yet-initialized Processor object. Leaving for htmlserver guys to fix. 
 
Checking in XMLDataObjectTest.java; 
/cvs/openide/loaders/test/unit/src/org/openide/loaders/XMLDataObjectTest.java,v  
<--  XMLDataObjectTest.java 
new revision: 1.3; previous revision: 1.2 
 
The actual problem is the initialization of   
  
org.netbeans.modules.httpserver.HttpServerURLMapper.<clinit>(HttpServerURLMapper.java:37)  
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)  
  
it should be made cheaper. Please remove static initializer and any work in 
constructor that you do that. 
Comment 4 Petr Jiricka 2005-10-27 17:25:39 UTC
How often does this happen are there any particular steps to reproduce? I can't
reproduce.

I am attaching a patch which removes the static initialization, and the
resulting module. I would prefer if this was tested by someone who can reproduce
this and can verify that it helps.

BTW, looking at the stack trace, it seems overly complicated. The .settings file
format is well known, so couldn't just SharedClassObject directly parse the
settings file and get the result? Does it need to go through the
Lookup/FolderLookup/XMLDataObject layers?
Comment 5 Petr Jiricka 2005-10-27 17:28:34 UTC
Created attachment 26406 [details]
Patch in httpserver module
Comment 6 Petr Jiricka 2005-10-27 17:30:08 UTC
Created attachment 26407 [details]
Module with the patch
Comment 7 Petr Jiricka 2005-11-04 13:00:31 UTC
Fixed. 

Checking in HttpServerURLMapper.java;
/cvs/httpserver/src/org/netbeans/modules/httpserver/HttpServerURLMapper.java,v 
<--  HttpServerURLMapper.java
new revision: 1.12; previous revision: 1.11
done
Comment 8 Jaroslav Pospisil 2005-12-19 10:29:37 UTC
dbalek,could you please verify the fix? Thanks.
Comment 9 Dusan Balek 2005-12-19 11:09:23 UTC
Verified.