graalvm native-image compatibility

Description

I have a command line tool that benefits greatly from the ability to be compiled into a native executable. It works fine with Clojure 1.9 but doesn't compile with Clojure 1.10

I narrowed down the issue and made a reproduction project:
broken (Clojure 1.10) build log
working (Clojure 1.9) build log
diff

Error log:

Error: unbalanced monitors: mismatch at monitorexit, 96|LoadField#lockee_5436auto_ != 3|LoadField#lockee_5436auto_
Detailed message:
Error: unbalanced monitors: mismatch at monitorexit, 96|LoadField#lockee_5436auto_ != 3|LoadField#lockee_5436auto_
Call path from entry point to clojure.spec.gen.alpha$dynaload$fn__2628.invoke():
at clojure.spec.gen.alpha$dynaload$fn__2628.invoke(alpha.clj:21)
at clojure.lang.AFn.applyToHelper(AFn.java:152)
at clojure.lang.AFn.applyTo(AFn.java:144)
at clj10_graal_repro.core.main(Unknown Source)
at com.oracle.svm.core.JavaMainWrapper.run(JavaMainWrapper.java:152)
at com.oracle.svm.core.code.IsolateEnterStub.JavaMainWrapper_run_5087f5482cc9a6abc971913ece43acb471d2631b(generated:0)
Original exception that caused the problem: org.graalvm.compiler.code.SourceStackTraceBailoutException$1: unbalanced monitors: mismatch at monitorexit, 96|LoadField#lockee_5436auto_ != 3|LoadField#lockee_5436auto_
at clojure.spec.gen.alpha$dynaload$fn__2628.invoke(alpha.clj:22)
Caused by: org.graalvm.compiler.core.common.PermanentBailoutException: unbalanced monitors: mismatch at monitorexit, 96|LoadField#lockee_5436auto_ != 3|LoadField#lockee_5436auto_
at org.graalvm.compiler.java.BytecodeParser.bailout(BytecodeParser.java:3673)
at org.graalvm.compiler.java.BytecodeParser.genMonitorExit(BytecodeParser.java:2654)
at org.graalvm.compiler.java.BytecodeParser.processBytecode(BytecodeParser.java:5031)
at org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3184)
at org.graalvm.compiler.java.BytecodeParser.processBlock(BytecodeParser.java:2993)
at org.graalvm.compiler.java.BytecodeParser.build(BytecodeParser.java:890)
at org.graalvm.compiler.java.BytecodeParser.buildRootMethod(BytecodeParser.java:784)
at org.graalvm.compiler.java.GraphBuilderPhase$Instance.run(GraphBuilderPhase.java:95)
at org.graalvm.compiler.phases.Phase.run(Phase.java:49)
at org.graalvm.compiler.phases.BasePhase.apply(BasePhase.java:197)
at org.graalvm.compiler.phases.Phase.apply(Phase.java:42)
at org.graalvm.compiler.phases.Phase.apply(Phase.java:38)
at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.parse(MethodTypeFlowBuilder.java:205)
at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.apply(MethodTypeFlowBuilder.java:324)
at com.oracle.graal.pointsto.flow.MethodTypeFlow.doParse(MethodTypeFlow.java:310)
at com.oracle.graal.pointsto.flow.MethodTypeFlow.ensureParsed(MethodTypeFlow.java:300)
at com.oracle.graal.pointsto.flow.MethodTypeFlow.addContext(MethodTypeFlow.java:107)
at com.oracle.graal.pointsto.flow.SpecialInvokeTypeFlow.onObservedUpdate(InvokeTypeFlow.java:421)
at com.oracle.graal.pointsto.flow.TypeFlow.notifyObservers(TypeFlow.java:347)
at com.oracle.graal.pointsto.flow.TypeFlow.update(TypeFlow.java:389)
at com.oracle.graal.pointsto.flow.SourceTypeFlowBase.update(SourceTypeFlowBase.java:121)
at com.oracle.graal.pointsto.BigBang$2.run(BigBang.java:508)
at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$execute$0(CompletionExecutor.java:174)
at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Error: Use -H:+ReportExceptionStackTraces to print stacktrace of underlying exception
Error: Image building with exit status 1

Error log with-H:+ReportExceptionStackTraces in attachment.

Environment

docker

Activity

Show:
Alex Miller
February 15, 2019, 1:47 PM

This is a dupe of the issue in if you want to add info there.

import
February 15, 2019, 1:48 PM

Comment made by: jare

Apparently Docker hub logs aren't public anymore. At least not failed one. So I'll link them here:

Clojure 1.9 log
Clojure 1.10 log

import
February 15, 2019, 1:51 PM

Comment made by: jare

OK. Thx.

Duplicate

Assignee

Unassigned

Reporter

import

Labels

Approval

None

Patch

None

Affects versions

Priority

Major