JDK-8274074 : SIGFPE with C2 compiled code with -XX:+StressGCM
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 17,18
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-09-21
  • Updated: 2022-06-07
  • Resolved: 2021-09-27
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 17 JDK 18
17.0.2Fixed 18 b17Fixed
Related Reports
Relates :  
Relates :  
Description
The attached JavaFuzzer test crashes with SIGFPE after JDK-8252372:

To reproduce:
$ java -Xcomp -XX:CompileOnly=Test -XX:-TieredCompilation -XX:+StressGCM -XX:StressSeed=307976640 Test.java
$ java -Xcomp -XX:CompileOnly=Reduced -XX:-TieredCompilation -XX:+StressGCM -XX:StressSeed=4177789702 Reduced.java

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGFPE (0x8) at pc=0x00007fa8017d7912, pid=20735, tid=20736
#
# JRE version: Java(TM) SE Runtime Environment (17.0+35) (fastdebug build 17+35-LTS-2724)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 17+35-LTS-2724, compiled mode, sharing, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# J 3 c2 Test.mainTest([Ljava/lang/String;)V (838 bytes) @ 0x00007fa8017d7912 [0x00007fa8017d7620+0x00000000000002f2]
.............
Command Line: -Xmx1G -Xcomp -Xbatch -XX:CompileOnly=Test -XX:CompileCommand=quiet -XX:-TieredCompilation -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+StressLCM -XX:+StressGCM -XX:+StressIGVN -XX:StressSeed=307976640 Test
.............
Current thread (0x00007fa80c028b10):  JavaThread "main" [_thread_in_Java, id=20736, stack(0x00007fa815b1b000,0x00007fa815c1c000)]

Stack: [0x00007fa815b1b000,0x00007fa815c1c000],  sp=0x00007fa815c1a8f0,  free space=1022k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
J 3 c2 Test.mainTest([Ljava/lang/String;)V (838 bytes) @ 0x00007fa8017d7912 [0x00007fa8017d7620+0x00000000000002f2]
J 2 c2 Test.main([Ljava/lang/String;)V (45 bytes) @ 0x00007fa8017d9598 [0x00007fa8017d93a0+0x00000000000001f8]
v  ~StubRoutines::call_stub
V  [libjvm.so+0xe95914]  JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x504
V  [libjvm.so+0xfd1035]  jni_invoke_static(JNIEnv_*, JavaValue*, _jobject*, JNICallType, _jmethodID*, JNI_ArgumentPusher*, JavaThread*) [clone .constprop.1]+0x375
V  [libjvm.so+0xfd4675]  jni_CallStaticVoidMethod+0x1c5
C  [libjli.so+0x47e7]  JavaMain+0xd37
C  [libjli.so+0x7d19]  ThreadJavaMain+0x9
Comments
Putting the backport to JDK 17 on hold because a regression (JDK-8274406) showed up.
29-09-2021

Fix request (17u): The bug leads to SIGFPE during execution of C2 compiled code (regression in JDK 17). The fix is low risk and has been tested in the JDK 18 for a while and with tier1-3 in JDK 17u. The patch applies cleanly.
28-09-2021

Changeset: b0983df5 Author: Christian Hagedorn <chagedorn@openjdk.org> Date: 2021-09-27 14:05:51 +0000 URL: https://git.openjdk.java.net/jdk/commit/b0983df5a404adb2f547d714d0fd19a090d1b3d3
27-09-2021

ILW = SIGFPE crash in C2 compiled code, only single JavaFuzzer test, use -XX:-SplitIfBlocks or disable compilation of affected method = HLM = P3
21-09-2021