mirror of
https://github.com/GameServerManagers/LinuxGSM.git
synced 2026-04-24 21:56:01 +03:00
[GH-ISSUE #4824] [Bug]: CS2 is giving in dmesg an segfault error because of empty LD_LIBRARY_PATH #2992
Labels
No labels
Atomic
Epic
cannot reproduce
command: backup
command: console
command: debug
command: details
command: fast-dl
command: install
command: mods
command: monitor
command: post-details
command: restart
command: send
command: start
command: stop
command: update
command: update-lgsm
command: validate
command: wipe
distro: AlmaLinux
distro: Arch Linux
distro: CentOS
distro: Debian
distro: Fedora
distro: RedHat
distro: Rocky Linux
distro: Ubuntu
distro: openSUSE
engine: goldsrc
engine: source
game: 7 Days to Die
game: ARMA 3
game: Ark: Survival Evolved
game: Assetto Corsa
game: Avorion
game: BATTALION: Legacy
game: Barotrauma
game: Battalion 1944
game: Battlefield 1942
game: Black Mesa: Deathmatch
game: Blade Symphony
game: Call of Duty 2
game: Call of Duty 4
game: Call of Duty: United Offensive
game: Counter-Strike 1.6
game: Counter-Strike 2
game: Counter-Strike: Global Offensive
game: Counter-Strike: Source
game: Day of Infamy
game: Dayz
game: Death Match Classic
game: Don't Starve Together
game: ET: Legacy
game: Eco
game: Factorio
game: Factorio
game: Garry's Mod
game: Half-Life
game: Hurtword
game: Insurgecy
game: Insurgecy
game: Insurgency: Sandstorm
game: Just Cause 3
game: Killing Floor
game: Killing Floor 2
game: Left 4 Dead 2
game: Minecraft
game: Minecraft Bedrock
game: Mordhau
game: Multi Theft Auto
game: Mumble
game: Natural Selection 2
game: No More Room in Hell
game: Pavlov VR
game: Post Scriptum
game: Project Zomboid
game: Quake 3
game: QuakeWorld
game: Red Orchestra: Ostfront 41-45
game: Return to Castle Wolfenstein
game: Rising World
game: Rust
game: San Andreas Multiplayer
game: Satisfactory
game: Soldat
game: Soldier of Fortune 2
game: Squad
game: Squad 44
game: Starbound
game: Stationeers
game: Sven Co-op
game: Team Fortress 2
game: Teamspeak 3
game: Teeworlds
game: Terraria
game: The Front
game: Unreal Tournament 2004
game: Unreal Tournament 3
game: Unreal Tournament 99
game: Unturned
game: Valheim
game: Wurm Unlimited
game: Zombie Master Reborn
game: label missing
good first issue
help wanted
info: alerts
info: dependency
info: docker
info: docs
info: email
info: query
info: steamcmd
info: systemd
info: tmux
info: website
info: website
needs more info
outcome: duplicate
outcome: issue resolved
outcome: issue resolved
outcome: issue unresolved
outcome: pr accepted
outcome: pr rejected
outcome: unconfirmed
outcome: wontfix
outcome: wrong forum
potential-duplicate
priority
pull-request
type: bug
type: feature
type: feature
type: feature request
type: game server request
type: refactor
waiting response
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/LinuxGSM#2992
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Ecke on GitHub (Sep 23, 2025).
Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/4824
User story
I would like to see that the LSGM configuration is filling automatically the LD_LIBRARY_PATH to the correct path.
Game
CS2 (CSGO)
Linux distro
Ubuntu 24.04, Ubuntu 22.04
Command
command: start
Further information
CS2 is giving the following error when it is starting the server: segfault at 0 ip 00007c1776e7a3f8 sp 00007ffd7d9ef0c0 error 6 in libtier0.so[7c1776d26000+37c000] likely on CPU 1 (core 1, socket 0)
This can be found in sudo dmesg
You can solve this to fill the variable: LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/home/cs2server/serverfiles/game/bin/linuxsteamr
Workaround for now:
If you add this export to /home/cs2server/lgsm/config-lgsm/cs2server/cs2server.cfg (when you connect with SSH still the echo $LD_LIBRARY_PATH is then empty but for the server start it isn't).
Or you add Environment="LD_LIBRARY_PATH=/home/cs2server/serverfiles/game/bin/linuxsteamrt64” in the systemd unit file as a systemwide solution
If you done one of the above workarounds then the segfault error is solved.
My friend and I had the same issue with different hardware. Both we are using a VM in Proxmox. This issue is also to help others who might experiencing the same behaviour and don't understand why their server is not starting.
Relevant log output
Steps to reproduce
@Ecke commented on GitHub (Jan 26, 2026):
@borzaka I see your fix in the cs2.sh but and I still used my workaround in the cs2server configuration. Unfortunately the issue returned.
I have since Wed, 21 Jan 2026 22:33:56 +0000 again the following error in my cs2server configuration.
segfault at 0 ip 00007ca38368b850 sp 00007ffe1af77700 error 6 in libtier0.so[7ca383527000+381000] likely on CPU 1 (core 1, socket 0)
If I run ./cs2server debug I see this exit code:
[ ERROR ] Debugging cs2server: Server has stopped: exit code: 139
So does someone know what is causing now this error and how can I solve it?
Extra log info:
SteamGameServer_Init()
dlopen failed trying to load:
steamclient.so
with error:
steamclient.so: cannot open shared object file: No such file or directory
[S_API] SteamAPI_Init(): Loaded '/home/cs2server/.steam/sdk64/steamclient.so' OK. (First tried local 'steamclient.so')
[S_API] SteamAPI_Init(): No SteamClient023
FATAL ERROR: Failed to initialize Steamworks SDK for gameserver. No SteamClient023
0 FATAL ERROR: Failed to initialize Steamworks SDK for gameserver. No SteamClient023
./cs2.sh: line 109: 2069626 Segmentation fault (core dumped) ${STEAM_RUNTIME_PREFIX} ${GAME_DEBUGGER} "${GAMEROOT}"/${GAMEEXE} "$@"
[ ERROR ] Debugging cs2server: Server has stopped: exit code: 139
[ ERROR ] Debugging cs2server: Press ENTER to exit debug mode
@Ecke commented on GitHub (Jan 28, 2026):
Ok with help of claude I fixed the server:
This solved my issue:
Initial error: libtier0.so segfault - caused by missing LD_LIBRARY_PATH
Second error: steamclient.so not found - library path didn't include Steam SDK
Third error: SteamClient023 version mismatch - outdated Steam SDK
The fix was likely a combination of:
Setting LD_LIBRARY_PATH in cs2.sh (so it persists when the server starts)
Updating SteamCMD to get the correct SteamClient023 version
The key issue was that your LD_LIBRARY_PATH export in the LinuxGSM config wasn't being picked up by the cs2.sh wrapper script, so we had to add it directly in the script itself.
So what have I done, in cs2.sh line 109 I added the LD_LIBARY_PATH in the else:
else
export LD_LIBRARY_PATH="${GAMEROOT}/bin/linuxsteamrt64:${GAMEROOT}/bin/linux64:${HOME}/.steam/sdk64:${HOME}/.steam/sdk32:${LD_LIBRARY_PATH}"
${STEAM_RUNTIME_PREFIX} ${GAME_DEBUGGER} "${GAMEROOT}"/${GAMEEXE} "$@"
fi
STATUS=$?
And I fixed my steamfiles with the following command:
cd ~/.local/share/Steam/steamcmd/
./steamcmd.sh +quit
Also I made new symlinks but I am not sure if that is really needed.
@Ecke commented on GitHub (Jan 28, 2026):
Solution that worked for me
The segfault was resolved by ensuring the Steam SDK paths are in LD_LIBRARY_PATH.
Fix Applied
Modified
/home/cs2server/serverfiles/game/cs2.sh(around line 106-110):Additional Steps
~/.local/share/Steam/steamcmd/steamcmd.sh +quitln -sf ~/.local/share/Steam/steamcmd/linux64/steamclient.so ~/.steam/sdk64/steamclient.soEnvironment
This resolves both the
libtier0.sosegfault and theSteamClient023errors.@borzaka commented on GitHub (Feb 14, 2026):
Well, I'm not sure what issue you're experiencing. I haven't encountered anything like that on my side. It works properly on my Debian 12 bare-metal setup.
I've run multiple events using this setup without any of the technical issues mentioned above.
The main goal of the LGSM project is to avoid the need for such workarounds in order to make things work. I'd suggest trying a clean install using LGSM.
At the very least, try running a file verification, as it's possible that cs2.sh has been modified beyond repair.