JDK-8290082 : [PPC64] ZGC C2 load barrier stub needs to preserve vector registers
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 17,19,20
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • CPU: ppc
  • Submitted: 2022-07-11
  • Updated: 2022-07-18
  • Resolved: 2022-07-12
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 20
17.0.5Fixed 20 b06Fixed
Related Reports
Relates :  
Relates :  
Description
JDK-8289856 has uncovered a PPC64 bug which affects ZGC C2 load barriers:
#  Internal Error (src/hotspot/cpu/ppc/gc/z/zBarrierSetAssembler_ppc.cpp:485), pid=3200250, tid=3200674
#  fatal error: Register type is not known

V  [libjvm.so+0x1bf4944]  ZSaveLiveRegisters::iterate_over_register_mask(ZSaveLiveRegisters::IterationAction)+0x5b4
V  [libjvm.so+0x1bf1f54]  ZBarrierSetAssembler::generate_c2_load_barrier_stub(MacroAssembler*, ZLoadBarrierStubC2*) const+0xf4
V  [libjvm.so+0x1bf8b98]  ZBarrierSetC2::emit_stubs(CodeBuffer&) const+0x128

Vector registers may be live and get killed by ZGC load barrier stub.
Workaround: Use -XX:-SuperwordUseVSX when enabling ZGC.

Comments
Fix Request (17u): Fixes possible problem with vector registers (if gcc decides to use them). Required for JDK-8289856 to avoid errors in debug build. Applies cleanly.
12-07-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk17u-dev/pull/547 Date: 2022-07-12 15:15:53 +0000
12-07-2022

Changeset: 393dc7ad Author: Martin Doerr <mdoerr@openjdk.org> Date: 2022-07-12 13:31:51 +0000 URL: https://git.openjdk.org/jdk/commit/393dc7ade716485f4452d0185caf9e630e4c6139
12-07-2022

Note: This crash only happens with JDK-8289856 (jdk20). The code for preserving vector registers was missing since the initial implementation of ZGC on PPC64. Seems like GCC doesn't use them for the C++ code which is called at this point, so, no problems were observed in older jdk releases.
12-07-2022

ILW = crash; with ZGC; use -XX:-SuperwordUseVSX = HMM = P2
11-07-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/9453 Date: 2022-07-11 14:09:58 +0000
11-07-2022