Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault on player join #368

Open
Soren90 opened this issue Jan 27, 2021 · 21 comments
Open

Segfault on player join #368

Soren90 opened this issue Jan 27, 2021 · 21 comments

Comments

@Soren90
Copy link

Soren90 commented Jan 27, 2021

Expected behavior

The server not to segfault on player join

Actual behavior

Log from server (then server restart):

csgo-ds | Executing dedicated server config file
csgo-ds | L 01/28/2021 - 18:52:38: server_cvar: "nextlevel" ""
csgo-ds | L 01/28/2021 - 18:52:38: server_cvar: "mp_autoteambalance" "0"
csgo-ds | L 01/28/2021 - 18:52:38: server_cvar: "mp_freezetime" "1"
csgo-ds | L 01/28/2021 - 18:52:38: server_cvar: "mp_maxrounds" "30"
csgo-ds | L 01/28/2021 - 18:52:38: server_cvar: "mp_roundtime" "1.75"
csgo-ds | L 01/28/2021 - 18:52:38: server_cvar: "mp_roundtime_defuse" "1.75"
csgo-ds | L 01/28/2021 - 18:52:38: server_cvar: "mp_roundtime_hostage" "1.75"
csgo-ds | L 01/28/2021 - 18:52:38: server_cvar: "mp_timelimit" "0"
csgo-ds | L 01/28/2021 - 18:52:38: server_cvar: "sv_alltalk" "1"
csgo-ds | L 01/28/2021 - 18:52:38: server_cvar: "sv_competitive_official_5v5" "1"
csgo-ds | L 01/28/2021 - 18:52:38: Starting Freeze period
csgo-ds | Can't init func_areaportal
csgo-ds | Can't init func_areaportal
csgo-ds | Can't init func_areaportal
csgo-ds | Can't init prop_physics_multiplayer
csgo-ds | Can't init func_clip_vphysics
csgo-ds | Can't init point_worldtext
csgo-ds | Can't init func_areaportal
csgo-ds | Can't init func_areaportal
csgo-ds | Can't init func_occluder
csgo-ds | Can't init light
csgo-ds | Can't init light
csgo-ds | Can't init light
csgo-ds | Can't init func_occluder
csgo-ds | Can't init func_occluder
csgo-ds | Can't init func_occluder
csgo-ds | Can't init func_occluder
csgo-ds | Can't init func_areaportal
csgo-ds | Can't init func_areaportal
csgo-ds | Can't init func_occluder
csgo-ds | Can't init func_occluder
csgo-ds | Can't init func_occluder
csgo-ds | Can't init func_occluder
csgo-ds | Can't init func_occluder
csgo-ds | Can't init func_occluder
csgo-ds | Can't init func_occluder
csgo-ds | Can't init func_areaportal
csgo-ds | Can't init func_areaportal
csgo-ds | Can't init func_areaportal
csgo-ds | Can't init func_areaportal
csgo-ds | Can't init func_occluder
csgo-ds | Can't init func_occluder
csgo-ds | Can't init light
csgo-ds | Can't init light_spot
csgo-ds | Can't init light_spot
csgo-ds | Can't init func_areaportal
csgo-ds | Can't init func_areaportal
csgo-ds | Can't init func_areaportal
csgo-ds | Can't init light
csgo-ds | Can't init light
csgo-ds | Can't init light_spot
csgo-ds | Can't init func_occluder
csgo-ds | Can't init func_occluder
csgo-ds | Can't init func_occluder
csgo-ds | Can't init func_areaportal
csgo-ds | Can't init func_areaportal
csgo-ds | Can't init func_areaportal
csgo-ds | Can't init func_areaportal
csgo-ds | Can't init func_areaportal
csgo-ds | Can't init func_areaportal
csgo-ds | Can't init func_occluder
csgo-ds | Can't init func_occluder
csgo-ds | Can't init light_spot
csgo-ds | Can't init light
csgo-ds | Can't init light
csgo-ds | Can't init light_spot
csgo-ds | Can't init func_areaportal
csgo-ds | Can't init func_areaportal
csgo-ds | Can't init func_areaportal
csgo-ds | Can't init func_areaportal
csgo-ds | Can't init func_areaportal
csgo-ds | Can't init func_areaportal
csgo-ds | Can't init func_areaportal
csgo-ds | Can't init func_areaportal
csgo-ds | Can't init func_areaportal
csgo-ds | Can't init func_areaportal
csgo-ds | Can't init func_areaportal
csgo-ds | Can't init func_areaportal
csgo-ds | Can't init func_areaportal
csgo-ds | Can't init func_areaportal
csgo-ds | Can't init func_areaportal
csgo-ds | Can't init func_areaportal
csgo-ds | Can't init func_areaportal
csgo-ds | Can't init light
csgo-ds | Can't init light
csgo-ds | Can't init logic_auto
csgo-ds | Can't init postprocess_controller
csgo-ds | Can't init light_environment
csgo-ds | Can't init color_correction
csgo-ds | Can't init light_spot
csgo-ds | Can't init game_player_equip
csgo-ds | Can't init filter_activator_team
csgo-ds | Can't init filter_activator_team
csgo-ds | Can't init point_clientcommand
csgo-ds | Can't init trigger_multiple
csgo-ds | Can't init trigger_multiple
csgo-ds | Can't init logic_script
csgo-ds | Can't init trigger_multiple
csgo-ds | Can't init trigger_multiple
csgo-ds | Can't init logic_script
csgo-ds | Can't init trigger_multiple
csgo-ds | Can't init trigger_multiple
csgo-ds | Can't init logic_script
csgo-ds | Can't init trigger_multiple
csgo-ds | Can't init trigger_multiple
csgo-ds | Can't init logic_script
csgo-ds | Can't init trigger_multiple
csgo-ds | Can't init trigger_multiple
csgo-ds | Can't init logic_script
csgo-ds | Can't init trigger_multiple
csgo-ds | Can't init trigger_multiple
csgo-ds | L 01/28/2021 - 18:52:38: World triggered "Match_Start" on "de_dust2"
csgo-ds | /home/steam/csgo/srcds_run: line 318:   104 Segmentation fault      (core dumped) $HL_CMD
csgo-ds | Add "-debug" to the /home/steam/csgo/srcds_run command line to generate a debug.log to help with solving this problem
csgo-ds | Thu Jan 28 18:52:38 UTC 2021: Server restart in 10 seconds

