JDK-8246203 : Segmentation fault in verification due to stack overflow with -XX:+VerifyIterativeGVN
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,12,13,14,15,16
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-05-31
  • Updated: 2020-08-18
  • Resolved: 2020-06-15
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 11 JDK 16
11.0.9-oracleFixed 16 b02Fixed
Related Reports
Relates :  
Relates :  
Description
Test name: test/hotspot/jtreg/compiler/loopopts/TestMoveStoreAfterLoopVerifyIterativeGVN.java
Product tested: JDK 11.0.8 b08 fastdebug
OS: Solaris sparc
VM options: -Xcomp -XX:+CreateCoredumpOnCrash -ea -esa -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions -server -XX:-TieredCompilation -XX:-UseCompressedOops
Reproducible: Intermittent (failed 11 out of 20 times)
Regression: N/A (Test introduced in 11.0.8)
Comments
Fix request (11u) -- will label after testing completed. I would like to downport this for parity with 11.0.9-oracle. Applies clean, but there is an additional verify() call that needs to be adapted: http://mail.openjdk.java.net/pipermail/jdk-updates-dev/2020-June/003361.html http://mail.openjdk.java.net/pipermail/jdk-updates-dev/2020-July/003444.html Test mentioned above passes.
08-07-2020

Changeset: 08df6a1f Author: Christian Hagedorn <chagedorn@openjdk.org> Date: 2020-06-15 09:50:11 +0000 URL: https://git.openjdk.java.net/lanai/commit/08df6a1f
02-07-2020

Changeset: 08df6a1f Author: Christian Hagedorn <chagedorn@openjdk.org> Date: 2020-06-15 09:50:11 +0000 URL: https://git.openjdk.java.net/panama-foreign/commit/08df6a1f
02-07-2020

Changeset: 08df6a1f Author: Christian Hagedorn <chagedorn@openjdk.org> Date: 2020-06-15 09:50:11 +0000 URL: https://git.openjdk.java.net/amber/commit/08df6a1f
02-07-2020

Sorry, yes, that was by accident.
25-06-2020

Assigning back to [~chagedorn], assuming [~goetz] re-assigned by accident.
25-06-2020

URL: https://hg.openjdk.java.net/jdk/jdk/rev/49fee4ea8073 User: chagedorn Date: 2020-06-15 09:24:19 +0000
15-06-2020

As this is a P4 only, I deferred it to 16 since the review is still in process.
11-06-2020

http://cr.openjdk.java.net/~chagedorn/8246203/webrev.01/ The testcase creates a deep graph with a lot of nodes on a chain. When running with -XX:+VerifyIterativeGVN, it recursively calls Node::verify_recur() for each input node discovered which eventually results in a segmentation fault due to a stack overflow (around 10000 recursive calls due to such a long chain of nodes). The fix just converts the recursive algorithm into an iterative one to avoid a segmentation fault.
10-06-2020

I could also reproduce this stack overflow segmentation fault in Node::verify_recur() in JDK 15. The recursion gets too deep with a graph that has a very long chain of nodes to verify with -XX:+VerifyIterativeGVN. A solution would be to change the recursive verification approach to an iterative one. To reproduce: java -XX:-TieredCompilation -Xbatch -Xcomp -XX:CompileCommand=compileonly,Test::* -XX:+VerifyIterativeGVN Test.java
09-06-2020