graalvm 2024-06-07

Got the BouncyCastle to work on my Macbook Pro. Stuck it into a Github action pipeline that builds mac, windows and linux native images. MacOS one works but both linux and windows one fail with this error:

Fatal error: org.graalvm.compiler.debug.GraalError: java.lang.StackOverflowError
	at method: void org.bouncycastle.pqc.crypto.falcon.FalconKeyGen.poly_sub_scaled(int[], int, int, int, int[], int, int, int, int[], int, int, int, int)  [Direct call from int FalconKeyGen.solve_NTRU_intermediate(int, byte[], int, byte[], int, int, int[], int)]
	at com.oracle.svm.hosted.code.CompileQueue.defaultCompileFunction(CompileQueue.java:1297)
	at com.oracle.svm.hosted.code.CompileQueue.doCompile(CompileQueue.java:1226)
	at com.oracle.svm.hosted.code.CompileQueue$CompileTask.run(CompileQueue.java:300)
	at com.oracle.graal.pointsto.util.CompletionExecutor.executeCommand(CompletionExecutor.java:187)
	at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$executeService$0(CompletionExecutor.java:171)
	at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1395)
	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)
Caused by: java.lang.StackOverflowError
	at jdk.internal.vm.compiler/org.graalvm.compiler.graph.NodeMap.put(NodeMap.java:281)
	at com.oracle.graal.graal_enterprise/com.oracle.graal.vector.phases.ConditionalMoveOptimizationPhase.a(stripped:366)
	at com.oracle.graal.graal_enterprise/com.oracle.graal.vector.phases.ConditionalMoveOptimizationPhase.c(stripped:338)
	at com.oracle.graal.graal_enterprise/com.oracle.graal.vector.phases.ConditionalMoveOptimizationPhase.c(stripped:341)
	at com.oracle.graal.graal_enterprise/com.oracle.graal.vector.phases.ConditionalMoveOptimizationPhase.c(stripped:341)
	at com.oracle.graal.graal_enterprise/com.oracle.graal.vector.phases.ConditionalMoveOptimizationPhase.c(stripped:341)
	at com.oracle.graal.graal_enterprise/com.oracle.graal.vector.phases.ConditionalMoveOptimizationPhase.c(stripped:341)
Has anyone got this error before?

👍 1

Doesn't seem familiar but maybe best to bring it to the GraalVM slack / native-image channel

Hm it seems it’s a bug

are you already using the newest graalvm?

no, I work adjacent to the people who manage toolchain for automatic builds

unfortunately

I guess I can disable to optimization

Can someone recommend a file/directory watcher library that works when compiled with native image?