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 149130 - OperationSupportImpl fails to acquire ModuleManager.mutex
Summary: OperationSupportImpl fails to acquire ModuleManager.mutex
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Autoupdate (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jiri Rechtacek
URL: http://deadlock.netbeans.org/hudson/j...
Keywords: RANDOM, TEST, THREAD
Depends on:
Blocks:
 
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
Exception Reporter:


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