Details
-
Bug
-
Resolution: Fixed
-
P4
-
11, 12, 13, 14
-
b25
-
aarch64
-
linux
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8246140 | 13.0.4 | Xiaohong Gong | P4 | Resolved | Fixed | b03 |
JDK-8256612 | 11.0.11-oracle | Dukebot | P4 | Resolved | Fixed | b01 |
JDK-8234620 | 11.0.6 | Xiaohong Gong | P4 | Resolved | Fixed | b05 |
Description
The JVM crashes frequently when running graal "CTW" task with jdk11u. It throws an "Illegal Instruction" exception:
12:28:33 #
12:28:33 # A fatal error has been detected by the Java Runtime Environment:
12:28:33 #
12:28:33 # SIGILL (0x4) at pc=0x0000000800001ac8, pid=11787, tid=11788
12:28:33 #
12:28:33 # JRE version: OpenJDK Runtime Environment (11.0.4+11) (build 11.0.4+11-post-Ubuntu-1ubuntu218.04.3)
12:28:33 # Java VM: OpenJDK 64-Bit Server VM (11.0.4+11-post-Ubuntu-1ubuntu218.04.3, mixed mode, sharing, tiered, jvmci, compressed oops, g1 gc, linux-aarch64)
12:28:33 # Problematic frame:
12:28:33 # C 0x0000000800001ac8
12:28:33 #
12:28:33 # Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %d %P" (or dumping to /home/ent-user/ci- scripts/core.11787)
12:28:33 #
12:28:33 # An error report file with more information is saved as:
12:28:33 # /home/ent-user/ci-scripts/hs_err_pid11787.log
This is the illegal instruction at 0x0000000800001ac8:
800001ac8 mov x8, #0x9f0 // #2544
800001acc movk x8, #0x7c41, lsl #16
800001ad0 movk x8, #0xffff, lsl #32
800001ad4 br x8
And this is part of the dynamic libraries:
800000000-800002000 rwxp 00001000 08:01 126944208 /home/xiagon01/code/graal/compiler/mxbuild/linux-aarch64/graaljdks/jdk11-cmp/lib/server/classes.jsa
The illegal instructions are in the CDS CODE section (trampoline), which means the target is a shared method in the CDS archive. And the issue happens at trampoline when it jumps to the real entry of the target.
Codes in hotspot shows that after the CDS archive is loaded to generate the trampolines for shared methods, it doesn't flush the cache which will invalidate the ICache. This is important on AArch64 because existing CPUs don't have a coherent icache. So an instruction fetch could read old data without this.
The whole log (hs_err_pid30916.log) is also attached here.
12:28:33 #
12:28:33 # A fatal error has been detected by the Java Runtime Environment:
12:28:33 #
12:28:33 # SIGILL (0x4) at pc=0x0000000800001ac8, pid=11787, tid=11788
12:28:33 #
12:28:33 # JRE version: OpenJDK Runtime Environment (11.0.4+11) (build 11.0.4+11-post-Ubuntu-1ubuntu218.04.3)
12:28:33 # Java VM: OpenJDK 64-Bit Server VM (11.0.4+11-post-Ubuntu-1ubuntu218.04.3, mixed mode, sharing, tiered, jvmci, compressed oops, g1 gc, linux-aarch64)
12:28:33 # Problematic frame:
12:28:33 # C 0x0000000800001ac8
12:28:33 #
12:28:33 # Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %d %P" (or dumping to /home/ent-user/ci- scripts/core.11787)
12:28:33 #
12:28:33 # An error report file with more information is saved as:
12:28:33 # /home/ent-user/ci-scripts/hs_err_pid11787.log
This is the illegal instruction at 0x0000000800001ac8:
800001ac8 mov x8, #0x9f0 // #2544
800001acc movk x8, #0x7c41, lsl #16
800001ad0 movk x8, #0xffff, lsl #32
800001ad4 br x8
And this is part of the dynamic libraries:
800000000-800002000 rwxp 00001000 08:01 126944208 /home/xiagon01/code/graal/compiler/mxbuild/linux-aarch64/graaljdks/jdk11-cmp/lib/server/classes.jsa
The illegal instructions are in the CDS CODE section (trampoline), which means the target is a shared method in the CDS archive. And the issue happens at trampoline when it jumps to the real entry of the target.
Codes in hotspot shows that after the CDS archive is loaded to generate the trampolines for shared methods, it doesn't flush the cache which will invalidate the ICache. This is important on AArch64 because existing CPUs don't have a coherent icache. So an instruction fetch could read old data without this.
The whole log (hs_err_pid30916.log) is also attached here.
Attachments
Issue Links
- backported by
-
JDK-8234620 Call cache flush after generating trampoline.
- Resolved
-
JDK-8246140 Call cache flush after generating trampoline.
- Resolved
-
JDK-8256612 Call cache flush after generating trampoline.
- Resolved