oevseev / cstrike-server

Counter-Strike 1.6 dedicated server Docker image
MIT License
1 stars 0 forks source link

Segfault on player connect #1

Closed oevseev closed 4 years ago

oevseev commented 4 years ago

The server crashes when someone tries to connect to it.

stdout ``` Auto-restarting the server on crash Console initialized. Using breakpad crash handler Setting breakpad minidump AppID = 10 Forcing breakpad minidump interfaces to load dlopen failed trying to load: /home/steam/.steam/sdk32/steamclient.so with error: /home/steam/.steam/sdk32/steamclient.so: cannot open shared object file: No such file or directory Looking up breakpad interfaces from steamclient Calling BreakpadMiniDumpSystemInit Protocol version 48 Exe version 1.1.2.7/Stdio (cstrike) Exe build: 15:16:04 Jul 24 2019 (8308) STEAM Auth Server Server IP address 172.17.0.2:27015 Metamod version 1.21.1-am Copyright (c) 2001-2013 Will Day Metamod comes with ABSOLUTELY NO WARRANTY; for details type `meta gpl'. This is free software, and you are welcome to redistribute it under certain conditions; type `meta gpl' for details. AMX Mod X version 1.8.2 Copyright (c) 2004-2006 AMX Mod X Development Team AMX Mod X comes with ABSOLUTELY NO WARRANTY; for details type `amxx gpl'. This is free software and you are welcome to redistribute it under certain conditions; type 'amxx gpl' for details. couldn't exec listip.cfg couldn't exec banned.cfg Segmentation fault (core dumped) 72 ../engine/sv_steam3.h: No such file or directory. email debug.log to linux@valvesoftware.com Sat Apr 25 20:09:18 UTC 2020: Server restart in 10 seconds ```
debug.log ``` ---------------------------------------------- CRASH: Sat Apr 25 20:09:18 UTC 2020 Start Line: ./hlds_linux -game cstrike [New LWP 9] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1". Core was generated by `./hlds_linux -game cstrike'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0xf76f8078 in CSteam3Server::BSecure (this=) at ../engine/sv_steam3.h:72 #0 0xf76f8078 in CSteam3Server::BSecure (this=) at ../engine/sv_steam3.h:72 #1 Steam_GSBSecure () at ../engine/sv_steam3.cpp:1039 #2 0xf76c7d75 in SVC_GetChallenge () at ../engine/sv_main.c:3366 #3 0xf76d1a05 in SV_HandleRconPacket () at ../engine/sv_main.c:9178 #4 SV_CheckForRcon () at ../engine/sv_main.c:9269 #5 0xf769d1b2 in _Host_Frame (time=0.00113391504) at ../engine/host.c:1434 #6 0xf769d562 in Host_Frame (time=0.00113391504, iState=1, stateInfo=0xffc49a3c) at ../engine/host.c:1548 #7 0xf76c26ec in CEngine::Frame (this=0xf775a6e0 ) at ../engine/sys_engine.cpp:245 #8 0xf76bf9f3 in CDedicatedServerAPI::RunFrame (this=) at ../engine/sys_dll2.cpp:1244 #9 CDedicatedServerAPI::RunFrame (this=0xf7755d40 <__g_CDedicatedServerAPI_singleton>) at ../engine/sys_dll2.cpp:1235 #10 0x08049c65 in RunServer () at ../dedicated/sys_ded.cpp:766 #11 0x08049472 in main (argc=3, argv=0xffc49c74) at ../dedicated/sys_ded.cpp:1146 No locals. From To Syms Read Shared Object Library 0xf7f00914 0xf7f46c78 Yes ./libstdc++.so.6 0xf7eb2ad0 0xf7eb3a84 Yes /lib/i386-linux-gnu/libdl.so.2 0xf7e979d0 0xf7ea720f Yes /lib/i386-linux-gnu/libpthread.so.0 0xf7ccf610 0xf7e1c386 Yes /lib/i386-linux-gnu/libc.so.6 0xf7bbe590 0xf7c7e8f5 Yes /lib/i386-linux-gnu/libm.so.6 0xf7f93ab0 0xf7fae7fb Yes /lib/ld-linux.so.2 0xf7ba1e04 0xf7bb1490 Yes ./libgcc_s.so.1 0xf7682630 0xf77087dc Yes /opt/hlds/engine_i486.so 0xf76275c0 0xf7631d74 Yes (*) ./libsteam_api.so 0xf761c910 0xf76203a4 Yes /lib/i386-linux-gnu/librt.so.1 0xf7603aa0 0xf7610428 Yes /opt/hlds/filesystem_stdio.so 0xf5d9a0c0 0xf6f45d64 Yes (*) ./steamclient.so 0xf5c13670 0xf5c89020 Yes (*) ./crashhandler.so 0xf33f8bb0 0xf33ff554 Yes /lib/i386-linux-gnu/libnss_files.so.2 0xf3301d00 0xf33a6ebc Yes (*) /opt/hlds/./cstrike/addons/metamod/dlls/metamod.so 0xf30a2750 0xf31c6ea0 Yes /opt/hlds/cstrike/dlls/cs.so 0xf2f63a00 0xf2fc3768 Yes (*) /opt/hlds/cstrike/addons/amxmodx/dlls/amxmodx_mm_i386.so 0xf2f44c10 0xf2f47c98 Yes (*) cstrike/addons/amxmodx/modules/fun_amxx_i386.so 0xf2f38220 0xf2f3e9d8 Yes (*) cstrike/addons/amxmodx/modules/cstrike_amxx_i386.so 0xf2ec3d50 0xf2eca658 Yes (*) cstrike/addons/amxmodx/modules/csx_amxx_i386.so (*): Shared library is missing debugging information. Stack level 0, frame at 0xffc49490: eip = 0xf76f8078 in CSteam3Server::BSecure (../engine/sv_steam3.h:72); saved eip = 0xf76c7d75 inlined into frame 1 source language c++. Arglist at unknown address. Locals at unknown address, Previous frame's sp in esp End of crash report ---------------------------------------------- ```

Tested on a local Ubuntu 18.04 machine (5.3.0-46-generic) with Docker 19.03.8 installed.

oevseev commented 4 years ago

Seems like the reason for this segfault was that no map was specified when starting the server.

When ran as docker run cstrike-server +map de_dust2, the server crashes for just one time. Afterwards it restarts itself and works perfectly.

The first crash should be fixed in 1e2df767d55e00c1f83a0a81ca733c8596b5f245. With the default map specified, the server runs perfectly fine and doesn't crash anymore.