#5985·FEX

[Valheim Dedicated]: Intermittent SIGSEGV under FEX on Ampere (Unity headless, crossplay)

Author: rodtrevizanCreated Sep 23, 2026Updated Sep 23, 2026
LabelsGame relatedml-report

What Game Valheim dedicated server (Steam appid 896660, Linux x86_64). Store: https://store.steampowered.com/app/892970/Valheim/ Binary: valheim_server.x86_64 (Unity 6000.0.75f1), launched headless with -nographics -batchmode -crossplay (PlayFab relay).

Describe the bug The dedicated server dies with SIGSEGV while running under FEX on an Oracle Ampere (ARM64) VPS. systemd reports status=139, Unity prints Caught fatal signal with few usable stack frames, and there is no host OOM. The unit restarts via Restart=always; players lose progress back to the last autosave.

Frequency is roughly once every few hours with 1–4 players connected. It also happens in short bursts right after restart (boot loop).

Primary crash (symbolized, FEX-2609.1 RelWithDebInfo): 2026-09-23 21:48:51 UTC, ~30 min after confirming the running interpreter matched the on-disk RelWithDebInfo build (binfmt re-registered; sha256sum /proc/<pid>/exe == /usr/bin/FEX).

When (UTC) FEX effective Players Unity signal Frames Notes
2026-09-14 21:07:44 2608 (PPA, binfmt-pinned) 1 signo:11 code:2 addr:(nil) −1
2026-09-22 19:06:31 2608 pinned 3 signo:11 code:1 addr:0xffffffffffffff78 0
2026-09-22 20:32:50 2608 pinned 3 same 0xffffffffffffff78 0 then boot-time SIGSEGVs
2026-09-23 03:12–04:53 2608 pinned 0–1 mixed addrs / nil 0–46 boot loops + mid-session
2026-09-23 19:39:36 2608 pinned 3 addr:0xffffffffffffff78 5 core; gdb PC in FEX text but no symbols (??)
2026-09-23 20:27:19 2608 pinned 3 addr:0xffffffffffffff78 ? hung ~25 min, no core
2026-09-23 21:48:51 2609.1 RelWithDebInfo 3–4 addr:0xffffffffffffff78 6 core + symbolized gdb-bt (below)

The fault address 0xffffffffffffff78 (i.e. -0x88 off a null base) repeats across 2608 and 2609.1.

Symbolized crashing thread from gdb -batch /usr/bin/FEX <core> (21:48):

Program terminated with signal SIGSEGV, Segmentation fault.
#0  FEX::HLE::SyscallPassthrough2<129> (Frame=<optimized out>, arg1=<optimized out>, arg2=11)
    at .../LinuxSyscalls/Syscalls/Passthrough.cpp:58
#4  FEX::HLE::SyscallHandler::HandleSyscallImpl<true> (Frame=0xe3f8b0c01140, ...)
    at .../LinuxSyscalls/Syscalls.cpp:852
#5  FEX::HLE::SyscallHandler::HandleSyscall (this=0xe3f8d00f0680, Frame=0xe3f8b0c01140)
    at .../LinuxSyscalls/Syscalls.cpp:886
#6  0x0000800bb317594c in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

pc   0xc61e3d3b913c  SyscallPassthrough2<129>+16
x8   0x81            (129 — AArch64 __NR_kill)
x1   0xb             (11 — SIGSEGV)
x28  0xe3f8b0c01140  (CpuStateFrame*; same as Frame)
sp   0x8000a28550e0
x30  0xc61e3d37cff4

So the process dies inside FEX's syscall passthrough for host kill(..., SIGSEGV), reached via HandleSyscall, with #6 looking like guest/JIT. We have not yet printed guest State.rip from x28 (happy to run whatever gdb expression you want against the retained core).

To Reproduce Intermittent; cannot force on demand. Approximate:

  1. Host: Ubuntu 22.04 aarch64 on Oracle Ampere, 4K pages, FEX binfmt → /usr/bin/FEX (flags POCF).
  2. Install Valheim dedicated 896660 via steamcmd. RootFS: official FEX Ubuntu_22_04.
  3. Run valheim_server.x86_64 -nographics -batchmode -port 2456 -public 0 -name <name> -world <world> -password <pw> -savedir <dir> -crossplay.
  4. Keep 1–4 players connected for several hours (autosave ~20–30 min).
  5. Eventually: Caught fatal signal → Segmentation fault (core dumped) → systemd status=139.

