qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug 1920913] Re: Openjdk11+ fails to install on s390x


From: Jonathan Albrecht
Subject: [Bug 1920913] Re: Openjdk11+ fails to install on s390x
Date: Tue, 27 Apr 2021 14:34:46 -0000

Hi @davidhildenbrand, I'm on the same team as @nam121 and I've been
looking at this issue as well.

I think this is the same issue as: https://github.com/multiarch/qemu-
user-static/issues/129

I've been running an s390x docker image on a master build (with latest
s390x commit from Apr 23) of user mode qemu-s390x-static with some debug
logging on:

$ sudo docker run -e QEMU_CPU="qemu" -e QEMU_LOG="unimp,guest_errors" -e
QEMU_LOG_FILENAME="/s390x/qemu_s390x.log"

I ran a simple java program with:

$ java -Xcomp -XX:+UnlockDiagnosticVMOptions -XX:+PrintAssembly
-XX:PrintAssemblyOptions=hsdis-print-bytes -XX:+LogCompilation
-XX:LogFile=java_compilation_log.log  Main > java_out.txt

and the qemu log contained just one line:

unimplemented opcode 0x0000

Note that if the JIT is turned off with 'java -Xint', then all programs
I've tried run without problem.

The hs_err file reports a SIGILL in the same spot as in the other
comments:

--- SNIP
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGILL (0x4) at pc=0x00000040126d7680, pid=208, tid=211
#
# JRE version: OpenJDK Runtime Environment (11.0.10+9) (build 
11.0.10+9-Ubuntu-0ubuntu1.20.04)
# Java VM: OpenJDK 64-Bit Server VM (11.0.10+9-Ubuntu-0ubuntu1.20.04, compiled 
mode, tiered, compressed oops, g1 gc, linux-s390x)
# Problematic frame:
# J 9 c1 java.lang.String.hashCode()I java.base (49 bytes) @ 0x00000040126d7680 
[0x00000040126d7640+0x0000000000000040]
--- SNIP
--- SNIP
Instructions: (pc=0x00000040126d7680)
0x00000040126d7580:   00000040 5f5f4140 00000040 5f5f4140
0x00000040126d7590:   00000040 5f5f4140 00000040 5f5f4140
0x00000040126d75a0:   00000040 5f5f4358 00000040 5f5f4358
0x00000040126d75b0:   00000040 5f5f4358 00000040 5f5f4358
0x00000040126d75c0:   00000040 5f5f4140 00000040 5f5f4140
0x00000040126d75d0:   00000000 00000000 ffffffff ffffffff
0x00000040126d75e0:   00000040 5f5f4140 00000000 00000000
0x00000040126d75f0:   ffffffff ffffffff 00000040 5f3fb9d0
0x00000040126d7600:   00000040 12238c00 00000040 12232800
0x00000040126d7610:   00000040 5f3fef18 00000040 12238c00
0x00000040126d7620:   00000040 12235000 00000000 00000000
0x00000040126d7630:   00000000 00000000 00000000 00000000
0x00000040126d7640:   b9040009 cc08ffff fff85500 2008a784  # <-- 
String.hashCode() entry point at 0x00000040126d7640
0x00000040126d7650:   0019a51d 0040c019 12167a80 07f10700
0x00000040126d7660:   07000700 07000700 07000700 07000700
0x00000040126d7670:   07000700 07000700 07000700 07000700
0x00000040126d7680:   0000f000 ec51e3e0 f0080024 b904000f  # <-- note 0x0000 at 
0x00000040126d7680
0x00000040126d7690:   a7fbffa0 e300f000 0024c438 ffffff73
--- SNIP

The assembly printed by java looks like:

