[Bug]: CS2 is giving in dmesg an segfault error because of empty LD_LIBRARY_PATH

已关闭
#4,824 4 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
bash, linux, shell
领域
cli, devops

调研方向

首先跟踪 cs2server 启动命令和 LSGM 配置路径,尤其是 /home/cs2server/lgsm/config-lgsm/cs2server/cs2server.cfg。复现启动过程,并在检查 LD_LIBRARY_PATH 如何设置的同时检查 sudo dmesg。完成的标准是 CS2 服务器能够自动获得正确的库路径,并在没有 libtier0.so 段错误的情况下启动。

由索引模型根据 Issue 内容生成。

描述

command: start distro: Ubuntu engine: source2 game: Counter-Strike 2 info: systemd type: bug
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
segfault at 0 ip 00007c1776e7a3f8 sp 00007ffd7d9ef0c0 error 6 in libtier0.so[7c1776d26000+37c000] likely on CPU 1 (core 1, socket 0)
Steps to reproduce
  1. Start the cs2server ./cs2server start
  2. check the details ./cs2server details
  3. sudo dmesg
主要语言
Shell
星标
4.9k
派生
871
平均合并
1 天 6 小时
30 天内合并 PR
138

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

GameServerManagers/LinuxGSM 的其他 Issue

查看 GameServerManagers/LinuxGSM 的全部 Issue

相似的 Issue

更多 Shell/Bash Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。