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 245795 - constant UI freezes due to busy mutex in masterfs
Summary: constant UI freezes due to busy mutex in masterfs
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Data Systems (show other bugs)
Version: 8.0.1
Hardware: PC Solaris
: P1 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-18 12:02 UTC by Vladimir Voskresensky
Modified: 2014-08-05 13:04 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
UI freezes (47.04 KB, application/octet-stream)
2014-07-18 12:03 UTC, Vladimir Voskresensky
Details
slowness when expand Importan Files (65.65 KB, application/octet-stream)
2014-07-18 12:09 UTC, Vladimir Voskresensky
Details
tryint to invoke Run target from build script (45.49 KB, application/octet-stream)
2014-07-18 12:17 UTC, Vladimir Voskresensky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Voskresensky 2014-07-18 12:02:37 UTC
After some recent changes in platform UI is frozen for ~10 sec when i.e. I invoke popup menu in editor.
All the time I see FileObjectFactor.getFileObject is stuck on 
org.openide.util.Mutex$Privileged.enterReadAccess()	56.311325	6,805 ms (56.3%)	0.000 ms

I will attach self-sampler
Comment 1 Vladimir Voskresensky 2014-07-18 12:03:48 UTC
Created attachment 148133 [details]
UI freezes
Comment 2 Vladimir Voskresensky 2014-07-18 12:09:46 UTC
Created attachment 148134 [details]
slowness when expand Importan Files
Comment 3 Vladimir Voskresensky 2014-07-18 12:17:48 UTC
Created attachment 148135 [details]
tryint to invoke Run target from build script
Comment 4 Ondrej Vrabec 2014-07-18 12:26:25 UTC
> After some recent changes in platform UI is frozen for ~10 sec when i.e.
If it's already in 7.4 as you reported (Version set to 7.4) i doubt it's caused by "some recent changes".
Comment 5 Vladimir Voskresensky 2014-07-18 12:30:26 UTC
Sorry, it's trunk
>Log Session: Friday, July 18, 2014 3:35:49 PM MSK
>System Info: 
  Product Version         = NetBeans IDE Dev (Build 20140718-95206b99b198) (#95206b99b198)
  Operating System        = SunOS version 5.11 running on x86
  Java; VM; Vendor        = 1.7.0_55; Java HotSpot(TM) Server VM 24.55-b03; Oracle Corporation
  Runtime                 = Java(TM) SE Runtime Environment 1.7.0_55-b13
  Java Home               = /usr/jdk/instances/jdk1.7.0/jre
Comment 6 Jaroslav Tulach 2014-07-24 12:23:01 UTC
(In reply to Vladimir Voskresensky from comment #3)
> Created attachment 148135 [details]
> tryint to invoke Run target from build script

AWT is blocked on a DataObjectPool monitor. The monitor is held by some background thread in
org.openide.loaders.DataObjectPool.register()
which then uses FileObject as a key in a hashmap. However when putting it into DoubleHashMap, the FileObject blocks on computation of getParent() which needs the global MasterFS mutex.
Comment 7 Jaroslav Tulach 2014-07-30 10:37:19 UTC
changeset:   e63774180d14
user:        Jaroslav Tulach <jtulach@netbeans.org>
date:        Wed Jul 30 12:35:43 2014 +0200
summary:     #245795: Don't ask for FileObject's parent in a synchronized block
Comment 8 Quality Engineering 2014-08-01 02:10:10 UTC
Integrated into 'main-silver', will be available in build *201408010001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/e63774180d14
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #245795: Don't ask for FileObject's parent in a synchronized block
Task #245795 - constant UI freezes due to busy mutex in masterfs
Comment 9 Antonin Nebuzelsky 2014-08-01 11:48:03 UTC
Too late for release801 branch.

Jardo, can you backport?
Comment 10 Jaroslav Tulach 2014-08-04 09:07:38 UTC
(In reply to Antonin Nebuzelsky from comment #9)
> Too late for release801 branch.

I believe the commit made it into the branch:

$ hg log -r 'ancestor(release801_base,e63774180d14)'
changeset:   286951:e63774180d14
user:        Jaroslav Tulach <jtulach@netbeans.org>
date:        Wed Jul 30 12:35:43 2014 +0200
summary:     #245795: Don't ask for FileObject's parent in a synchronized block

e.g. release801_base is older than e63774180d14 and contains it.