Bug 50984 - Deadlock in lookup
Deadlock in lookup
Status: RESOLVED FIXED
Product: platform
Classification: Unclassified
Component: Filesystems
4.x
PC Linux
: P2 (vote)
: 4.x
Assigned To: Jaroslav Tulach
issues@platform
: RANDOM, THREAD
: 50967 51252 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-10-29 20:24 UTC by Jesse Glick
Modified: 2008-12-22 19:58 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
Thread dump (12.49 KB, text/plain)
2004-10-29 20:24 UTC, Jesse Glick
Details
Informational exception. (4.89 KB, text/plain)
2004-10-30 13:45 UTC, Martin Matula
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2004-10-29 20:24:00 UTC
Dev sources, starting for first time w/ clean user
dir.
Comment 1 Jesse Glick 2004-10-29 20:24:49 UTC
Created attachment 18612 [details]
Thread dump
Comment 2 Jesse Glick 2004-10-29 20:25:22 UTC
URLMapper is involved.
Comment 3 Jesse Glick 2004-10-29 20:26:23 UTC
Started up OK the next time I tried (again w/ a fresh UD).
Comment 4 Jaroslav Tulach 2004-10-30 09:31:25 UTC
This is the same deadlock as reported by pflaska in bug 50970, except
that this one seems to be reproduced on sources that already contain
my fix for bug 50768. That means we have this problem in our current
sources.

The root cause is that the clash of AbstractLookup storage lock and
private lock in URLMapper. Of course it is bad to call foreign code
from lookup, but that code is pretty internal (Pair.instanceOf) and I
am not sure how to eliminate it. That is why simpler solution would
likely be to eliminate private lock in URLMapper. 

As far as I know there is already a bunch tests for proper behaviour
of URLMapper under heavy load, so I think modifying the code to not
use the private lock and still fullfil all the contracts, might work.
I'll try it early next week.
Comment 5 Martin Matula 2004-10-30 13:43:32 UTC
I got the same deadlock. Attached informational exception was thrown
before the IDE got frozen.
Comment 6 Martin Matula 2004-10-30 13:45:21 UTC
Created attachment 18621 [details]
Informational exception.
Comment 7 Jaroslav Tulach 2004-11-01 08:44:50 UTC
*** Issue 50967 has been marked as a duplicate of this issue. ***
Comment 8 Jaroslav Tulach 2004-11-01 15:46:20 UTC
cvs -q ci -m "#50984: Removing private lock in URLMapper. This changes
a bit the way how synchronous access works, so I had to revert the
tests in the already existing test. I hope the new behaviour is also ok."
Checking in src/org/openide/filesystems/URLMapper.java;
/cvs/openide/src/org/openide/filesystems/URLMapper.java,v  <-- 
URLMapper.java
new revision: 1.43; previous revision: 1.42
done
Processing log script arguments...
More commits to come...
Checking in test/unit/src/org/openide/filesystems/URLMapper50852Test.java;
/cvs/openide/test/unit/src/org/openide/filesystems/URLMapper50852Test.java,v
 <--  URLMapper50852Test.java
new revision: 1.2; previous revision: 1.1
done
RCS file:
/cvs/openide/test/unit/src/org/openide/filesystems/URLMapper50984Test.java,v
done
Checking in test/unit/src/org/openide/filesystems/URLMapper50984Test.java;
/cvs/openide/test/unit/src/org/openide/filesystems/URLMapper50984Test.java,v
 <--  URLMapper50984Test.java
