-
Bug
-
Resolution: Fixed
-
P2
-
11, 17, 21, 23
-
b22
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8333946 | 21.0.5-oracle | Tobias Hartmann | P2 | Closed | Fixed | b01 |
JDK-8334159 | 21.0.5 | Martin Doerr | P2 | Resolved | Fixed | b01 |
We can observe frequent crashes if _stress_seed is initialized to a non-zero value also for runtime stub compilation just as it is for method compilation. The issue appears to be specific to aarch64.
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00000000a5217f30, pid=1348773, tid=1348793
#
# JRE version: Java(TM) SE Runtime Environment (23.0) (fastdebug build [name])
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug [name], mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-aarch64)
# Problematic frame:
# C 0x00000000a5217f30
[...]
Current thread (0x0000ffff9840cc20): JavaThread "MainThread" [_thread_in_Java, id=1348793, stack(0x0000ffff53208000,0x0000ffff53406000) (2040K)]
Stack: [0x0000ffff53208000,0x0000ffff53406000], sp=0x0000ffff53403ef0, free space=2031k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C 0x00000000a5217f30
Run tier1 with -XX:+StressLCM -XX:+StressGCM -XX:+StressIGVN with the following patch applied to reproduce the issue:
---
src/hotspot/share/opto/compile.cpp | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/src/hotspot/share/opto/compile.cpp b/src/hotspot/share/opto/compile.cpp
index 417f828013f92..df6511b73a3e3 100644
--- a/src/hotspot/share/opto/compile.cpp
+++ b/src/hotspot/share/opto/compile.cpp
@@ -979,6 +979,21 @@ Compile::Compile( ciEnv* ci_env,
_igvn_worklist = new (comp_arena()) Unique_Node_List(comp_arena());
_types = new (comp_arena()) Type_Array(comp_arena());
_node_hash = new (comp_arena()) NodeHash(comp_arena(), 255);
+
+ // If any phase is randomized for stress testing, seed random number
+ // generation and log the seed for repeatability.
+ if (StressLCM || StressGCM || StressIGVN || StressCCP || StressIncrementalInlining || StressMacroExpansion) {
+ if (FLAG_IS_DEFAULT(StressSeed) || (FLAG_IS_ERGO(StressSeed) && directive->RepeatCompilationOption)) {
+ _stress_seed = static_cast<uint>(Ticks::now().nanoseconds());
+ FLAG_SET_ERGO(StressSeed, _stress_seed);
+ } else {
+ _stress_seed = StressSeed;
+ }
+ if (_log != nullptr) {
+ _log->elem("stress_test seed='%u'", _stress_seed);
+ }
+ }
+
{
PhaseGVN gvn;
set_initial_gvn(&gvn); // not significant, but GraphKit guys use it pervasively
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00000000a5217f30, pid=1348773, tid=1348793
#
# JRE version: Java(TM) SE Runtime Environment (23.0) (fastdebug build [name])
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug [name], mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-aarch64)
# Problematic frame:
# C 0x00000000a5217f30
[...]
Current thread (0x0000ffff9840cc20): JavaThread "MainThread" [_thread_in_Java, id=1348793, stack(0x0000ffff53208000,0x0000ffff53406000) (2040K)]
Stack: [0x0000ffff53208000,0x0000ffff53406000], sp=0x0000ffff53403ef0, free space=2031k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C 0x00000000a5217f30
Run tier1 with -XX:+StressLCM -XX:+StressGCM -XX:+StressIGVN with the following patch applied to reproduce the issue:
---
src/hotspot/share/opto/compile.cpp | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/src/hotspot/share/opto/compile.cpp b/src/hotspot/share/opto/compile.cpp
index 417f828013f92..df6511b73a3e3 100644
--- a/src/hotspot/share/opto/compile.cpp
+++ b/src/hotspot/share/opto/compile.cpp
@@ -979,6 +979,21 @@ Compile::Compile( ciEnv* ci_env,
_igvn_worklist = new (comp_arena()) Unique_Node_List(comp_arena());
_types = new (comp_arena()) Type_Array(comp_arena());
_node_hash = new (comp_arena()) NodeHash(comp_arena(), 255);
+
+ // If any phase is randomized for stress testing, seed random number
+ // generation and log the seed for repeatability.
+ if (StressLCM || StressGCM || StressIGVN || StressCCP || StressIncrementalInlining || StressMacroExpansion) {
+ if (FLAG_IS_DEFAULT(StressSeed) || (FLAG_IS_ERGO(StressSeed) && directive->RepeatCompilationOption)) {
+ _stress_seed = static_cast<uint>(Ticks::now().nanoseconds());
+ FLAG_SET_ERGO(StressSeed, _stress_seed);
+ } else {
+ _stress_seed = StressSeed;
+ }
+ if (_log != nullptr) {
+ _log->elem("stress_test seed='%u'", _stress_seed);
+ }
+ }
+
{
PhaseGVN gvn;
set_initial_gvn(&gvn); // not significant, but GraphKit guys use it pervasively
- backported by
-
JDK-8334159 TailCall should not use frame pointer register for jump target
-
- Resolved
-
-
JDK-8333946 TailCall should not use frame pointer register for jump target
-
- Closed
-
- relates to
-
JDK-8330016 Stress seed should be initialized for runtime stub compilation
-
- Resolved
-
- links to
-
Commit openjdk/jdk21u-dev/45d5ae08
-
Commit openjdk/jdk/cccc9535
-
Review openjdk/jdk21u-dev/694
-
Review openjdk/jdk/18716
(2 links to)