ValveSoftware / Source-1-Games

Source 1 based games such as TF2 and Counter-Strike: Source
649 stars 75 forks source link

Tier0 problems on Ubuntu 64 bit #2499

Closed Adrianilloo closed 6 years ago

Adrianilloo commented 6 years ago

S.O.: Ubuntu 16.04 LTS (64 bit). It's a Virtual Machine.

My SRCDS install has a problem with functions from libtier0.so not working properly. A custom server_srv.so built on the SSDK2013 is involved in this report, but it will be proven how the issues happen on default binary too.

I'm going to expose it with two example functions called: Firstly, the function ParmCount() from the CommandLine_Tier0 interface, which should return the number of command line parameters passed on startup, always returns 0. In contrast, it returns fine on my Windows SRCDS install. Secondly, DevMsg() functions which should spell to console when developer mode is enabled are neither working (and it's fine on Windows aswell).

So, I'm next showing an output. I turn library errors into bold style:

adrian@adrian:~/.steam/steamcmd/srcds$ /Valve/steam-runtime/runtime/run.sh ./srcds_run '-game hl2mp -high -debug +developer 2 +mp_teamplay 1 +maxplayers 16 +sv_lan 1 +map halls3' Auto detecting CPU Using default binary: ./srcds_linux Enabling debug mode

gdb: /Valve/steam-runtime/runtime/amd64/lib/x86_64-linux-gnu/libncurses.so.5: no version information available (required by gdb) gdb: /Valve/steam-runtime/runtime/amd64/lib/x86_64-linux-gnu/libncurses.so.5: no version information available (required by gdb) gdb: /Valve/steam-runtime/runtime/amd64/lib/x86_64-linux-gnu/libtinfo.so.5: no version information available (required by gdb) gdb: /Valve/steam-runtime/runtime/amd64/lib/x86_64-linux-gnu/libtinfo.so.5: no version information available (required by /lib/x86_64-linux-gnu/libreadline.so.6)

Server will auto-restart if there is a crash.
Using Breakpad minidump system. Version: 4014252 AppID: 232370
Setting breakpad minidump AppID = 232370
Using breakpad crash handler
Loaded 11 VPK file hashes from /home/adrian/.steam/steamcmd/srcds/hl2mp/hl2mp_pak.vpk for pure server operation.
Loaded 11 VPK file hashes from /home/adrian/.steam/steamcmd/srcds/hl2mp/hl2mp_pak.vpk for pure server operation.
Loaded 1218 VPK file hashes from /home/adrian/.steam/steamcmd/srcds/hl2/hl2_textures.vpk for pure server operation.
Loaded 574 VPK file hashes from /home/adrian/.steam/steamcmd/srcds/hl2/hl2_sound_vo_english.vpk for pure server operation.
Loaded 383 VPK file hashes from /home/adrian/.steam/steamcmd/srcds/hl2/hl2_sound_misc.vpk for pure server operation.
Loaded 446 VPK file hashes from /home/adrian/.steam/steamcmd/srcds/hl2/hl2_misc.vpk for pure server operation.
Loaded 5 VPK file hashes from /home/adrian/.steam/steamcmd/srcds/platform/platform_misc.vpk for pure server operation.
ConVarRef mat_dxlevel doesn't point to an existing ConVar
server_srv.so loaded for "Half-Life 2 Deathmatch"
CSoundEmitterSystem:  Registered 5146 sounds
CSoundscapeSystem::Init:  Manifest 'scripts/soundscapes_manifest.txt' with bogus file type '', expecting 'file'
CSoundscapeSystem::Init:  Manifest 'scripts/soundscapes_manifest.txt' with bogus file type '', expecting 'file'
CSoundscapeSystem::Init:  Manifest 'scripts/soundscapes_manifest.txt' with bogus file type '', expecting 'file'
CSoundscapeSystem::Init:  Manifest 'scripts/soundscapes_manifest.txt' with bogus file type '', expecting 'file'
CSoundscapeSystem::Init:  Manifest 'scripts/soundscapes_manifest.txt' with bogus file type '', expecting 'file'
CSoundscapeSystem::Init:  Manifest 'scripts/soundscapes_manifest.txt' with bogus file type '', expecting 'file'
CSoundscapeSystem::Init:  Manifest 'scripts/soundscapes_manifest.txt' with bogus file type '', expecting 'file'
CSoundscapeSystem::Init:  Manifest 'scripts/soundscapes_manifest.txt' with bogus file type '', expecting 'file'
CSoundscapeSystem::Init:  Manifest 'scripts/soundscapes_manifest.txt' with bogus file type '', expecting 'file'
CSoundscapeSystem::Init:  Manifest 'scripts/soundscapes_manifest.txt' with bogus file type '', expecting 'file'
CSoundscapeSystem::Init:  Manifest 'scripts/soundscapes_manifest.txt' with bogus file type '', expecting 'file'
CSoundscapeSystem::Init:  Manifest 'scripts/soundscapes_manifest.txt' with bogus file type '', expecting 'file'
maxplayers set to 16
Heap: 256.00 Mb
4 CPUs, Frequency: 3.3 Ghz,  Features: GenuineIntel SSE SSE2 MMX RDTSC CMOV FCMOV