initial revision: 1.1
Comment 9 Jaroslav Tulach 2004-11-01 15:47:01 UTC
I'll ask reviewers for integration for 4.0.
Comment 10 _ tboudreau 2004-11-01 16:58:54 UTC
FWIW, I've seen this one as well
Comment 11 David Konecny 2004-11-02 10:39:28 UTC
I reviewed the fix and it looks OK to me. This issue is caused by the
fix of issue 50852. I had been discussing that fix with Radek and we
were talking also about fixing it the way how Yarda did it here, that
is, leave all synchronization on Lookup which seemed also OK.
Comment 12 Jaroslav Tulach 2004-11-04 12:18:49 UTC
cvs  ci -m "Backport of #50729 (import settings for mobility), #50954
(os2 is not windows) and #50984 (deadlock in URLMapper) from main trunk."
Checking in core/src/org/netbeans/core/modules/NbInstaller.java;
/cvs/core/src/org/netbeans/core/modules/NbInstaller.java,v  <-- 
NbInstaller.java
new revision: 1.78.2.1; previous revision: 1.78
done
Processing log script arguments...
More commits to come...
Checking in
ide/launcher/upgrade/src/org/netbeans/upgrade/AutoUpgrade.java;
/cvs/ide/launcher/upgrade/src/org/netbeans/upgrade/AutoUpgrade.java,v
 <--  AutoUpgrade.java
new revision: 1.4.6.1; previous revision: 1.4
done
Checking in
ide/launcher/upgrade/src/org/netbeans/upgrade/copyjstudio_6me_user;
/cvs/ide/launcher/upgrade/src/org/netbeans/upgrade/copyjstudio_6me_user,v
 <--  copyjstudio_6me_user
new revision: 1.1.2.1; previous revision: 1.1
done
Processing log script arguments...
More commits to come...
Checking in
openide/api/examples/minicomposer/src/org/netbeans/examples/modules/minicomposer/ComposerSettings.java;
/cvs/openide/api/examples/minicomposer/src/org/netbeans/examples/modules/minicomposer/ComposerSettings.java,v
 <--  ComposerSettings.java
new revision: 1.2.8.1; previous revision: 1.2
done
Processing log script arguments...
More commits to come...
Checking in
openide/compiler/src/org/openide/compiler/ExternalCompilerGroup.java;
/cvs/openide/compiler/src/org/openide/compiler/ExternalCompilerGroup.java,v
 <--  ExternalCompilerGroup.java
new revision: 1.8.88.1; previous revision: 1.8
done
Processing log script arguments...
More commits to come...
Checking in openide/loaders/src/org/openide/loaders/ExtensionList.java;
/cvs/openide/loaders/src/org/openide/loaders/ExtensionList.java,v  <--
 ExtensionList.java
new revision: 1.4.24.1; previous revision: 1.4
done
Checking in
openide/loaders/src/org/openide/loaders/NewObjectWizardPanel.java;
/cvs/openide/loaders/src/org/openide/loaders/NewObjectWizardPanel.java,v
 <--  NewObjectWizardPanel.java
new revision: 1.4.24.1; previous revision: 1.4
done
Checking in openide/loaders/src/org/openide/loaders/TemplateWizard2.java;
/cvs/openide/loaders/src/org/openide/loaders/TemplateWizard2.java,v 
<--  TemplateWizard2.java
new revision: 1.4.58.1; previous revision: 1.4
done
Processing log script arguments...
More commits to come...
Checking in
openide/masterfs/src/org/netbeans/modules/masterfs/MasterFileObject.java;
/cvs/openide/masterfs/src/org/netbeans/modules/masterfs/MasterFileObject.java,v
 <--  MasterFileObject.java
new revision: 1.34.8.1; previous revision: 1.34
done
Checking in
openide/masterfs/src/org/netbeans/modules/masterfs/MasterURLMapper.java;
/cvs/openide/masterfs/src/org/netbeans/modules/masterfs/MasterURLMapper.java,v
 <--  MasterURLMapper.java
new revision: 1.8.2.1; previous revision: 1.8
done
Checking in
openide/masterfs/src/org/netbeans/modules/masterfs/ResourcePath.java;
/cvs/openide/masterfs/src/org/netbeans/modules/masterfs/ResourcePath.java,v
 <--  ResourcePath.java