After installing a newer /usr/bin/FEX, we must systemctl restart systemd-binfmt (or re-run FEX's binfmt install) so flag F re-opens the new inode; otherwise the old interpreter stays pinned (/proc/<pid>/exe → (deleted)). That is how we accidentally stayed on 2608 until 2026-09-23 21:17 UTC.

Expected behavior Server stays up for multi-day sessions under FEX the same way it does on native x86_64, or fails with a recoverable game error instead of a hard SIGSEGV of the FEX process.

Screenshots and Video N/A (headless). Journal excerpt from the 21:48 crash (names / lobby IDs removed):

21:30:29  Connections 3 ZDOS:397993  sent:567 recv:632
21:34:28  Connections 4
21:40:29  Connections 3 ZDOS:418245  sent:435 recv:1112
21:48:51  Caught fatal signal - signo:11 code:1 errno:0 addr:0xffffffffffffff78
21:48:51  Obtained 6 stack frames.
          Segmentation fault (core dumped)
          valheim_server.service: Main process exited, code=exited, status=139/n/a

System information:

  • OS: Ubuntu 22.04.5 LTS (6.8.0-1060-oracle, aarch64)
  • CPU/SoC: Oracle Ampere A1 (Neoverse-N1, CPU part 0xd0c), 2 vCPU, ~12 GiB RAM + 4 GiB swap
  • Video driver version: N/A (headless dedicated server, no GPU)
  • RootFS used: official FEX Ubuntu_22_04
  • FEX version: FEX-2609.1 local RelWithDebInfo (tag FEX-2609.1, build-id f40641b61f0993ef, DWARF). Effective for the 21:48 crash. PPA package fex-emu-armv8.2 remains on hold at label 2608~1-3~j; binfmt packages 2609-1~j.
  • Thunks Enabled: No

AppConfig valheim_server.x86_64.json:

json
{
  "Config": {
    "InjectLibSegFault": "1"
  }
}

Config.json: {"Config":{"RootFS":"Ubuntu_22_04"}} only. No Multiblock / MaxInst / gdbserver in production.

Additional context

  • Is this an x86 or x86-64 game: x86-64
  • Does this reproduce on AArch64 with Radeon/Intel/Nvidia: Untested (headless ARM VPS, no GPU)
  • Is this a Vulkan game: No (dedicated server)
  • If Yes, What is your Vulkan driver: N/A

Ruled out (measured): host/kernel OOM in the crash windows, missing swap (4 GiB present), page size ≠ 4K. Bug is not fixed by upgrading disk bits alone while binfmt F still pins an older interpreter; and it still reproduces on real 2609.1 RelWithDebInfo.

Hypothesis only: Unity titles under FEX have needed fault/state reconstruction before (e.g. #4235, Oxygen Not Included). Mono/Unity often uses intentional SIGSEGV for safepoints / NullReferenceException. Seeing Unity report addr:0xffffffffffffff78 and then dying inside FEX SyscallPassthrough2<129> (kill + SIGSEGV) would fit that class, but we have not confirmed the guest RIP or SignalDelegator state yet.

Artifacts and questions for maintainers

Held locally (nothing uploaded yet):

Artifact Size
Core 21:48 (2609.1, symbolized path) ~49.2 GiB apparent (sparse); ~2.0 GiB allocated
Core 19:39 (2608 pinned, no symbols) ~49.6 GiB apparent; ~1.9 GiB allocated
Other older cores several more; cores dir ~13+ GiB allocated total
gdb-bt.txt 21:48 (bt + regs + all threads + mappings) ~166 KiB
journal window 21:48 ~17 KiB
versions / FEXGetConfig ~5 KiB
libSegFault (SEGFAULT_OUTPUT_NAME) empty so far

Questions:

  1. Which parts of the dump do you want? Full core (~2 GiB allocated)? FEX text + stacks + [anon:FEXMem*] only? Or just the gdb-bt.txt plus specific gdb commands against the core?
  2. Preferred channel for a large core (private link on request vs do not send).
  3. Guest RIP / signal state. With symbols available, what should we print from x28 / CpuStateFrame / SignalDelegator on this core? e.g. p/x ((FEXCore::Core::CpuStateFrame*)$x28)->State.rip
  4. Better next collection? Live gdb --args FEX … in a maintenance window, MaxInst=1 + Multiblock off (not for production), FEXLoader -G / extra AppConfig, and/or a run without -crossplay to isolate PlayFab?