Bug 149130 - OperationSupportImpl fails to acquire ModuleManager.mutex
OperationSupportImpl fails to acquire ModuleManager.mutex
Status: RESOLVED FIXED
Product: platform
Classification: Unclassified
Component: Autoupdate
6.x
All All
: P3 (vote)
: 6.x
Assigned To: Jiri Rechtacek
issues@platform
http://deadlock.netbeans.org/hudson/j...
: RANDOM, TEST, THREAD
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-03 21:59 UTC by Jesse Glick
Modified: 2009-02-19 20:23 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments
proposed patch (2.03 KB, patch)
2008-10-07 15:01 UTC, Jiri Rechtacek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2008-10-03 21:59:54 UTC
java.lang.IllegalThreadStateException: You are attempting to make changes to org.netbeans.ModuleManager@a2220f in a
property change callback. This is illegal. You may only make module system changes while holding a write mutex and not
inside a change callback. See #16328.
	at org.netbeans.ModuleManager.assertWritable(ModuleManager.java:226)
	at org.netbeans.ModuleManager.disable(ModuleManager.java:932)
	at
org.netbeans.modules.autoupdate.services.OperationSupportImpl$ForDirectDisable.doOperation(OperationSupportImpl.java:281)
	at org.netbeans.api.autoupdate.OperationSupport.doOperation(OperationSupport.java:67)
	at org.netbeans.modules.autoupdate.services.OperationsTestImpl.disableModule(OperationsTestImpl.java:402)
	at org.netbeans.modules.autoupdate.services.UninstallDisabledTest.testSelf(UninstallDisabledTest.java:64)

Indeed MM is being used without taking a lock first, contrary to its documentation.
Comment 1 Jiri Rechtacek 2008-10-06 11:25:58 UTC
I'll try to prepare a patch for that...
Comment 2 Jiri Rechtacek 2008-10-07 15:01:37 UTC
Created attachment 71292 [details]
proposed patch
Comment 3 Jiri Rechtacek 2008-10-23 15:23:05 UTC
Test UninstallDisabledTest throws this exception.
Comment 4 Jiri Rechtacek 2008-11-04 15:06:35 UTC
fixed in core-main/rev/1bbd0861d7db
Comment 5 Quality Engineering 2008-11-05 04:35:45 UTC
Integrated into 'main-golden', will be available in build *200811050201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/1bbd0861d7db
User: Jiri Rechtacek <jrechtacek@netbeans.org>
Log: #149130: OperationSupportImpl fails to acquire ModuleManager.mutex


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