dlopen failed trying to load: /home/adrian/.steam/sdk32/steamclient.so with error: /home/adrian/.steam/sdk32/steamclient.so: cannot open shared object file: No such file or directory

Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
execing valve.rc
maxplayers set to 16
ConVarRef dev_loadtime_map_start doesn't point to an existing ConVar
Network: IP 127.0.1.1, mode MP, dedicated Yes, ports 27015 SV / 27005 CL

**Initializing Steam libraries for LAN server**
**[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.**

Setting breakpad minidump AppID = 320

dlopen failed trying to load: /home/adrian/.steam/sdk32/steamclient.so with error: /home/adrian/.steam/sdk32/steamclient.so: cannot open shared object file: No such file or directory

Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
Setting breakpad minidump AppID = 232370
No account token specified; logging into anonymous game server account.  (Use sv_setsteamaccount to login to a persistent account.)
---- Host_NewGame ----
Thread failed to respond, probably exited
Thread failed to respond, probably exited
Spawn Server: halls3
TODO: Refusing to discard 0 bytes
Thread failed to respond, probably exited
Thread failed to respond, probably exited
Loading: maps/halls3.bsp
Thread failed to respond, probably exited
Could not find steamerrorreporter binary. Any minidumps will be uploaded in-processConVarRef room_type doesn't point to an existing ConVar
execing skill_manifest.cfg
execing skill.cfg
Executing dedicated server config file server.cfg
Using map cycle file 'cfg/mapcycle_default.txt'.  ('cfg/mapcycle.txt' was not found.)
Set Gravity 600.0 (0.250 tolerance)
Precache of sprites/redglow1 ambigious (no extension specified)
Set motd from file 'cfg/motd_default.txt'.  ('cfg/motd.txt' was not found.)
Set motd_text from file 'cfg/motd_text_default.txt'.  ('cfg/motd_text.txt' was not found.)
CommandLine()->ParmCount() = 0. It reports proper value at least on Windows
Calling DevMsg("DevMsgTest\n")...
Created class baseline: 24 classes, 5412 bytes.
16 player server started
'server.cfg' not present; not executing.
Server is hibernating
Assigned anonymous gameserver Steam ID [A:1:2921186312:9502].
VAC secure mode disabled.

As you can see I did a logging (near end of output) showing that ParmCount() function returning 0.

Next, to expose that DevMsg() function failing: one can for instance type impulse 52 with sv_cheats 1, which makes a trace test and shows coordinate results via DevMsg(). At the point I trigger that, output only shows on Windows server aswell.

I will be happy to provide more details as they are requested.

Adrianilloo commented 6 years ago

Progress. I checked the sample tests on a fresh Ubuntu 32-bit VM. The problem is gone there. The following output clears the initial library errors on my other Ubuntu 64-bit VM.

Auto detecting CPU
Using default binary: ./srcds_linux
Enabling debug mode
Server will auto-restart if there is a crash.
Using Breakpad minidump system. Version: 4014252 AppID: 232370
Setting breakpad minidump AppID = 232370
Using breakpad crash handler
Loaded 11 VPK file hashes from /home/adrian/.steam/steamcmd/srcds/hl2mp/hl2mp_pak.vpk for pure server operation.
Loaded 11 VPK file hashes from /home/adrian/.steam/steamcmd/srcds/hl2mp/hl2mp_pak.vpk for pure server operation.
Loaded 1218 VPK file hashes from /home/adrian/.steam/steamcmd/srcds/hl2/hl2_textures.vpk for pure server operation.
Loaded 574 VPK file hashes from /home/adrian/.steam/steamcmd/srcds/hl2/hl2_sound_vo_english.vpk for pure server operation.
Loaded 383 VPK file hashes from /home/adrian/.steam/steamcmd/srcds/hl2/hl2_sound_misc.vpk for pure server operation.
Loaded 446 VPK file hashes from /home/adrian/.steam/steamcmd/srcds/hl2/hl2_misc.vpk for pure server operation.
Loaded 5 VPK file hashes from /home/adrian/.steam/steamcmd/srcds/platform/platform_misc.vpk for pure server operation.
ConVarRef mat_dxlevel doesn't point to an existing ConVar
server_srv.so loaded for "Half-Life 2 Deathmatch"
CSoundEmitterSystem:  Registered 5146 sounds
CResponseSystem:  scripts/talker/response_rules.txt (217 rules, 214 criteria, and 208 responses)
maxplayers set to 16
Heap: 256.00 Mb
4 CPUs, Frequency: 3.3 Ghz,  Features: GenuineIntel SSE SSE2 MMX RDTSC CMOV FCMOV
dlopen failed trying to load:
/home/adrian/.steam/sdk32/steamclient.so
with error:
/home/adrian/.steam/sdk32/steamclient.so: cannot open shared object file: No such file or directory
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
execing valve.rc
maxplayers set to 16
ConVarRef dev_loadtime_map_start doesn't point to an existing ConVar
Network: IP 127.0.1.1, mode MP, dedicated Yes, ports 27015 SV / 27005 CL
Initializing Steam libraries for LAN server
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
Setting breakpad minidump AppID = 320
dlopen failed trying to load:
/home/adrian/.steam/sdk32/steamclient.so
with error:
/home/adrian/.steam/sdk32/steamclient.so: cannot open shared object file: No such file or directory
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
Setting breakpad minidump AppID = 232370
No account token specified; logging into anonymous game server account.  (Use sv_setsteamaccount to login to a persistent account.)
---- Host_NewGame ----
Thread failed to respond, probably exited
Thread failed to respond, probably exited
Spawn Server: halls3
TODO: Refusing to discard 0 bytes
Thread failed to respond, probably exited
Thread failed to respond, probably exited
Loading: maps/halls3.bsp
Thread failed to respond, probably exited
ConVarRef room_type doesn't point to an existing ConVar
execing skill_manifest.cfg
execing skill.cfg
Executing dedicated server config file server.cfg
Using map cycle file 'cfg/mapcycle_default.txt'.  ('cfg/mapcycle.txt' was not found.)
Set Gravity 600.0 (0.250 tolerance)
.AIN File will be updated
Precache of sprites/redglow1 ambigious (no extension specified)
Set motd from file 'cfg/motd_default.txt'.  ('cfg/motd.txt' was not found.)
Set motd_text from file 'cfg/motd_text_default.txt'.  ('cfg/motd_text.txt' was not found.)
Created class baseline: 24 classes, 5412 bytes.
16 player server started
'server.cfg' not present; not executing.
Server is hibernating
Assigned anonymous gameserver Steam ID [A:1:1066836992:9506].
VAC secure mode disabled.
developer
"developer" = "2" ( def. "0" )
 - Set developer message level
Client "Adrián" connected (192.168.1.10:27005).
Server waking up from hibernation
Node Graph out of Date. Rebuilding... (0, 1, 0)
Stringtable modelprecache compression: 2990 -> 2060 bytes: 0.03ms
Stringtable soundprecache compression: 11910 -> 6586 bytes: 0.07ms
Stringtable decalprecache compression: 2309 -> 1310 bytes: 0.01ms
Stringtable instancebaseline compression: 5549 -> 2709 bytes: 0.02ms
Stringtable Scenes compression: 13106 -> 8169 bytes: 0.06ms
Compressing fragments (23755 -> 23482 bytes): 0.03ms
"Adrián<2><[U:1:31548176]><>" STEAM USERID validated
Compressing fragments (3250 -> 3030 bytes): 0.01ms
Sending full update to Client Adrián
Compressing fragments (11723 -> 8625 bytes): 0.04ms
unhandled input: (OnPlayerJoin) -> (game_player_manager), from (player,); target entity not found
unhandled input: (OnPlayerSpawn) -> (game_player_manager), from (player,); target entity not found

After impulse 52 command is inputted from the game client console playing on the server, following code contains the expected and correct output that failed on the other VM (caused by DevMsg() not working, as I stated):

StartPos: -412.0000 236.0000 89.8325 --- EndPos: -450.3055 151.1155 24.0312
3D Distance: 114.0285 units  (9.50 feet) --- 2D Distance: 93.1273 units  (7.76 feet)
Firing: (game_playerdie)
Firing: (game_playerleave)
Warning: Deleting orphaned children of player
Dropped Adrián from server (Disconnect by user.)
Server is hibernating
unhandled input: (KilledNPC) -> (), from (,); target entity not found

Next, I will attempt when I have time to fix the candidate libraries that my SRCDS console reports on the 64-bit VM. If I solve the problem I will post the solution and close the issue.

Adrianilloo commented 6 years ago

Hi back. I have partially fixed the problem. After debugging and researching, it turns out that two factors caused my issues. So, right upon running the server this time out of the Steam Runtime run.sh script, the following warning appeared (SRCDS kept loading still):

WARNING: Failed to load 32-bit libtinfo.so.5 or libncurses.so.5.
  Please install (lib32tinfo5 / ncurses-libs.i686 / equivalent) to enable readline.

Which I fixed by running:

sudo apt install lib32tinfo5

After, everything works fine when running SRCDS with official HL2DM server_srv.so. But problems persist with the SSDK2013 server_srv.so (even with default one from Valve). Also, correct execution does not depend on server being launched within Steam Runtime libs (through that run.sh) or normally. It seems the core of the problem resides in that readline library or whatever it is.

EDIT: I interpreted some results wrong, making me explain more things out of the panorama. Removed them.

Adrianilloo commented 6 years ago

Alright, so just realized my problem is happening because not all SSDK2013 codebase shared libraries are in sync with the dedicated server ones (not even mattering if using the self SRCDS or the SSDK2013DS server AppID - these last two have basically the same dynamic libraries).

Closing.