FEX icon indicating copy to clipboard operation
FEX copied to clipboard

Project Zomboid: Regression in JIT behavior causes SIGSEGV when running Project Zomboid server with Docker + FEX after FEX-2506

Open EthanHand opened this issue 5 months ago • 2 comments

What Game Project Zomboid A link to the storefront where to get the game. GOG, Steam, Itch.io, etc

Describe the bug After updating to a FEX build that includes the recent JIT changes (FEX-2506), my Project Zomboid dedicated server running under FEX in Docker (on arm64) now crashes with a segmentation fault (SIGSEGV). The same Dockerfile worked fine before this commit.

To Reproduce Steps to reproduce the behavior:

  1. Clone my repository pinned to commit 2a9c370:
git clone https://github.com/EthanHand/project-zomboid-docker-arm64.git
cd project-zomboid-docker-arm64
git checkout 2a9c370
  1. Build and run the Docker container.
  2. Run the Project Zomboid Dedicated Server inside the container using FEXBash ./start-server.sh.
  3. Observe that the server crashes with a SIGSEGV on this commit.
  4. Switch the dockerfile to use FEX commit: a08a6ce5de51f5e625357ecaed46c463aa1e3c99
  5. Rebuild and run the container.
  6. Observer that the server runs without crashing on previous version.

Expected behavior Server starts normally under FEX, as it did prior to the JIT changes.

Screenshots and Video

# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fffe1caedff, pid=103, tid=103
#
# JRE version: OpenJDK Runtime Environment Zulu17.30+15-CA (17.0.1+12) (build 17.0.1+12-LTS)
# Java VM: OpenJDK 64-Bit Server VM Zulu17.30+15-CA (17.0.1+12-LTS, mixed mode, sharing, tiered, compressed class ptrs, z gc, linux-amd64)
# Problematic frame:
# J 716 c1 java.io.File.<init>(Ljava/lang/String;)V [email protected] (47 bytes) @ 0x00007fffe1caedff [0x00007fffe1caee00+0xffffffffffffffff]
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h %d" (or dumping to /home/steam/Zomboid/core.103)
#
# An error report file with more information is saved as:
# /home/steam/Zomboid/hs_err_pid103.log
Compiled method (c1)    3149  716       3       java.io.File::<init> (47 bytes)
 total in heap  [0x00007fffe1caec10,0x00007fffe1caf3c8] = 1976
 relocation     [0x00007fffe1caed70,0x00007fffe1caedf8] = 136
 main code      [0x00007fffe1caee00,0x00007fffe1caf1e0] = 992
 stub code      [0x00007fffe1caf1e0,0x00007fffe1caf240] = 96
 oops           [0x00007fffe1caf240,0x00007fffe1caf248] = 8
 metadata       [0x00007fffe1caf248,0x00007fffe1caf278] = 48
 scopes data    [0x00007fffe1caf278,0x00007fffe1caf2f0] = 120
 scopes pcs     [0x00007fffe1caf2f0,0x00007fffe1caf3b0] = 192
 dependencies   [0x00007fffe1caf3b0,0x00007fffe1caf3b8] = 8
 nul chk table  [0x00007fffe1caf3b8,0x00007fffe1caf3c8] = 16

Actual behavior The server crashes with a SIGSEGV. The JVM crash log points to a JIT-compiled method:

J 716 c1 java.io.File.(Ljava/lang/String;)V [email protected] (47 bytes) @ 0x00007fffe1caedff [...] Switching to an earlier commit (before FEX-2506) resolves the issue.

System information: OS: Ubuntu 22.04 (inside Docker container) CPU/SoC: ARM64 (Oracle Cloud Ampere Altra) Video driver version: N/A (headless server, no graphics) RootFS used: Ubuntu 22.04 tarball FEX version: FEX-2506 (regression); known good commit: a08a6ce5de51f5e625357ecaed46c463aa1e3c99 Thunks Enabled: No

Additional context Is this an x86 or x86-64 game: x86-64 (Java 17 server) Does this reproduce on AArch64 with Radeon/Intel/Nvidia: Untested (headless) Is this a Vulkan game: No

EthanHand avatar Jul 24 '25 22:07 EthanHand

I don't think this is entirely unexpected. Java isn't really fully handled. Disabling Multiblock might get it closer to what it once behaved like but it isn't guaranteed, as soon from the other two Project Zomboid issues in the tracker.

Sonicadvance1 avatar Jul 24 '25 22:07 Sonicadvance1

Unfortunately, disabling Multiblock doesn't help regarding https://github.com/FEX-Emu/FEX/issues/4233.

n3ph avatar Sep 11 '25 13:09 n3ph