--- SNIP
[Entry Point]
  # {method} {0x000000405f3fb9d0} 'hashCode' '()I' in 'java/lang/String'
  #           [sp+0x60]  (sp of caller)
  0x00000040126d7640: lgr       %r0,%r9         ;...b9040009
                                                ;   {no_reloc}
  0x00000040126d7644: aih       %r0,-8          ;...cc08ffff fff8

  0x00000040126d764a: cl        %r0,8(%r2)      ;...55002008

  0x00000040126d764e: je        0x00000040126d7680  ;...a7840019

  0x00000040126d7652: llihl     %r1,64          ;...a51d0040

  0x00000040126d7656: iilf      %r1,303463040   ;...c0191216 7a80

  0x00000040126d765c: br        %r1             ;...07f1

  0x00000040126d765e: nopr                      ;...0700

  0x00000040126d7660: nopr                      ;...0700

  0x00000040126d7662: nopr                      ;...0700

  0x00000040126d7664: nopr                      ;...0700

  0x00000040126d7666: nopr                      ;...0700

  0x00000040126d7668: nopr                      ;...0700

  0x00000040126d766a: nopr                      ;...0700

  0x00000040126d766c: nopr                      ;...0700

  0x00000040126d766e: nopr                      ;...0700

  0x00000040126d7670: nopr                      ;...0700

  0x00000040126d7672: nopr                      ;...0700

  0x00000040126d7674: nopr                      ;...0700

  0x00000040126d7676: nopr                      ;...0700

  0x00000040126d7678: nopr                      ;...0700

  0x00000040126d767a: nopr                      ;...0700

  0x00000040126d767c: nopr                      ;...0700

  0x00000040126d767e: nopr                      ;...0700

[Verified Entry Point]
  0x00000040126d7680: tmy       -81920(%r15),222  ;...ebdef000 ec51

  0x00000040126d7686: stg       %r14,8(%r15)    ;...e3e0f008 0024

  0x00000040126d768c: lgr       %r0,%r15        ;...b904000f

  0x00000040126d7690: aghi      %r15,-96        ;...a7fbffa0

  0x00000040126d7694: stg       %r0,0(%r15)     ;...e300f000 0024

  0x00000040126d769a: lgrl      %r3,0x00000040126d7580
                                                ;...c438ffff ff73
                                                ;   {metadata(method data for 
{method} {0x000000405f3fb9d0} 'hashCode' '()I' in 'java/lang/String')}
--- SNIP

so IIUC java says its generating 0xebde at 0x00000040126d7680 instead of
0x0000.

Hope the above makes sense. I'm not sure where to go from here so any
suggestions would be a great help.

** Bug watch added: github.com/multiarch/qemu-user-static/issues #129
   https://github.com/multiarch/qemu-user-static/issues/129

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1920913

Title:
  Openjdk11+ fails to install on s390x

Status in QEMU:
  New

Bug description:
  While installing openjdk11 or higher from repo, it crashes while configuring 
ca-certificates-java.
  Although `java -version` passes, `jar -version` crashes. Detailed logs 
attached to this issue.

  ```
  # A fatal error has been detected by the Java Runtime Environment:
  #
  #  SIGILL (0x4) at pc=0x00000040126f9980, pid=8425, tid=8430
  #
  # JRE version: OpenJDK Runtime Environment (11.0.10+9) (build 
11.0.10+9-Ubuntu-0ubuntu1.20.04)
  # Java VM: OpenJDK 64-Bit Server VM (11.0.10+9-Ubuntu-0ubuntu1.20.04, mixed 
mode, tiered, compressed oops, g1 gc, linux-s390x)
  # Problematic frame:
  # J 4 c1 java.lang.StringLatin1.hashCode([B)I java.base@11.0.10 (42 bytes) @ 
0x00000040126f9980 [0x00000040126f9980+0x0000000000000000]
  #
  # Core dump will be written. Default location: Core dumps may be processed 
with "/usr/share/apport/apport %p %s %c %d %P %E" (or dumping to //core.8425)
  #
  # An error report file with more information is saved as:
  # //hs_err_pid8425.log
  sed with "/usr/share/apport/apport %p %s %c %d %P %E" (or dumping to 
/root/core.10740)
  #
  # An error report file with more information is saved as:
  # /root/hs_err_pid10740.log
  ```

  Observed this on s390x/ubuntu as well as s390x/alpine when run on amd64 host.
  Please note, on native s390x, the installation is successful. Also this crash 
is not observed while installing openjdk-8-jdk.

  Qemu version: 5.2.0

  Please let me know if any more details are needed.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1920913/+subscriptions



reply via email to

[Prev in Thread] Current Thread [Next in Thread]