[Bug]: Action Half-Life server segfaults at start on current HLDS

Abierto
#5,141 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@dgibbs64 ya está trabajando en esto.

Desde el 4/11/2026.

  • #5150 de @dgibbs64 — abierto

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
linux, shell

Línea de trabajo

Start with the ahlserver script and the ahl/dlls/ahl.so library it loads, and reproduce on the ubuntu-24.04 container with GLIBC_TUNABLES=glibc.rtld.execstack=2 ./ahlserver start. Run the server under gdb or enable core dumps to find whether the segfault is in ahl.so or the engine, after SteamAPI_Init and Breakpad start. Done means the server starts, answers queries, and stays up under monitor, or the script is marked as not working on current HLDS. Related work is in #5140.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

command: monitor command: start distro: Ubuntu engine: goldsrc game: Action Half-Life reproducible: always severity: medium type: bug
Severity

severity: medium

Reproducibility

reproducible: always

Regression

regression: unknown

Affects latest release

latest-release: yes

User story

As an Action Half-Life server owner, I want the server to start and stay up so that players can join.

Script name

ahlserver

Game

Action Half-Life

Linux distro

Ubuntu 26.04, Ubuntu 24.04

Command

command: start, command: monitor

Expected behavior

start brings the server up and it answers queries, and monitor leaves it running.

Actual behavior

The server exits during startup, so monitor restarts it every few minutes. Two separate problems show up, one after the other:

  1. On Ubuntu 26.04 (glibc 2.43), ahl/dlls/ahl.so fails to load with cannot enable executable stack as shared object requires: Invalid argument. The library has no GNU_STACK header, and glibc 2.41 and newer refuses it. The fix for this is the same glibc.rtld.execstack=2 tunable used for cod2, codwaw, sfc, ts and vs (#5140).
  2. With that tunable set, ahl.so loads, and then the server segfaults straight after the Steam API and Breakpad start up, before it binds its port.

The segfault in step 2 is not caused by glibc:

  • Ubuntu 24.04 (glibc 2.39, no execstack check) segfaults at the same point.
  • It happens on the current HLDS public build (exe build 10211) and on the steam_legacy branch (exe build 8684).
  • It happens with the original hosted archive and with the rebuilt one.

The mod library dates from 2004, so the likely cause is that it no longer works with any HLDS build Steam still offers. Adding the execstack tunable on its own would only swap the loader error for this segfault, so ahl was left out of the execstack follow-up for #5140.

Further information

Ideas for the fix:

  • Get a backtrace: run hlds_linux under gdb, or enable core dumps in the container, and see whether the crash is in ahl.so or in the engine.
  • Check whether a community-maintained ahl.so build exists that works with current HLDS.
  • If neither works out, consider ReHLDS for this mod only, or mark ahl as not working on current HLDS.
Pre-checks
  • I ran update and validate before reporting this issue.
Relevant log output
[S_API] SteamAPI_Init(): Loaded local 'steamclient.so' OK.
Calling BreakpadMiniDumpSystemInit
Segmentation fault (core dumped)
Steps to reproduce
  1. In a clean gameservermanagers/linuxgsm:ubuntu-26.04 container, run ./linuxgsm.sh ahlserver and ./ahlserver auto-install.
  2. Run ./ahlserver start. The server exits with the executable stack error.
  3. Run GLIBC_TUNABLES=glibc.rtld.execstack=2 ./ahlserver start. The server now segfaults after SteamAPI_Init.
  4. Repeat on ubuntu-24.04: the segfault is the same.
Lenguaje dominante
Shell
Estrellas
4.9k
Forks
870
Merge medio
22 h 45 min
PR fusionados (30 d)
128

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de GameServerManagers/LinuxGSM

Todos los issues de GameServerManagers/LinuxGSM

Issues similares

Más issues de Shell/Bash

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.