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 188298 - infinite loop causes unusable IDE after opening two suites projects
Summary: infinite loop causes unusable IDE after opening two suites projects
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 7.0
Hardware: All All
: P2 normal (vote)
Assignee: Jesse Glick
URL:
Keywords: RANDOM, THREAD
Depends on:
Blocks:
 
Reported: 2010-07-02 06:33 UTC by Vladimir Voskresensky
Modified: 2010-07-08 03:26 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
thread dump demonstrating infinite loop in WeakHashMap.put (20.13 KB, text/plain)
2010-07-02 06:33 UTC, Vladimir Voskresensky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Voskresensky 2010-07-02 06:33:38 UTC
Created attachment 100555 [details]
thread dump demonstrating infinite loop in WeakHashMap.put

Selected 2 suites projects in Open Project dialog.
after that modal dialog "Opening Projects" stands forever, projects are not opened => no way to work with IDE without killing it.

  Product Version         = NetBeans IDE Dev (Build 100702-a1cb2df9a24a) (#a1cb2df9a24a)
  Operating System        = SunOS version 5.10 running on x86
  Java; VM; Vendor        = 1.6.0_14; Java HotSpot(TM) Client VM 14.0-b16; Sun Microsystems Inc.
  Runtime                 = Java(TM) SE Runtime Environment 1.6.0_14-b08
  Java Home               = /usr/jdk/instances/jdk1.6.0_14/jre

I'll attach thread dump demonstrating problem of infinite loop in WeakHashMap.put
Comment 1 Jesse Glick 2010-07-02 13:43:52 UTC
I'm afraid I can't reproduce your problem, and the thread dump does not really tell me anything other than there is a problem in WeakHashMap.
Comment 2 Vladimir Voskresensky 2010-07-05 07:41:54 UTC
There is no problems in WeakHashMap but it is not thread safe.
Please, check if you correctly access proj2Factory collection. 
The problem is that you can not call even 2 map.get() without sync from different threads (because of expungeStaleEntries which modifies internal structures), so i.e. 2 accesses under org.openide.util.Mutex.readAccess can corrupt map

Of course it's difficult to reproduce, but have to reopen, because thread dump 100% indicates incorrect synchronization in code
Comment 3 Vladimir Voskresensky 2010-07-07 09:11:31 UTC
happened again
Comment 4 Jesse Glick 2010-07-07 15:12:45 UTC
core-main #68f45dee0e79
Comment 5 Quality Engineering 2010-07-08 03:26:54 UTC
Integrated into 'main-golden', will be available in build *201007080001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/68f45dee0e79
User: Jesse Glick <jglick@netbeans.org>
Log: #188298: infinite loop causes unusable IDE after opening two suites projects