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 256238 - java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextNode
Summary: java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.n...
Status: RESOLVED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: matthias42
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-28 18:01 UTC by alied
Modified: 2015-11-01 02:30 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 220830


Attachments
stacktrace (1.03 KB, text/plain)
2015-10-28 18:01 UTC, alied
Details

Note You need to log in before you can comment on or make changes to this bug.
Description alied 2015-10-28 18:01:06 UTC
Build: NetBeans IDE 8.1 RC2 (Build 201510122201)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.66-b17, Java(TM) SE Runtime Environment, 1.8.0_66-b17
OS: Linux

User Comments:
alied: running two queries simultaneously.




Stacktrace: 
java.util.ConcurrentModificationException
   at java.util.HashMap$HashIterator.nextNode(HashMap.java:1429)
   at java.util.HashMap$KeyIterator.next(HashMap.java:1453)
   at java.util.AbstractCollection.toArray(AbstractCollection.java:141)
   at java.util.ArrayList.<init>(ArrayList.java:177)
   at org.netbeans.modules.db.sql.history.SQLHistory.enforceLimit(SQLHistory.java:154)
   at org.netbeans.modules.db.sql.history.SQLHistory.add(SQLHistory.java:148)
Comment 1 alied 2015-10-28 18:01:08 UTC
Created attachment 157030 [details]
stacktrace
Comment 2 matthias42 2015-10-30 20:58:11 UTC
Thank you for your report. The problem can be reproduced in a unittest. A fix is committed as:

http://hg.netbeans.org/core-main/rev/d31fe412bf06

In the next few days a nightly build will be done containing this fix. If you can reproduce this problem, please verify the fix. I had to resort to brute force in the unittest to reproduce the problem, so it might be not reproducible.
Comment 3 Quality Engineering 2015-11-01 02:30:25 UTC
Integrated into 'main-silver', will be available in build *201511010002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/d31fe412bf06
User: Matthias Blaesing <matthias42@netbeans.org>
Log: #256238: Ensure SQLHistory is save to be accessed from multiple threads