RFR: JDK-8331859 : [PPC64] Remove support for Power7 and older [v17]
Martin Doerr
mdoerr at openjdk.org
Tue Jun 24 15:24:59 UTC 2025
On Tue, 24 Jun 2025 11:03:37 GMT, Hao Sun <haosun at openjdk.org> wrote:
>> Suchismith Roy has updated the pull request incrementally with one additional commit since the last revision:
>>
>> switch case
>
> Hi, I came across VM crash with SIGILL after this patch.
>
> ## My local test environment
>
> As I don't hava ppc64 hardware, I built one `ppc64le` Java binary with **cross-compilation** on Ubuntu-24.04 and ran `java -version` with **QEMU**. Here shows a snippet of the error log:
>
>
> $ sudo chroot /sysroot/ppc64el /tmp/build-ppc64el/images/jdk/bin/java --version
> #
> # A fatal error has been detected by the Java Runtime Environment:
> #
> # SIGILL (0x4) at pc=0x00007718c7817380, pid=121270, tid=121272
> #
> # JRE version: (26.0) (fastdebug build )
> # Java VM: OpenJDK 64-Bit Server VM (fastdebug 26-internal-git-9c3eaa49f7f, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-ppc64le)
> # Problematic frame:
> # v ~BufferBlob::config_dscr 0x00007718c7817380
> #
> # Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport -p%p -s%s -c%c -d%d -P%P -u%u -g%g -- %E" (or dumping to //core.121270)
> #
> # An error report file with more information is saved as:
> # //hs_err_pid121270.log
> [2.177s][warning][os] Loading hsdis library failed
> #
> #
> qemu: uncaught target signal 6 (Aborted) - core dumped
> environment: line 1: 121269 Aborted "$@"
>
>
> ## The unsupported instruction is `mfdscr`
>
> I checked the instruction at the `pc=0x00007718c7817380`. It is `A6 02 63 7C mfspr r3, 3`.
> Hence I suspected if the following change in this PR might be related, i.e. `src/hotspot/cpu/ppc/vm_version_ppc.cpp`
> See https://github.com/openjdk/jdk/pull/20262/files#diff-409e1c95e0846f4dbf17f425616970846bbc5fa105c5fb7e80402dc4663416beL95
>
>
> // Power 8: Configure Data Stream Control Register.
> config_dscr();
>
>
> ## Check the support of `mfdscr` in my environment
>
> I built another Java binary with the code commit before this PR, i.e. `8357649: IGV: add block index to the supplemental node properties`.
>
> Then I tried the following commands to check the value of `PowerArchitecturePPC64` and the support of `mfdscr` instruction in my environment. As shown below, it seems that `mfdscr` is **NOT** supported by default in my qemu environment.
>
> 1. it's power9 which is >=8. it's as expected.
>
>
>
> $ sudo chroot /sysroot/ppc64el /tmp/build-ppc64el/images/jdk/bin/java -XX:+PrintFlagsFinal --version | grep PowerArchitecturePPC64
> uintx PowerArchitecturePPC64 = 9 {ARCH diagnostic} {ergonomic}
>
>
> 2. there is no `mfdscr`
>
>
> $ sudo chroot /sysroot/ppc64el /tmp/build-ppc64el/images/jdk/bin/java -XX:+Verbose ...
@shqking: Thanks for the detailed analysis! Not sure if it is a QEMU bug. If this is the only problem, let's just add the check back. See new PR linked above. Can you verify and review it, please?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20262#issuecomment-3000944124
More information about the hotspot-dev
mailing list