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 226642 - java.util.ConcurrentModificationException at java.util.IdentityHashMap$Values.toArray
Summary: java.util.ConcurrentModificationException at java.util.IdentityHashMap$Values...
Status: RESOLVED WONTFIX
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: Milos Kleint
URL:
Keywords: JDK_SPECIFIC
: 226643 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-02-25 11:23 UTC by Jan Lahoda
Modified: 2013-06-19 09:06 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 198990


Attachments
stacktrace (4.17 KB, text/plain)
2013-02-25 11:23 UTC, Jan Lahoda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Lahoda 2013-02-25 11:23:48 UTC
Build: NetBeans IDE 7.3 (Build 20130223-93e87decaddf)
VM: OpenJDK 64-Bit Server VM, 25.0-b18, OpenJDK Runtime Environment, 1.8.0-internal-lahvac_2013_02_19_11_40-b00
OS: Linux

User Comments:
jlahoda: Cannot install FindBugs plugin.




Stacktrace: 
java.util.ConcurrentModificationException
   at java.util.IdentityHashMap$Values.toArray(IdentityHashMap.java:1119)
   at java.util.IdentityHashMap$Values.toArray(IdentityHashMap.java:1098)
   at java.util.ArrayList.<init>(ArrayList.java:151)
   at com.google.common.collect.Lists.newArrayList(Lists.java:119)
   at com.google.inject.internal.Initializer.injectAll(Initializer.java:94)
   at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:174)
Comment 1 Jan Lahoda 2013-02-25 11:23:52 UTC
Created attachment 131825 [details]
stacktrace
Comment 2 Jan Lahoda 2013-02-25 11:32:37 UTC
Actually, on the very first time (with clean userdir), I got bug #226643. I got this one after that.
Comment 3 Jan Lahoda 2013-02-25 12:02:43 UTC
One thing I did not notice originally is that I was running on a relatively recent build of JDK8. Does not happen on JDK 1.7.0_11.
Comment 4 Jan Lahoda 2013-02-25 15:44:14 UTC
*** Bug 226643 has been marked as a duplicate of this bug. ***
Comment 5 Milos Kleint 2013-03-07 11:38:18 UTC
something unlikely to be fixed in our codebase, if the problem persists would have to be fixed in maven itself or in their dependencies and eventually bubble up to us to include with netbeans. Or it's a jdk problem. Can you try with the official early access build?
Comment 6 Milos Kleint 2013-06-19 09:06:55 UTC
I'm about to close this as wontfix.

1. our own code is synchronized, only one MavenEmbedder can be created at a time
2. the maven code itself is singlethreaded.
3. the problem appears to be in guice library in Initializer.java file which even has the following comment
// loop over a defensive copy since ensureInjected() mutates the set. Unfortunately, that copy
    // is made complicated by a bug in IBM's JDK, wherein entrySet().toArray(Object[]) doesn't work

I haven't figured where the guice code spawns another thread though. The situation is complicated by the fact that maven is not using a clean copy of guice but one that is patched by the sisu project at eclipse. (however the maven code is using an older version of sisu that was developed at sonatype before submitting sisu to eclipse)
So it's not even clear where to file the issue.