Concurrent Modification Exception in ScopeManager
See original GitHub issueHey, Im encountering a Concurrent Modification Exception caused by the ScopeManager if I get this right:
Caused by: java.util.ConcurrentModificationException
at java.util.IdentityHashMap$IdentityHashMapIterator.nextIndex(IdentityHashMap.java:735) ~[?:?]
at java.util.IdentityHashMap$EntryIterator.next(IdentityHashMap.java:843) ~[?:?]
at java.util.IdentityHashMap$EntryIterator.next(IdentityHashMap.java:837) ~[?:?]
at java.util.IdentityHashMap.putAll(IdentityHashMap.java:506) ~[?:?]
at de.fraunhofer.aisec.cpg.passes.scopes.ScopeManager.mergeFrom(ScopeManager.kt:183) ~[cpg-core-master-SNAPSHOT.jar:?]
at de.fraunhofer.aisec.cpg.TranslationManager.parseParallel(TranslationManager.kt:265) ~[cpg-core-master-SNAPSHOT.jar:?]
at de.fraunhofer.aisec.cpg.TranslationManager.runFrontends(TranslationManager.kt:202) ~[cpg-core-master-SNAPSHOT.jar:?]
at de.fraunhofer.aisec.cpg.TranslationManager.analyze$lambda-2(TranslationManager.kt:86) ~[cpg-core-master-SNAPSHOT.jar:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1692) ~[?:?]
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290) ~[?:?]
at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020) ~[?:?]
at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656) ~[?:?]
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594) ~[?:?]
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177) ~[?:?]
And here another related stack trace:
Caused by: java.util.ConcurrentModificationException
at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:1042) ~[?:?]
at java.util.ArrayList$Itr.next(ArrayList.java:996) ~[?:?]
at java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1047) ~[?:?]
at de.fraunhofer.aisec.cpg.TranslationManager.runFrontends(TranslationManager.kt:415) ~[cpg-core-master-SNAPSHOT.jar:?]
at de.fraunhofer.aisec.cpg.TranslationManager.analyze$lambda-2(TranslationManager.kt:86) ~[cpg-core-master-SNAPSHOT.jar:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1692) ~[?:?]
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290) ~[?:?]
at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020) ~[?:?]
at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656) ~[?:?]
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594) ~[?:?]
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177) ~[?:?]
Seems related to https://github.com/Fraunhofer-AISEC/cpg/issues/651 however this time, typeSystemActiveInFrontend is explicitly set to false .
Regards, Tom
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
How to Avoid the Concurrent Modification Exception in Java
The ConcurrentModificationException in Java occurs when an object is attempted to be modified concurrently without permission.
Read more >ConcurrentModificationException (Java Platform SE 7 )
This exception may be thrown by methods that have detected concurrent modification of an object when such modification is not permissible.
Read more >java.util.ConcurrentModificationException - DigitalOcean
ConcurrentModificationException is a very common exception when working with Java collection classes. Java Collection classes are fail-fast, ...
Read more >Fix the ConcurrentModificationException | TechTarget
Java's ConcurrentModificationException is thrown when a collection is modified while a Java Iterator is trying to loop through it.
Read more >ConcurrentModificationException in Java with Examples
If we invoke a sequence of methods on an object that violates its contract, then the object throws ConcurrentModificationException.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hm I ran my program several times and the Exception is not appearing yet. So it may be fixed or I just havn’t encountered it yet
Does it fix the concurrent modification exceptions as well?