When running in -debug mode, the debug.log is empty

Steps to reproduce

  • Ubuntu 20.04
  • Docker image: kaimellea/csgo (modified with the tar's in step 2:)
  • Plugin version: 2.0.5
  • Sourcemod version: sourcemod-1.10.0-git6502-linux.tar.gz
  • Steps to reproduce (please be specific):
  1. csgo clean install
  2. installing these files:
    https://mms.alliedmods.net/mmsdrop/1.11/mmsource-1.11.0-git1144-linux.tar.gz
    https://sm.alliedmods.net/smdrop/1.10/sourcemod-1.10.0-git6502-linux.tar.gz
    https://users.alliedmods.net/~kyles/builds/SteamWorks/SteamWorks-git132-linux.tar.gz
    https://forums.alliedmods.net/showthread.php?t=169095 (updater.smx)
    https://github.com/splewis/csgo-pug-setup/releases/download/2.0.5/pugsetup_2.0.5.zip
  3. setting this in pugsetup.cfg:
    sm_pugsetup_autosetup 1 (makes it so users don't have to .setup to begin a pug)
    sm_pugsetup_pausing_enabled 0 (disables pausing)
    sm_pugsetup_force_defaults 1
  4. Start server and join. (and then seg faults)

Setting sm_pugsetup_autosetup 0 and everything works fine. When the server is up I can also login to the server set sm_pugsetup_autosetup to 1 with rcon without any issues.

Am i missing some kind of dependency in the container?

@Soren90
Copy link
Author

Soren90 commented Jan 28, 2021

I also just tested moving all the plugins except pugsetup.smx to the disabled folder. And the issue is still there.

@r4f4w
Copy link

r4f4w commented Apr 23, 2021

Same problem here!

What is funny is that i already have one server running this plugin, and when i grab the plugin that is totally functioning and throw into another fresh install of sourcemod, i get this anonnying error. (With same extensions, config cfg files, etc)

The working server is running SourceMod 1.10.0.6501, and the faulty one is running SourceMod 1.10.0.6502 (wich i don't think is gonna change a lot to give such an error)

This bug is probably some incompatibility with another plugin/extension, but i can't figure out wich one.

@r4f4w
Copy link

r4f4w commented Apr 23, 2021

SourceMod 1.10.0.6501 is good but SourceMod 1.10.0.6502 is giving segmentation error.

@r4f4w
Copy link

r4f4w commented Apr 23, 2021

It worked, then i close it, re-open and there it goes, the same error again. Can't figure out what is going on.

@r4f4w
Copy link

r4f4w commented Apr 23, 2021

It seems like there is nothing to do with Sourcemod version

@Soren90
Copy link
Author

Soren90 commented Apr 23, 2021

Im my experience it seems like it has something to do with the server waking up from hibernation. I don't have any server availabe to test on at the moment, but the error was kind of inconsistent and but I was able to replicate the issue when I was the first player to join.

I haven't accually tried turning off hibernation. That could be a possible workaround

@Soren90
Copy link
Author

Soren90 commented Apr 23, 2021

Yes, finally i got it!!

I'm running this server on docker image, so what i did was change my cpu pinning and give more cpu limit to my server. After this, i closed and open it again just to make sure, and it's working for sure now!

Hmm are you sure this solved the issue? I don't have any CPU limit on my server.

@r4f4w
Copy link

r4f4w commented Apr 23, 2021

Yes, finally i got it!!
I'm running this server on docker image, so what i did was change my cpu pinning and give more cpu limit to my server. After this, i closed and open it again just to make sure, and it's working for sure now!

Hmm are you sure this solved the issue? I don't have any CPU limit on my server.

Yeah, i restarted 4 times, on the 5th time, the error goes again.

What makes me angry is that is not consistent, sometimes it works, and suddenly don't

Already deleted my comment

@r4f4w
Copy link

r4f4w commented Apr 23, 2021

Im my experience it seems like it has something to do with the server waking up from hibernation. I don't have any server availabe to test on at the moment, but the error was kind of inconsistent and but I was able to replicate the issue when I was the first player to join.

I haven't accually tried turning off hibernation. That could be a possible workaround

So, this is actually working, but i won't confirm until i re-test like 30 times just to make sure 😂

Running more tests and i will give a report.

@r4f4w
Copy link

r4f4w commented Apr 23, 2021

I'm having a little problem that my cfg is setting sv_hibernate_ms to 0, but when server start and i check, the value is default 20.

Don't know why my server.cfg is not changing that value.

Maybe because it has sm_cvar in front?

@r4f4w
Copy link

r4f4w commented Apr 23, 2021

I'm having a little problem that my cfg is setting sv_hibernate_ms to 0, but when server start and i check, the value is default 20.

Don't know why my server.cfg is not changing that value.

Maybe because it has sm_cvar in front?

Yup, removing sm_cvar got it to work, and now it's not giving more segmentation fault.

I will let you know if does come back, but as for now, thanks for the tip @Soren90 !

@mashsajid
Copy link

@Soren90 Did you fixed it?

@Soren90
Copy link
Author

Soren90 commented Jun 2, 2021

@Soren90 Did you fixed it?

Nope. Still same issue. It seems like only workaround that works is turning off hibernation. Haven't tried it myself tho.

@r4f4w
Copy link

r4f4w commented Jun 2, 2021

@Soren90 Did you fixed it?

Nope. Still same issue. It seems like only workaround that works is turning off hibernation. Haven't tried it myself tho.

I can confirm that turning off hibernation does work and solves the problem.

@mashsajid
Copy link

I had the same problem. It will be fixed by changing sm_pugsetup_use_game_warmup 1 to 0 in pugsetup.cfg

@rkantos
Copy link

rkantos commented Jul 25, 2021

I seem to be getting this with Get5 plugin. It doesn't seem to have the same kind of configuration for the warmup. I think also turning of hibernation is a workaround for this issue - I don't remember seeing the same issue with someone being on the server when it is configured by the addon+plugin.

@NaathySz
Copy link

NaathySz commented Aug 9, 2022

I know this thing is old, but still happen and maybe i can help someone in future;
If you dont want turn this cvars talked above, you can do it:

try not leave server in LIVE, because it can cause this bug. Basically, if the match started and players leave in mid of match, when someone try join after (server hibernation + pug setup in live), it can cause this issue and crash. Maybe its not the only reason to this bug, but it can help anyway.

I know it cannot be our fault, so if you are in this trouble, just make this:

  1. Restart your server and NOT join yet!!
  2. Write sm plugins unload pugsetup in your server panel.
  3. After plugin unload, try join. Plugin will load again automatically after you join and prevens to crash.

For me it work, i hope i can help someone with this.
And sorry my bad english :P

@Soren90
Copy link
Author

Soren90 commented Aug 14, 2022

I know this thing is old, but still happen and maybe i can help someone in future; If you dont want turn this cvars talked above, you can do it:

try not leave server in LIVE, because it can cause this bug. Basically, if the match started and players leave in mid of match, when someone try join after (server hibernation + pug setup in live), it can cause this issue and crash. Maybe its not the only reason to this bug, but it can help anyway.

I know it cannot be our fault, so if you are in this trouble, just make this:

  1. Restart your server and NOT join yet!!
  2. Write sm plugins unload pugsetup in your server panel.
  3. After plugin unload, try join. Plugin will load again automatically after you join and prevens to crash.

For me it work, i hope i can help someone with this. And sorry my bad english :P

Thanks for reply! Have this worked long term? I the problem might show up again if all players leave the server and joins again after hibernation. But if you dont need that because you restart the server every time, then you should be fine.

Maybe a solution would be to set sm plugins unload pugsetup in server.cfg or somewhere else?

@NaathySz
Copy link

I know this thing is old, but still happen and maybe i can help someone in future; If you dont want turn this cvars talked above, you can do it:
try not leave server in LIVE, because it can cause this bug. Basically, if the match started and players leave in mid of match, when someone try join after (server hibernation + pug setup in live), it can cause this issue and crash. Maybe its not the only reason to this bug, but it can help anyway.
I know it cannot be our fault, so if you are in this trouble, just make this:

  1. Restart your server and NOT join yet!!
  2. Write sm plugins unload pugsetup in your server panel.
  3. After plugin unload, try join. Plugin will load again automatically after you join and prevens to crash.

For me it work, i hope i can help someone with this. And sorry my bad english :P

Thanks for reply! Have this worked long term? I the problem might show up again if all players leave the server and joins again after hibernation. But if you dont need that because you restart the server every time, then you should be fine.

Maybe a solution would be to set sm plugins unload pugsetup in server.cfg or somewhere else?

it will not solve, but i will talk to splewis about it, lets see if he fix.
If not, i can try do it myself

@splewis
Copy link
Owner

splewis commented Aug 16, 2022

I don't have any magic knowledge on why the server crashes here, or how to fix it. It's exceptionally hard to debug server crashes since valve removed debug symbols from the server binary; there's not much I can do to help. "Fixing" such a bug is likely just trying random ideas and trial+error until things "work". If someone actually uploads crash dumps from accelerator that might give some hints as to where the crash happens.

In general, hibernation can be somewhat buggy when it comes to plugin interactions, so I would recommend it be turned off.

@NaathySz
Copy link

NaathySz commented Aug 16, 2022

Here is a fix. It will stop match if its live and only 1 player last in server. He will not play alone in LIVE match, most just disconnect too. So, it will back to warmup and auto setup again. You can enable and disable this by a convar. By default it is disabled

ConVar: sm_pugsetup_forceend_on_players_leave "0"

Better than crash, huh?

This was referenced Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants