JDK-8231099 : VerificationError: "must be counted" error in Graal CountedLoopTest
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 14
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2019-09-17
  • 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 14
14Resolved
Related Reports
Duplicate :  
Description
1) decrementUnsigned7(org.graalvm.compiler.core.test.CountedLoopTest)
org.graalvm.compiler.graph.VerificationError: must be counted
	at node: 53|IVProperty
	at jdk.internal.vm.compiler@14-internal/org.graalvm.compiler.graph.Node.fail(Node.java:1173)
	at jdk.internal.vm.compiler@14-internal/org.graalvm.compiler.graph.Node.assertTrue(Node.java:1160)
	at org.graalvm.compiler.core.test.CountedLoopTest$IVPropertyNode.rewrite(CountedLoopTest.java:569)
	at org.graalvm.compiler.core.test.CountedLoopTest.checkHighTierGraph(CountedLoopTest.java:643)
	at org.graalvm.compiler.core.test.GraalCompilerTest$2.run(GraalCompilerTest.java:290)
	at jdk.internal.vm.compiler@14-internal/org.graalvm.compiler.phases.Phase.run(Phase.java:49)
	at jdk.internal.vm.compiler@14-internal/org.graalvm.compiler.phases.BasePhase.apply(BasePhase.java:197)
	at jdk.internal.vm.compiler@14-internal/org.graalvm.compiler.phases.BasePhase.apply(BasePhase.java:139)
	at jdk.internal.vm.compiler@14-internal/org.graalvm.compiler.phases.PhaseSuite.run(PhaseSuite.java:209)
	at jdk.internal.vm.compiler@14-internal/org.graalvm.compiler.phases.BasePhase.apply(BasePhase.java:197)
	at jdk.internal.vm.compiler@14-internal/org.graalvm.compiler.phases.BasePhase.apply(BasePhase.java:139)
	at jdk.internal.vm.compiler@14-internal/org.graalvm.compiler.core.GraalCompiler.emitFrontEnd(GraalCompiler.java:220)
	at jdk.internal.vm.compiler@14-internal/org.graalvm.compiler.core.GraalCompiler.compile(GraalCompiler.java:144)
	at org.graalvm.compiler.core.test.GraalCompilerTest.compile(GraalCompilerTest.java:1106)
	at org.graalvm.compiler.core.test.GraalCompilerTest.getCode(GraalCompilerTest.java:999)
	at org.graalvm.compiler.core.test.GraalCompilerTest.getCode(GraalCompilerTest.java:940)
	at org.graalvm.compiler.core.test.GraalCompilerTest.executeActual(GraalCompilerTest.java:768)
	at org.graalvm.compiler.core.test.GraalCompilerTest.executeActualCheckDeopt(GraalCompilerTest.java:900)
	at org.graalvm.compiler.core.test.GraalCompilerTest.testAgainstExpected(GraalCompilerTest.java:890)
	at org.graalvm.compiler.core.test.GraalCompilerTest.testAgainstExpected(GraalCompilerTest.java:886)
	at org.graalvm.compiler.core.test.GraalCompilerTest.test(GraalCompilerTest.java:855)
	at org.graalvm.compiler.core.test.GraalCompilerTest.test(GraalCompilerTest.java:824)
	at org.graalvm.compiler.core.test.GraalCompilerTest.test(GraalCompilerTest.java:817)
	at org.graalvm.compiler.core.test.CountedLoopTest.testCounted(CountedLoopTest.java:685)
	at org.graalvm.compiler.core.test.CountedLoopTest.testCounted(CountedLoopTest.java:671)
	at org.graalvm.compiler.core.test.CountedLoopTest.decrementUnsigned7(CountedLoopTest.java:524)
Comments
Ok, I'll make a note to link this to the next one.
12-12-2019

It should be fixed by GR-20003 which isn't in the current Graal update.
12-12-2019

[~dnsimon] [~never] Do we know which change fixed that?
12-12-2019

[~iveresov] should this be linked with JDK-8235634 or will it only make it into the following Graal update? Is there an issue for the latter yet?
12-12-2019

I believe this should be fixed by the next Graal update. There was bug with some optimization flags in the test which likely lead to this problem.
12-12-2019

Please note added testbug label based on above comments. Kindly remove this label if wrong. Thanks.
10-12-2019

I just checked our gate runs and found a couple instances of it failing recently that included an IGV dump. Interestingly it has failed 3 times in the last 3 weeks but not in the previous 6 months. Anyway it looks like there's a floating guard in the loop that leads to unreached code and maybe that keeps it from being recognized as a counted? I've attached countedLoop.bgv which shows the failing graph. A normal succeeding run has no deopts. So maybe these tests should be ignoring the profiles? [~gdub] Either way I think this isn't an important issue for 14. It looks like it's purely a testing issue and not an actual bug.
09-12-2019

[~never] [~gdub] do either of you have any insights into this failure? I don't understand the test well enough to start guessing where the error may be.
06-12-2019

I haven't been able to reproduce it either.
17-09-2019

It may be intermittent. There have only been two failures so far, and both were with fastdebug builds. The failures were using jtreg to run compiler/graalunit/CoreTest.java with these flags: -XX:+CreateCoredumpOnCrash -ea -esa -server -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:-UseJVMCICompiler.
17-09-2019

How are you running this? I'm not having any luck reproducing this on macOS with release build of JDK14 tip against tip GitHub Graal. Do I need to use fastdebug maybe?
17-09-2019

[~dnsimon], could you look at this?
17-09-2019