new revision: 1.8.4.1; previous revision: 1.8
done
Checking in
openide/masterfs/src/org/netbeans/modules/masterfs/SpecialDelegates.java;
/cvs/openide/masterfs/src/org/netbeans/modules/masterfs/SpecialDelegates.java,v
 <--  SpecialDelegates.java
new revision: 1.10.12.1; previous revision: 1.10
done
Processing log script arguments...
More commits to come...
Checking in
openide/masterfs/src/org/netbeans/modules/masterfs/providers/Attributes.java;
/cvs/openide/masterfs/src/org/netbeans/modules/masterfs/providers/Attributes.java,v
 <--  Attributes.java
new revision: 1.6.12.1; previous revision: 1.6
done
Processing log script arguments...
More commits to come...
Checking in
openide/masterfs/test/unit/src/org/netbeans/modules/masterfs/MasterFileObjectTestHid.java;
/cvs/openide/masterfs/test/unit/src/org/netbeans/modules/masterfs/MasterFileObjectTestHid.java,v
 <--  MasterFileObjectTestHid.java
new revision: 1.18.4.1; previous revision: 1.18
done
Processing log script arguments...
More commits to come...
Checking in
openide/registry/src/org/netbeans/modules/registry/mergedctx/Resource.java;
/cvs/openide/registry/src/org/netbeans/modules/registry/mergedctx/Resource.java,v
 <--  Resource.java
new revision: 1.2.98.1; previous revision: 1.2
done
Processing log script arguments...
More commits to come...
Checking in openide/src/org/openide/filesystems/FileUtil.java;
/cvs/openide/src/org/openide/filesystems/FileUtil.java,v  <-- 
FileUtil.java
new revision: 1.126.2.1; previous revision: 1.126
done
Checking in openide/src/org/openide/filesystems/LocalFileSystem.java;
/cvs/openide/src/org/openide/filesystems/LocalFileSystem.java,v  <-- 
LocalFileSystem.java
new revision: 1.65.4.1; previous revision: 1.65
done
Checking in openide/src/org/openide/filesystems/URLMapper.java;
/cvs/openide/src/org/openide/filesystems/URLMapper.java,v  <-- 
URLMapper.java
new revision: 1.42.2.1; previous revision: 1.42
done
Processing log script arguments...
More commits to come...
Checking in openide/src/org/openide/util/Utilities.java;
/cvs/openide/src/org/openide/util/Utilities.java,v  <--  Utilities.java
new revision: 1.146.2.1; previous revision: 1.146
done
Processing log script arguments...
More commits to come...
Checking in
openide/test/unit/src/org/openide/filesystems/FileObjectTestHid.java;
/cvs/openide/test/unit/src/org/openide/filesystems/FileObjectTestHid.java,v
 <--  FileObjectTestHid.java
new revision: 1.42.8.1; previous revision: 1.42
done
Checking in
openide/test/unit/src/org/openide/filesystems/URLMapper50852Test.java;
/cvs/openide/test/unit/src/org/openide/filesystems/URLMapper50852Test.java,v
 <--  URLMapper50852Test.java
new revision: 1.1.2.1; previous revision: 1.1
done
Checking in
openide/test/unit/src/org/openide/filesystems/URLMapper50984Test.java;
/cvs/openide/test/unit/src/org/openide/filesystems/URLMapper50984Test.java,v
 <--  URLMapper50984Test.java
new revision: 1.2.2.1; previous revision: 1.2
Comment 13 Petr Nejedly 2004-11-08 09:41:30 UTC
*** Issue 51252 has been marked as a duplicate of this issue. ***
Comment 14 Petr Nejedly 2004-11-08 09:45:12 UTC
*** Issue 51252 has been marked as a duplicate of this issue. ***
Comment 15 Jaroslav Tulach 2004-11-08 09:46:20 UTC
*** Issue 51252 has been marked as a duplicate of this issue. ***


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo