Skip to content

[BUG]: Sven Co-op 5.26 Linux dedicated server occasionally segfaults on map change #91

@NHellFire

Description

@NHellFire

👉👈 Contact Details (optional)

No response

🤔 What happened?

svends occasionally segfaults on map change. Coredump from a debug build shows a null pointer:

Core was generated by `./svends_i686 -game svencoop -strictportbind +ip 94.XX.XX.XX -port 27015 +clientport 27005 +map svencoop1 +servercfgfile svenserver.cfg +maxplayers 16 -insecure -debug +sv_cheats 2 -pidfile svends.4051776.pid'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0xdfdd774b in meta_collect_fix_data (esp=0xf727c3c0, data=...) at /src/Metamod-R/metamod/src/metamod.cpp:461
461             do pret--;
(gdb) bt 6
#0  0xdfdd774b in meta_collect_fix_data (esp=0xf727c3c0, data=std::vector of length 1, capacity 1 = {...}) at /src/Metamod-R/metamod/src/metamod.cpp:461
#1  0xdfdd780d in meta_collect_fix_data (esp=0xfffdc688, data=std::vector of length 1, capacity 1 = {...}) at /src/Metamod-R/metamod/src/metamod.cpp:500
#2  0xdfdd78a2 in meta_rebuild_callbacks () at /src/Metamod-R/metamod/src/metamod.cpp:532
#3  0xdfdd8e1f in MPluginList::refresh (this=0x57063fa0, now=PT_CHANGELEVEL) at /src/Metamod-R/metamod/src/mlist.cpp:563
#4  0xdfdd458a in mm_ServerDeactivate () at /src/Metamod-R/metamod/src/dllapi.cpp:61
#5  0xf61e0792 in ?? () from /home/gameservers/Games/steam/svencoop/serverfiles/engine_i686.so
(gdb) x pret
0xe3240000:     0x00000000

For debugging, I'm using my own build of metamod, which is rehlds/Metamod-R@1.3.0.149 with only this change:

diff --git a/metamod/CMakeLists.txt b/metamod/CMakeLists.txt
index 18d46fc..b82d26e 100644
--- a/metamod/CMakeLists.txt
+++ b/metamod/CMakeLists.txt
@@ -38 +38 @@ set(COMPILE_FLAGS "-m32 -U_FORTIFY_SOURCE")
-set(LINK_FLAGS "-m32 -s")
+set(LINK_FLAGS "-m32")

And built using:

./build.sh -c=gcc -j=$(nproc) -DDEBUG=ON -DCMAKE_BUILD_TYPE=COMPAT_GLIBC

⚠️ Meta-information

OS: Debian 13.3 (amd64)

Engine and metamod version info:

version; game version; meta version; meta list
Protocol version 48
Engine version 5.0.1.8 (svencoop)
Engine build: 19:37:07 Dec  5 2024 (10269)
Metamod-r v1.3.0.149+m, API (5:13)
Metamod-r build: 00:33:54 Jan 26 2026
Metamod-r from: https://github.com/rehlds/Metamod-R/commit/603a257
Currently loaded plugins:
      description  stat pend  file                vers          src  load  unload
 [ 1] AMX Mod X    RUN   -    amxmodx_mm_i386.so  v1.10.0.5474  ini  Start ANY
1 plugins, 1 running


AMXX version info:

amxx version; amxx plugins
AMX Mod X 1.10.0.5474 (http://www.amxmodx.org)
Authors:
        David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko
        Felix "SniperBeamer" Geyer, Jonny "Got His Gun" Bergstrom
        Lukasz "SidLuke" Wlasinski, Christian "Basic-Master" Hammacher
        Borja "faluco" Ferrer, Scott "DS" Ehlert
Compiled: Dec  1 2025 07:49:57
Built from: https://github.com/alliedmodders/amxmodx/commit/0c31b61
Build ID: 5474:0c31b61
Core mode: JIT+ASM32
Currently loaded plugins:
       id  name                    version     author            url                              file         status
 [  1] 0   Admin Base              1.10.0.547  AMXX Dev Team                                      admin.amxx   running
 [  2] 1   Admin Commands          1.10.0.547  AMXX Dev Team                                      admincmd.am  running
 [  3] 2   Admin Help              1.10.0.547  AMXX Dev Team                                      adminhelp.a  running
 [  4] 3   Slots Reservation       1.10.0.547  AMXX Dev Team                                      adminslots.  running
 [  5] 4   Multi-Lingual System    1.10.0.547  AMXX Dev Team                                      multilingua  running
 [  6] 5   Menus Front-End         1.10.0.547  AMXX Dev Team                                      menufront.a  running
 [  7] 6   Commands Menu           1.10.0.547  AMXX Dev Team                                      cmdmenu.amx  running
 [  8] 7   Players Menu            1.10.0.547  AMXX Dev Team                                      plmenu.amxx  running
 [  9] 8   Maps Menu               1.10.0.547  AMXX Dev Team                                      mapsmenu.am  running
 [ 10] 9   Plugin Menu             1.10.0.547  AMXX Dev Team                                      pluginmenu.  running
 [ 11] 10  Admin Chat              1.10.0.547  AMXX Dev Team                                      adminchat.a  running
 [ 12] 11  Anti Flood              1.10.0.547  AMXX Dev Team                                      antiflood.a  running
 [ 13] 12  Admin Votes             1.10.0.547  AMXX Dev Team                                      adminvote.a  running
 [ 14] 13  NextMap                 1.10.0.547  AMXX Dev Team                                      nextmap.amx  running
 [ 15] 14  Nextmap Chooser         1.10.0.547  AMXX Dev Team                                      mapchooser.  running
 [ 16] 15  TimeLeft                1.10.0.547  AMXX Dev Team                                      timeleft.am  running
 [ 17] 16  Pause Plugins           1.10.0.547  AMXX Dev Team                                      pausecfg.am  running
 [ 18] 17  Stats Configuration     1.10.0.547  AMXX Dev Team                                      statscfg.am  running
18 plugins, 18 running

📄 Relevant log output

L 26/01/2026 - 14:42:10: Changing to level "afrikakorps1".
L 26/01/2026 - 14:42:10: [META] ini: Begin re-reading plugins list: /home/gameservers/Games/steam/svencoop/serverfiles/svencoop/addons/metamod/plugins.ini
L 26/01/2026 - 14:42:10: [META] ini: Read plugin config for: AMX Mod X
L 26/01/2026 - 14:42:10: [META] ini: Finished reading plugins list: /home/gameservers/Games/steam/svencoop/serverfiles/svencoop/addons/metamod/plugins.ini; Found 1 plugins
L 26/01/2026 - 14:42:10: [META] dll: Updating plugins...
L 26/01/2026 - 14:42:10: [META] (debug:1) Keeping plugin 'AMX Mod X'
L 26/01/2026 - 14:42:10: [META] dll: Finished updating 1 plugins; kept 1, loaded 0, unloaded 0, reloaded 0, delayed 0
L 26/01/2026 - 14:42:10: [META] dll: Begin scan to collect callback fix data...
./svends_run: line 440: 4051805 Segmentation fault      (core dumped) $GAME_BIN_CMD
Uh oh it seems the server has crashed or failed to run (╯°□°)╯︵ ┻━┻
Support available on our Discord server: https://discord.gg/svencoop
Mon 26 Jan 14:42:12 GMT 2026: Server restart in 10 seconds

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions