Skip to content

Java crashes with -XX:+UseZGC and -XX:+UseG1GC, but runs with -Xint or -XX:TieredStopAtLevel=2 #4023

Description

@dragonmoe

Environment

  • Platform: ARM64 (AArch64)
  • Emulator: Box64
  • Java: OpenJDK 17 (64-bit)
  • Application: Project Zomboid Dedicated Server

Problem

The JVM crashes when running under Box64 with normal JIT compilation.

The following JVM options consistently crash:

-XX:+UseZGC

and

-XX:+UseG1GC

Workarounds

The JVM runs correctly when disabling JIT completely:

-Xint

or

-Djava.compiler=NONE

However, both options significantly reduce performance.

Another configuration that appears to be stable so far is:

-XX:+UseG1GC
-XX:TieredStopAtLevel=2

This allows the server to run without crashes while providing much better performance than -Xint.

Expected behavior

The JVM should be able to run normally with the default JIT compiler and garbage collectors (G1GC or ZGC) without crashing.

Additional notes

This issue appears to be related to JIT compilation under Box64. Limiting tiered compilation to level 2 avoids the crash, suggesting that higher-tier JIT compilation may trigger the problem.

If needed, I can provide crash logs hs_err_pid130196.log for further investigation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions