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.
Summary: | [69cat] ConcurrentModificationException in NbPreferences | ||
---|---|---|---|
Product: | platform | Reporter: | jamespb <jamespb> |
Component: | Options&Settings | Assignee: | Jiri Rechtacek <jrechtacek> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alexvsimon, dkaspar, exceptions_reporter, jglick, jtulach, mmirilovic, obalyuk, pansapien, tentamen, timecode, vieiro, vittal4u, vv159170 |
Priority: | P1 | Keywords: | RANDOM, THREAD |
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
URL: | http://statistics.netbeans.org/analytics/detail.do?id=162178 | ||
Issue Type: | DEFECT | Exception Reporter: | 162178 |
Attachments: | messages.log |
Seems to be autoupdate issue, reassigning. Not that critical since it occurs rarely. *** Bug 179372 has been marked as a duplicate of this bug. *** already 40 duplicates Jarda, Could you please advise on what is wrong with the current usage of Lookup/NbPreferences? Or is it an issue in Lookup/filesystems that causes such an issue? Thanks. As far as I know Preferences implementation shall be thread safe. Obviously it is not. *** Bug 181409 has been marked as a duplicate of this bug. *** I think I've hit this on occasion too. 381 duplicates. *** Bug 183338 has been marked as a duplicate of this bug. *** *** Bug 183392 has been marked as a duplicate of this bug. *** *** Bug 182994 has been marked as a duplicate of this bug. *** Various other symptoms may be observed. Simply need to synchronize all accesses to EditableProperties, as (like HashMap) it is not intended to be thread-safe. *** Bug 183525 has been marked as a duplicate of this bug. *** 630 duplicates ... P1 (sorry Jirka, but this needs to be addressed for NB 6.9) fixed in core-main/rev/57212e84a471 (In reply to comment #15) > core-main #57212e84a471 flushSpi does not synchronize. Anyway shouldn't you be using AbstractPreferences.lock rather than inventing a new lock? > --- Comment #16 from Jesse Glick <jglick@netbeans.org> 2010-04-06 14:55:54 --- > flushSpi does not synchronize. Anyway shouldn't you be using flushSpi doesn't write into EditableProperties map thus I omit it. > AbstractPreferences.lock rather than inventing a new lock? Well, makes sense. I'll change it to use that lock. Thanks > --- Comment #17 from Jiri Rechtacek <jrechtacek@netbeans.org> 2010-04-06 15:07:15 ---
>> --- Comment #16 from Jesse Glick <jglick@netbeans.org> 2010-04-06 14:55:54 ---
>> flushSpi does not synchronize. Anyway shouldn't you be using
> flushSpi doesn't write into EditableProperties map thus I omit it.
My wrong, flushSpi writes in map as well. I'll fix it.
(In reply to comment #17) > flushSpi doesn't write into EditableProperties map thus I omit it. But it _reads_ properties, meaning that a concurrent write to properties could result in a CME on one or the other thread. Jesse's hints impl. in core-main/rev/5dac466bc973 Thanks Integrated into 'main-golden', will be available in build *201004070201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/57212e84a471 User: Jiri Rechtacek <jrechtacek@netbeans.org> Log: #178439: ConcurrentModificationException in NbPreferences |
Created attachment 92391 [details] messages.log Starting up this morning's version of Netbeans to work on a Ruby project, I get the following exception (also including messages.log) java.util.ConcurrentModificationException at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:761) at java.util.LinkedList$ListItr.add(LinkedList.java:752) at org.openide.util.EditableProperties.addItem(EditableProperties.java:393) at org.openide.util.EditableProperties.put(EditableProperties.java:250) at org.netbeans.core.startup.preferences.NbPreferences.putSpi(NbPreferences.java:123) at java.util.prefs.AbstractPreferences.put(AbstractPreferences.java:234) at org.netbeans.core.startup.preferences.NbPreferences.put(NbPreferences.java:133) at org.netbeans.modules.autoupdate.updateprovider.AutoupdateCatalogFactory.createUpdateProvider(AutoupdateCatalogFactory.java:125) Caused: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.netbeans.core.startup.layers.BinaryFS$AttrImpl$MethodAndParams.invoke(BinaryFS.java:604) at org.netbeans.core.startup.layers.BinaryFS$AttrImpl.getValue(BinaryFS.java:537) at org.netbeans.core.startup.layers.BinaryFS$BFSBase.getAttribute(BinaryFS.java:383) at org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:844) at org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:793) at org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:840) at org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:793) at org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:726) at org.openide.loaders.InstanceDataObject$Ser.instanceCreate(InstanceDataObject.java:1370) at org.openide.loaders.InstanceDataObject.instanceCreate(InstanceDataObject.java:818) at org.openide.loaders.FolderLookup$ICItem.getInstance(FolderLookup.java:584) at org.openide.util.lookup.AbstractLookup$R.allInstances(AbstractLookup.java:1003) at org.openide.util.lookup.ProxyLookup$R.computeResult(ProxyLookup.java:548) at org.openide.util.lookup.ProxyLookup$R.allInstances(ProxyLookup.java:488) at org.openide.util.lookup.ProxyLookup$R.computeResult(ProxyLookup.java:548) at org.openide.util.lookup.ProxyLookup$R.allInstances(ProxyLookup.java:488) at org.netbeans.modules.autoupdate.services.UpdateUnitProviderImpl$LookupListenerImpl.allInstances(UpdateUnitProviderImpl.java:451) at org.netbeans.modules.autoupdate.services.UpdateUnitProviderImpl.getUpdateUnitProviders(UpdateUnitProviderImpl.java:254) at org.netbeans.modules.autoupdate.services.UpdateUnitProviderImpl.refreshProviders(UpdateUnitProviderImpl.java:300) at org.netbeans.modules.autoupdate.services.UpdateUnitProviderImpl$LookupListenerImpl.resultChanged(UpdateUnitProviderImpl.java:444) at org.openide.util.lookup.AbstractLookup$NotifyListeners.run(AbstractLookup.java:525) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:641) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1123)