Source-1-Games icon indicating copy to clipboard operation
Source-1-Games copied to clipboard

[TF2] SRCDS crash on quit

Open 185245725 opened this issue 6 months ago • 8 comments

Ubuntu Server 24.04.2 - 32bit vanilla server - sourcemod not installed

VAC secure mode is activated.
quit
SoundEmitter:  removing map sound overrides [2 to remove, 2 to restore]
src/clientdll/steamengine.cpp (3531) : Assertion Failed: Attempt to call interface with invalid hSteamUser /+/ 1, appid=440, hpipe=131073, inprocess, thread=1758
src/clientdll/steamengine.cpp (3531) : Assertion Failed: Attempt to call interface with invalid hSteamUser /+/ 1, appid=440, hpipe=131073, inprocess, thread=1758
assert_20250622180151_15.dmp[1773]: Uploading dump (out-of-process)
/tmp/dumps/assert_20250622180151_15.dmp
IPC function call IClientHTTP::CreateHTTPRequest took too long: 128 msec
src/common/interfacemap.cpp (874) : Assertion Failed: IPC call to IClientHTTP::CreateHTTPRequest returned failure code 12
src/common/interfacemap.cpp (874) : Assertion Failed: IPC call to IClientHTTP::CreateHTTPRequest returned failure code 12
06/22 18:01:51 Init: Installing breakpad exception handler for appid(srcds_linux)/version(1.0)/tid(1747)
assert_20250622180151_18.dmp[1777]: Uploading dump (out-of-process)
/tmp/dumps/assert_20250622180151_18.dmp
src/steamnetworkingsockets/clientlib/steamnetworkingsockets_lowlevel.cpp (4108) : Trying to close low level socket support, but we still have sockets open!
src/steamnetworkingsockets/clientlib/steamnetworkingsockets_lowlevel.cpp (4108) : Trying to close low level socket support, but we still have sockets open!
06/22 18:01:52 Init: Installing breakpad exception handler for appid(srcds_linux)/version(1.0)/tid(1747)
assert_20250622180151_15.dmp[1773]: Finished uploading minidump (out-of-process): success = yes
assert_20250622180151_18.dmp[1777]: Finished uploading minidump (out-of-process): success = yes
assert_20250622180151_18.dmp[1777]: response: Discarded=1
assert_20250622180151_18.dmp[1777]: file ''/tmp/dumps/assert_20250622180151_18.dmp'', upload yes: ''Discarded=1''
assert_20250622180151_15.dmp[1773]: response: Discarded=1
assert_20250622180151_15.dmp[1773]: file ''/tmp/dumps/assert_20250622180151_15.dmp'', upload yes: ''Discarded=1''
assert_20250622180152_21.dmp[1781]: Uploading dump (out-of-process)
/tmp/dumps/assert_20250622180152_21.dmp
assert_20250622180152_21.dmp[1781]: Finished uploading minidump (out-of-process): success = yes
assert_20250622180152_21.dmp[1781]: response: Discarded=1
assert_20250622180152_21.dmp[1781]: file ''/tmp/dumps/assert_20250622180152_21.dmp'', upload yes: ''Discarded=1''
Sun Jun 22 06:01:52 PM PDT 2025: Server restart in 0 seconds

185245725 avatar Jun 23 '25 01:06 185245725

Why would anyone care if it crashes when you're trying to close it already?

Buggem avatar Jun 29 '25 05:06 Buggem

Hi, I also encounter this on my servers for the past few months. The Team Fortress 2 servers always exit with a similar crash dump:

src/clientdll/steamengine.cpp (3531) : Assertion Failed: Attempt to call interface with invalid hSteamUser /+/ 1, appid=440, hpipe=131073, inprocess, thread=94
src/clientdll/steamengine.cpp (3531) : Assertion Failed: Attempt to call interface with invalid hSteamUser /+/ 1, appid=440, hpipe=131073, inprocess, thread=94
assert_20250919132441_21.dmp[122]: Uploading dump (out-of-process)
/tmp/dumps/assert_20250919132441_21.dmp
assert_20250919132441_21.dmp[122]: Uploading dump (out-of-process)
/tmp/dumps/assert_20250919132441_21.dmp

IPC function call IClientHTTP::CreateHTTPRequest took too long: 136 msec
src/common/interfacemap.cpp (874) : Assertion Failed: IPC call to IClientHTTP::CreateHTTPRequest returned failure code 12
src/common/interfacemap.cpp (874) : Assertion Failed: IPC call to IClientHTTP::CreateHTTPRequest returned failure code 12
09/19 13:24:41 Init: Installing breakpad exception handler for appid(srcds_linux)/version(1.0)/tid(7)
assert_20250919132441_24.dmp[126]: Uploading dump (out-of-process)
/tmp/dumps/assert_20250919132441_24.dmp
assert_20250919132441_24.dmp[126]: Uploading dump (out-of-process)
/tmp/dumps/assert_20250919132441_24.dmp

