Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when enabling parallel passes #1678

Open
maximiliankaul opened this issue Sep 6, 2024 · 1 comment
Open

Crash when enabling parallel passes #1678

maximiliankaul opened this issue Sep 6, 2024 · 1 comment
Assignees

Comments

@maximiliankaul
Copy link
Contributor

maximiliankaul commented Sep 6, 2024

To reproduce, clone https://github.com/openstack/glance and run ./gradlew :cpg-neo4j:run --args="../../glance/ --no-neo4j" and modify neo4j to use .useParallelPasses(true).

...
15:49:29,345 INFO  MeasurementHolder TranslationManager: Translation into full graph done in 93131 ms
java.util.concurrent.ExecutionException: java.util.ConcurrentModificationException
        at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
        at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2073)
        at de.fraunhofer.aisec.cpg_vis_neo4j.Application.call(Application.kt:613)
        at de.fraunhofer.aisec.cpg_vis_neo4j.Application.call(Application.kt:88)
        at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
        at picocli.CommandLine.access$1500(CommandLine.java:148)
        at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
        at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
        at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
        at picocli.CommandLine.execute(CommandLine.java:2170)
        at de.fraunhofer.aisec.cpg_vis_neo4j.ApplicationKt.main(Application.kt:654)
Caused by: java.util.ConcurrentModificationException
        at java.base/java.util.ArrayList$Itr.checkForComodification(ArrayList.java:1013)
        at java.base/java.util.ArrayList$Itr.next(ArrayList.java:967)
        at de.fraunhofer.aisec.cpg.graph.edges.collections.EdgeCollectionKt.internalToNodeCollection(EdgeCollection.kt:180)
        at de.fraunhofer.aisec.cpg.graph.edges.collections.EdgeList.toNodeCollection(EdgeList.kt:107)
        at de.fraunhofer.aisec.cpg.graph.edges.collections.EdgeList.toNodeCollection(EdgeList.kt:33)
        at de.fraunhofer.aisec.cpg.helpers.SubgraphWalker.getAstChildren(SubgraphWalker.kt:114)
        at de.fraunhofer.aisec.cpg.helpers.SubgraphWalker.flattenASTInternal(SubgraphWalker.kt:154)
        at de.fraunhofer.aisec.cpg.helpers.SubgraphWalker.flattenAST(SubgraphWalker.kt:145)
        at de.fraunhofer.aisec.cpg.passes.ControlDependenceGraphPass.accept(ControlDependenceGraphPass.kt:442)
        at de.fraunhofer.aisec.cpg.passes.ControlDependenceGraphPass.accept(ControlDependenceGraphPass.kt:45)
        at de.fraunhofer.aisec.cpg.passes.PassKt$consumeTargets$futures$1$1.get(Pass.kt:426)
        at de.fraunhofer.aisec.cpg.passes.PassKt$consumeTargets$futures$1$1.get(Pass.kt:314)
        at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
        at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760)
        at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
        at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
        at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
        at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
        at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)

There is no issue when using the default configuration.

@maximiliankaul maximiliankaul changed the title Crash when enabling parallel passes and frontends Crash when enabling parallel passes Sep 6, 2024
@oxisto
Copy link
Member

oxisto commented Sep 6, 2024

Could have been introduced in the edge lists. Assigning to myself.

@oxisto oxisto self-assigned this Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants