graalvm

roklenarcic 2024-06-07T13:37:03.779609Z

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
borkdude 2024-06-07T13:43:04.345169Z

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

roklenarcic 2024-06-07T13:43:19.134939Z

Hm it seems it’s a bug

borkdude 2024-06-07T13:43:33.709729Z

are you already using the newest graalvm?

roklenarcic 2024-06-07T13:43:35.986829Z

https://github.com/oracle/graal/issues/7801

roklenarcic 2024-06-07T13:44:20.656609Z

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

roklenarcic 2024-06-07T13:44:24.129809Z

unfortunately

roklenarcic 2024-06-07T13:44:29.170359Z

I guess I can disable to optimization

Ingy döt Net 2024-06-07T17:02:05.267569Z

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