Failed to -XX:+UseZGC (SIGSEGV error)

Wenyu Zhao u6615191 at
Thu Mar 1 01:55:43 UTC 2018

Hi guys, I was just successfully build the ZGC version of openjdk.

The build worked well with G1GC, but when I try a simple helloworld program with `-XX:+UseZGC`, the jvm crached with the following report:

[0.030s][info][gc] Using The Z Garbage Collector # # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007f9db8e3133d, pid=29283, tid=29299 # # JRE version: OpenJDK Runtime Environment (11.0) (build 11-internal+0-adhoc.wenyuz.zgc) # Java VM: OpenJDK 64-Bit Server VM (11-internal+0-adhoc.wenyuz.zgc, mixed mode, tiered, z gc, linux-amd64) # Problematic frame: # V [][thread 29298 also had an error] PhaseChaitin::gather_lrg_masks(bool)+0x14d # # Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %P" (or dumping to /home/wenyuz/test/core.29283) # # An error report file with more information is saved as: # /home/wenyuz/test/hs_err_pid29283.log # # Compiler replay data is saved as: # /home/wenyuz/test/replay_pid29283.log # # If you would like to submit a bug report, please visit: # # Aborted (core dumped)

I built the openjdk & run helloworld with the following commands:

sh configure --disable-warnings-as-errors # I have to add this flag since the code uses a deprecated api make images # build successfully # Try on A helloworld java program ../zgc/build/linux-x86_64-normal-server-release/images/jdk/bin/javac # compiled successfully ../zgc/build/linux-x86_64-normal-server-release/images/jdk/bin/java -XX:+UseG1GC -Xlog:gc Test # OK for G1

../zgc/build/linux-x86_64-normal-server-release/images/jdk/bin/java -XX:+UseZGC -Xlog:gc Test # Crashed!!!

Summary of sh configure:

Configuration summary: * Debug level: release * HS debug level: product * JDK variant: normal * JVM variants: server * OpenJDK target: OS: linux, CPU architecture: x86, address length: 64 * Version string: 11-internal+0-adhoc.wenyuz.zgc (11-internal) Tools summary: * Boot JDK: openjdk version "9-Ubuntu" OpenJDK Runtime Environment (build 9-Ubuntu+0-9b181-4) OpenJDK 64-Bit Server VM (build 9-Ubuntu+0-9b181-4, mixed mode) (at /usr/lib/jvm/java-9-openjdk-amd64) * Toolchain: gcc (GNU Compiler Collection) * C Compiler: Version 7.2.0 (at /usr/bin/gcc) * C++ Compiler: Version 7.2.0 (at /usr/bin/g++) Build performance summary: * Cores to use: 7 * Memory limit: 7715 MB

Can anyone helps me with this error? Thanks.

PS: Error logs are attached below.


Wenyu Zhao

More information about the zgc-dev mailing list