src/steamnetworkingsockets/clientlib/steamnetworkingsockets_lowlevel.cpp (4108) : Trying to close low level socket support, but we still have sockets open!
src/steamnetworkingsockets/clientlib/steamnetworkingsockets_lowlevel.cpp (4108) : Trying to close low level socket support, but we still have sockets open!

What is also interesting is, my Team Fortress 2 servers have disappeared from the in-game server browser (around the same time). My friends and I can only connect to them using the console or from the favorites tab (while sv_lan has always been set to 0).

The servers are running the latest Team Fortress 2 version on a cheap Hetzner VPS in Europe. Everything was working fine last december (2024), as a game server log from back then does not show this crash dump on shutdown.

Edit: I sadly do not have more archived servers logs, so I cannot exactly tell when this issue first started showing up 😅

jason-1109 avatar Sep 19 '25 11:09 jason-1109

@kisak-valve Could this crash dump be related to my Team Fortress 2 servers not showing up in the community server browser anymore?

They used to be listed as public servers, but they only show up under "Favorites" now. This is the case for everyone in our community, as no one can find our servers under the "Internet" tab anymore.

jason-1109 avatar Sep 19 '25 11:09 jason-1109

I am also experiencing this issue. My servers run on Debian 12, but it also happens on my Arch Linux test instance. Both vanilla and non-vanilla servers are affected.

I can say that this error probably does not affect server visibility, since my servers still seem to show up on the list without issue and traffic has been within normal bounds.

llamasking avatar Sep 26 '25 02:09 llamasking

@jason-1109 What is most likely happening is your server isn't sending it's "heartbeat" to the master server properly, most likely unrelated to this issue.

Buggem avatar Sep 26 '25 03:09 Buggem

@Buggem Yeah I definitely suspect something is messing up on the network side. Sucks that there isn't much information on how these "heartbeats" work exactly, at least not that I can find.

I still assume these may be related, as Googling the errors from the crashdump has a lot of hits with "Sons of the forest" posts online, most of them suggest enabling "SkipNetworkAccessibilityTest" to skip network checks. But this isn't an option for TF2 servers AFAIK.

Some examples with very similar crash dumps (different game, but still SRCDS based):

  • https://github.com/pelican-eggs/eggs/issues/2357
  • https://github.com/Ptero-Eggs/game-eggs/issues/219

That being said, I could also be facing two separate issues;

  1. The issue with the crashdump on server exit/restart
  2. Server not showing up in server browser, as reported in: https://github.com/ValveSoftware/Source-1-Games/issues/6338

jason-1109 avatar Oct 08 '25 19:10 jason-1109

@jason-1109 I heard from somebody heartbeats work through the Steam APIs these days.

Maybe it's that it can't contact the APIs properly? The invalid hSteamUser seems to point to that, but I'm not totally sure.

Either way, it's best you start a different issue as I'm unsure the two are completely related.

Buggem avatar Oct 12 '25 02:10 Buggem

I'm on Windows, running two CS:S and two TF2 dedicated servers (in 32 bit) and I'm not sure if my issue is related, but according to my logs one of the TF2 servers started to hang (not crash) upon quitting after either the January 10 or the April 19, 2024 update.

I always start and stop these four servers together through my Windows Service (stopping by sending "quit" to their consoles and giving them up to 10 seconds, then killing them). It was usually only one of the two TF2 servers that hung (not always the same one though), the other three did shut down cleanly. After the February 18, 2025 update it also started to happen to CS:S.

What's noteworthy as well: It used to not happen when the servers had just been freshly launched. Only once they'd been running for a couple of days or so. For CS:S this still holds (somewhat), however with TF2 I'm now able to reproduce the hanging right away. They also used to spit out two assertion fails a little while after getting the "quit" command:

L 05/06/2025 - 03:06:42: server_message: "quit"
src\clientdll\steamengine.cpp (2740) : Assertion Failed: CSteamEngine::BMainLoop appears to have stalled > 15 seconds without event signalled
src\clientdll\steamengine.cpp (2740) : Assertion Failed: CSteamEngine::BMainLoop appears to have stalled > 15 seconds without event signalled

But at least in TF2 they don't do that any more. Today, after a fresh launch, between 2 and 3 of the 4 servers will hang on "quit" and have to be terminated.

Forlix avatar Dec 09 '25 01:12 Forlix