JDK-8185299 : [Graal] SPECjvm2008 crypto.rsa compilation problem
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 10
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2017-07-25
  • Updated: 2023-07-21
  • Resolved: 2023-07-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 10
10Resolved
Related Reports
Duplicate :  
Description
Running latest java from  jdk10/hs:

specjvm2008$ $JAVA_HOME/bin/java -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler -XX:+UseParallelGC -jar SPECjvm2008.jar -ikv -bt 4 -wt 10 -it 5 -i 1 crypto.rsa


  Benchmark:   crypto.rsa
  Run mode:    timed run
  Test type:   multi
  Threads:     4
  Warmup:      10s
  Iterations:  1
  Run length:  5s

Warmup (10s) begins: Tue Jul 25 03:41:22 PDT 2017
Dumping debug output in specjvm2008/dumps/1500979282501
Thread[JVMCI CompilerThread11,9,system]: Compilation of java.math.BigInteger.oddModPow(BigInteger, BigInteger) failed: org.graalvm.compiler.graph.GraalGraphError: Invalid frame state 261|FrameState@-6[INVALID_FRAMESTATE_BCI] associated with a side effect in org.graalvm.compiler.hotspot.replacements.BigIntegerSubstitutions.implMontgomerySquare(int[], int[], int, long, int[]) at a position that cannot be deoptimized to
	at parsing platform/jdk.internal.vm.compiler@10-internal/org.graalvm.compiler.hotspot.HotSpotBackend.implMontgomerySquare(HotSpotBackend.java:207) [bci: 12]
	at parsing platform/jdk.internal.vm.compiler@10-internal/org.graalvm.compiler.hotspot.replacements.BigIntegerSubstitutions.implMontgomerySquare(BigIntegerSubstitutions.java:77) [bci: 15]
	at parsing java.base@10-internal/java.math.BigInteger.montgomerySquare(BigInteger.java:2712) [bci: 45]
	at node: 629|Safepoint
	at jdk.internal.vm.compiler@10-internal/org.graalvm.compiler.hotspot.HotSpotDebugInfoBuilder.raiseInvalidFrameStateError(HotSpotDebugInfoBuilder.java:120)
	at jdk.internal.vm.compiler@10-internal/org.graalvm.compiler.hotspot.HotSpotDebugInfoBuilder.computeFrameForState(HotSpotDebugInfoBuilder.java:90)
	at jdk.internal.vm.compiler@10-internal/org.graalvm.compiler.core.gen.DebugInfoBuilder.build(DebugInfoBuilder.java:99)
	at jdk.internal.vm.compiler@10-internal/org.graalvm.compiler.core.gen.NodeLIRBuilder.stateForWithExceptionEdge(NodeLIRBuilder.java:727)
	at jdk.internal.vm.compiler@10-internal/org.graalvm.compiler.core.gen.NodeLIRBuilder.stateFor(NodeLIRBuilder.java:719)
	at jdk.internal.vm.compiler@10-internal/org.graalvm.compiler.core.gen.NodeLIRBuilder.state(NodeLIRBuilder.java:708)
	at jdk.internal.vm.compiler@10-internal/org.graalvm.compiler.hotspot.amd64.AMD64HotSpotNodeLIRBuilder.visitSafepointNode(AMD64HotSpotNodeLIRBuilder.java:123)
	at jdk.internal.vm.compiler@10-internal/org.graalvm.compiler.nodes.SafepointNode.generate(SafepointNode.java:59)
	at jdk.internal.vm.compiler@10-internal/org.graalvm.compiler.core.gen.NodeLIRBuilder.emitNode(NodeLIRBuilder.java:455)
	at jdk.internal.vm.compiler@10-internal/org.graalvm.compiler.core.gen.NodeLIRBuilder.doRoot(NodeLIRBuilder.java:445)
	at jdk.internal.vm.compiler@10-internal/org.graalvm.compiler.core.gen.NodeLIRBuilder.doBlock(NodeLIRBuilder.java:362)
	at jdk.internal.vm.compiler@10-internal/org.graalvm.compiler.core.LIRGenerationPhase.emitBlock(LIRGenerationPhase.java:79)
	at jdk.internal.vm.compiler@10-internal/org.graalvm.compiler.core.LIRGenerationPhase.run(LIRGenerationPhase.java:69)
	at jdk.internal.vm.compiler@10-internal/org.graalvm.compiler.core.LIRGenerationPhase.run(LIRGenerationPhase.java:44)
	at jdk.internal.vm.compiler@10-internal/org.graalvm.compiler.lir.phases.LIRPhase.apply(LIRPhase.java:115)
	at jdk.internal.vm.compiler@10-internal/org.graalvm.compiler.lir.phases.LIRPhase.apply(LIRPhase.java:107)
	at jdk.internal.vm.compiler@10-internal/org.graalvm.compiler.core.GraalCompiler.emitLIR0(GraalCompiler.java:312)
	at jdk.internal.vm.compiler@10-internal/org.graalvm.compiler.core.GraalCompiler.emitLIR(GraalCompiler.java:276)
	at jdk.internal.vm.compiler@10-internal/org.graalvm.compiler.core.GraalCompiler.emitBackEnd(GraalCompiler.java:256)
	at jdk.internal.vm.compiler@10-internal/org.graalvm.compiler.core.GraalCompiler.compile(GraalCompiler.java:173)
	at jdk.internal.vm.compiler@10-internal/org.graalvm.compiler.core.GraalCompiler.compileGraph(GraalCompiler.java:158)
	at jdk.internal.vm.compiler@10-internal/org.graalvm.compiler.hotspot.HotSpotGraalCompiler.compile(HotSpotGraalCompiler.java:180)
	at jdk.internal.vm.compiler@10-internal/org.graalvm.compiler.hotspot.CompilationTask$HotSpotCompilationWrapper.performCompilation(CompilationTask.java:168)
	at jdk.internal.vm.compiler@10-internal/org.graalvm.compiler.hotspot.CompilationTask$HotSpotCompilationWrapper.performCompilation(CompilationTask.java:93)
	at jdk.internal.vm.compiler@10-internal/org.graalvm.compiler.core.CompilationWrapper.run(CompilationWrapper.java:165)
	at jdk.internal.vm.compiler@10-internal/org.graalvm.compiler.hotspot.CompilationTask.runCompilation(CompilationTask.java:312)
	at jdk.internal.vm.compiler@10-internal/org.graalvm.compiler.hotspot.HotSpotGraalCompiler.compileMethod(HotSpotGraalCompiler.java:142)
	at jdk.internal.vm.compiler@10-internal/org.graalvm.compiler.hotspot.HotSpotGraalCompiler.compileMethod(HotSpotGraalCompiler.java:108)
	at jdk.internal.vm.ci/jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.compileMethod(HotSpotJVMCIRuntime.java:433)
To disable compilation failure notifications, set CompilationFailureAction to Silent (e.g., -Dgraal.CompilationFailureAction=Silent).
To print a message for a compilation failure without retrying the compilation, set CompilationFailureAction to Print (e.g., -Dgraal.CompilationFailureAction=Print).
Retrying compilation of java.math.BigInteger.oddModPow(BigInteger, BigInteger)

Comments
Will be resolved by JDK-8190710.
03-11-2017

This is fixed by https://github.com/graalvm/graal/commit/8f5bf229e1 which I think should be in the graal update RFE.
17-08-2017

Sometimes when we compile these intrinsics we are missing a valid state for the deopt. These particular ones are special because they return non-void but are simply runtime calls, so we need an extra node to represent the deopt state. In JDK8 for whatever reason there's a nearby state that can be used but somehow for this case it's not there. I've got a fix in progress that ensures there's a valid state afterward parsing these kinds of intrinsics.
27-07-2017

ILW = Compilation failure; with Graal; disable Graal = HLM = P3
26-07-2017