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 - Deadlock on IDE startup
Summary: Deadlock on IDE startup
Status: VERIFIED FIXED
Alias: None
Product: ide
Classification: Unclassified
Component: Internal Server (show other bugs)
Version: 5.x
Hardware: All All
: P1 blocker (vote)
Assignee: Petr Jiricka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-25 09:05 UTC by Dusan Balek
Modified: 2005-12-19 11:09 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Deadlock thread dump. (11.60 KB, text/plain)
2005-10-25 09:06 UTC, Dusan Balek
Details
Patch in httpserver module (1.84 KB, patch)
2005-10-27 17:28 UTC, Petr Jiricka
Details | Diff
Module with the patch (88.73 KB, application/octet-stream)
2005-10-27 17:30 UTC, Petr Jiricka
Details

Note You need to log in before you can comment on or make changes to this bug.
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.