Server crash Missing shutdown function for Sys_InitAuthentication()

Hi, so getting more server crashes.


Missing shutdown function for Sys_InitAuthentication() : Sys_ShutdownAuthentication()
Missing shutdown function for S_Init() : S_Shutdown()
Missing shutdown function for Decal_Init() : Decal_Shutdown()
Missing shutdown function for InitStudioRender() : ShutdownStudioRender()
Missing shutdown function for StaticPropMgr()->Init() : StaticPropMgr()->Shutdown()
Missing shutdown function for modelloader->Init() : modelloader->Shutdown()
Missing shutdown function for InitMaterialSystem() : ShutdownMaterialSystem()
Missing shutdown function for HLTV_Init() : HLTV_Shutdown()
Missing shutdown function for g_Log.Init() : g_Log.Shutdown()
Missing shutdown function for sv.Init( bDedicated ) : sv.Shutdown()
Missing shutdown function for g_GameEventManager.Init() : g_GameEventManager.Shutdown()
Missing shutdown function for NET_Init( bDedicated ) : NET_Shutdown()
Missing shutdown function for Key_Init() : Key_Shutdown()
Missing shutdown function for Filter_Init() : Filter_Shutdown()
Missing shutdown function for saverestore->Init() : saverestore->Shutdown()
Missing shutdown function for COM_Init() : COM_Shutdown()
Missing shutdown function for V_Init() : V_Shutdown()
Missing shutdown function for g_pCVar->Init() : g_pCVar->Shutdown()
Missing shutdown function for Cmd_Init() : Cmd_Shutdown()
Missing shutdown function for Cbuf_Init() : Cbuf_Shutdown()
Missing shutdown function for Con_Init() : Con_Shutdown()
Missing shutdown function for Memory_Init() : Memory_Shutdown()
Missing shutdown function for Host_Init( s_bIsDedicated ) : Host_Shutdown()
Missing shutdown function for Sys_InitMemory() : Sys_ShutdownMemory()
Missing shutdown function for Sys_Init() : Sys_Shutdown()
Missing shutdown function for COM_InitFilesystem( info.m_pInitialMod ) : COM_ShutdownFileSystem()
WS: Waiting for Steam to log us in.....
WS: Fetching collection info...

No idea what this means, but the server literally restarts after this. After it’s run for a bit. Anyone got any ideas?

Crash dump

The server has been reinstalled, validated, I’ve deleted bin folder and updated it. There is no LUA errors.
I make use of a small few modules including:

gmsv_tmysql4
gmsv_luaerror
gmsv_enginespew

No idea why this occurs, completely random.

[editline]21st August 2017[/editline]

I don’t know if this is related to the slerpbones issue, but I’m sure a player wasn’t shot/damaged as I am currently logging all damage done to players …

[editline]21st August 2017[/editline]

Super duper useful error…

Model ‘’ has too many bones?
Missing shutdown function for Sys_InitAuthentication() : Sys_ShutdownAuthentication()
Missing shutdown function for S_Init() : S_Shutdown()
Missing shutdown function for Decal_Init() : Decal_Shutdown()
Missing shutdown function for InitStudioRender() : ShutdownStudioRender()
Missing shutdown function for StaticPropMgr()->Init() : StaticPropMgr()->Shutdown()
Missing shutdown function for modelloader->Init() : modelloader->Shutdown()
Missing shutdown function for InitMaterialSystem() : ShutdownMaterialSystem()
Missing shutdown function for HLTV_Init() : HLTV_Shutdown()
Missing shutdown function for g_Log.Init() : g_Log.Shutdown()
Missing shutdown function for sv.Init( bDedicated ) : sv.Shutdown()
Missing shutdown function for g_GameEventManager.Init() : g_GameEventManager.Shutdown()
Missing shutdown function for NET_Init( bDedicated ) : NET_Shutdown()
Missing shutdown function for Key_Init() : Key_Shutdown()
Missing shutdown function for Filter_Init() : Filter_Shutdown()
Missing shutdown function for saverestore->Init() : saverestore->Shutdown()
Missing shutdown function for COM_Init() : COM_Shutdown()
Missing shutdown function for V_Init() : V_Shutdown()
Missing shutdown function for g_pCVar->Init() : g_pCVar->Shutdown()
Missing shutdown function for Cmd_Init() : Cmd_Shutdown()
Missing shutdown function for Cbuf_Init() : Cbuf_Shutdown()
Missing shutdown function for Con_Init() : Con_Shutdown()
Missing shutdown function for Memory_Init() : Memory_Shutdown()
Missing shutdown function for Host_Init( s_bIsDedicated ) : Host_Shutdown()
Missing shutdown function for Sys_InitMemory() : Sys_ShutdownMemory()
Missing shutdown function for Sys_Init() : Sys_Shutdown()
Missing shutdown function for COM_InitFilesystem( info.m_pInitialMod ) : COM_ShutdownFileSystem()

[editline]21st August 2017[/editline]

Added in logging to SetModel() function on player. Seems not only to be damage, setting a player to a model causes it to crash? Hmm… This is odd because it works most of the time, seems to freak out for some reason.

Decompiled one model and it has extra bones that valve calls helper bones.


nodes
  0 "ValveBiped.Bip01_Pelvis" -1
  1 "ValveBiped.Bip01_Spine" 0
  2 "ValveBiped.Bip01_Spine1" 1
  3 "ValveBiped.Bip01_Spine2" 2
  4 "ValveBiped.Bip01_Spine4" 3
  5 "ValveBiped.Bip01_Neck1" 4
  6 "ValveBiped.Bip01_Head1" 5
  7 "ValveBiped.forward" 6
  8 "ValveBiped.Bip01_R_Clavicle" 4
  9 "ValveBiped.Bip01_R_UpperArm" 8
  10 "ValveBiped.Bip01_R_Forearm" 9
  11 "ValveBiped.Bip01_R_Hand" 10
  12 "ValveBiped.Anim_Attachment_RH" 11
  13 "ValveBiped.Bip01_L_Clavicle" 4
  14 "ValveBiped.Bip01_L_UpperArm" 13
  15 "ValveBiped.Bip01_L_Forearm" 14
  16 "ValveBiped.Bip01_L_Hand" 15
  17 "ValveBiped.Anim_Attachment_LH" 16
  18 "ValveBiped.Bip01_R_Thigh" 0
  19 "ValveBiped.Bip01_R_Calf" 18
  20 "ValveBiped.Bip01_R_Foot" 19
  21 "ValveBiped.Bip01_L_Thigh" 0
  22 "ValveBiped.Bip01_L_Calf" 21
  23 "ValveBiped.Bip01_L_Foot" 22
  24 "ValveBiped.Bip01_R_Finger2" 11
  25 "ValveBiped.Bip01_R_Finger21" 24
  26 "ValveBiped.Bip01_R_Finger22" 25
  27 "ValveBiped.Bip01_R_Finger1" 11
  28 "ValveBiped.Bip01_R_Finger11" 27
  29 "ValveBiped.Bip01_R_Finger12" 28
  30 "ValveBiped.Bip01_R_Finger4" 11
  31 "ValveBiped.Bip01_R_Finger41" 30
  32 "ValveBiped.Bip01_R_Finger42" 31
  33 "ValveBiped.Bip01_R_Finger3" 11
  34 "ValveBiped.Bip01_R_Finger31" 33
  35 "ValveBiped.Bip01_R_Finger32" 34
  36 "ValveBiped.Bip01_R_Finger0" 11
  37 "ValveBiped.Bip01_R_Finger01" 36
  38 "ValveBiped.Bip01_R_Finger02" 37
  39 "ValveBiped.Bip01_R_Wrist" 10
  40 "ValveBiped.Bip01_R_Ulna" 10
  41 "ValveBiped.Bip01_L_Finger2" 16
  42 "ValveBiped.Bip01_L_Finger21" 41
  43 "ValveBiped.Bip01_L_Finger22" 42
  44 "ValveBiped.Bip01_L_Finger3" 16
  45 "ValveBiped.Bip01_L_Finger31" 44
  46 "ValveBiped.Bip01_L_Finger32" 45
  47 "ValveBiped.Bip01_L_Finger4" 16
  48 "ValveBiped.Bip01_L_Finger41" 47
  49 "ValveBiped.Bip01_L_Finger42" 48
  50 "ValveBiped.Bip01_L_Finger1" 16
  51 "ValveBiped.Bip01_L_Finger11" 50
  52 "ValveBiped.Bip01_L_Finger12" 51
  53 "ValveBiped.Bip01_L_Finger0" 16
  54 "ValveBiped.Bip01_L_Finger01" 53
  55 "ValveBiped.Bip01_L_Finger02" 54
  56 "ValveBiped.Bip01_L_Wrist" 15
  57 "ValveBiped.Bip01_L_Ulna" 15
  58 "ValveBiped.Bip01_R_Bicep" 9
  59 "ValveBiped.Bip01_R_Shoulder" 9
  60 "ValveBiped.Bip01_R_Elbow" 9
  61 "ValveBiped.Bip01_R_Trapezius" 8
  62 "ValveBiped.Bip01_L_Bicep" 14
  63 "ValveBiped.Bip01_L_Shoulder" 14
  64 "ValveBiped.Bip01_L_Elbow" 14
  65 "ValveBiped.Bip01_L_Trapezius" 13
  66 "ValveBiped.Bip01_R_Toe0" 20
  67 "ValveBiped.Bip01_L_Toe0" 23
end

Valve uses this


// simplifiy by removing the helper bones
     	replacebone "ValveBiped.Bip01_L_Elbow" "ValveBiped.Bip01_L_upperarm"
	replacebone "ValveBiped.Bip01_R_Elbow" "ValveBiped.Bip01_R_upperarm"
	replacebone "ValveBiped.Bip01_L_Ulna" "ValveBiped.Bip01_L_Forearm"
	replacebone "ValveBiped.Bip01_R_Ulna" "ValveBiped.Bip01_R_Forearm"
	replacebone "ValveBiped.Bip01_L_Shoulder" "ValveBiped.Bip01_L_upperarm"	
	replacebone "ValveBiped.Bip01_R_Shoulder" "ValveBiped.Bip01_R_upperarm"
	replacebone "ValveBiped.Bip01_L_Trapezius" "ValveBiped.Bip01_L_upperarm"
	replacebone "ValveBiped.Bip01_R_Trapezius" "ValveBiped.Bip01_R_upperarm"
	replacebone "ValveBiped.Bip01_L_Wrist" "ValveBiped.Bip01_L_Forearm"
	replacebone "ValveBiped.Bip01_R_Wrist" "ValveBiped.Bip01_R_Forearm"
	replacebone "ValveBiped.Bip01_L_Bicep" "ValveBiped.Bip01_L_upperarm"
	replacebone "ValveBiped.Bip01_R_Bicep" "ValveBiped.Bip01_R_upperarm"

Can a dev verify these dump files are caused by the same SlerpBones issue?

Thanks.

It’s the same crash

[editline]21st August 2017[/editline]

The “too many bones” error message should only appear if the model contains more than 256 bones which is the max supported by GMod. It should also contain a model name.

It seems the with some models loading, SOMETIMES, the model data in-engine gets corrupted for some reason.

Thanks Robotboy655. I’ve narrowed it down significantly to exactly which models are causing the crashes.

It seems fall damage also triggers the crash, so its not always related to bullets.
and or the player was in a vehicle and took damage with lua

How I found out which models were corrupt / crashing (for future reference):
Used Robotboy’s Entity gmod tool and looked over bones, hitboxes for overcomplicated skeleton.
Started debugging the server using -condebug
Detoured player SetModel() function
Started outputting damage done to players.

E.g. of crash


bLogs Player Damage | Carlos Santos (STEAM_0:0:165176498) (member) (weapon_keys) (99h)  damaged themself for 25 damage
Missing shutdown function for Sys_InitAuthentication() : Sys_ShutdownAuthentication()
Missing shutdown function for S_Init() : S_Shutdown()
Missing shutdown function for Decal_Init() : Decal_Shutdown()
Missing shutdown function for InitStudioRender() : ShutdownStudioRender()
Missing shutdown function for StaticPropMgr()->Init() : StaticPropMgr()->Shutdown()
Missing shutdown function for modelloader->Init() : modelloader->Shutdown()
Missing shutdown function for InitMaterialSystem() : ShutdownMaterialSystem()
Missing shutdown function for HLTV_Init() : HLTV_Shutdown()
Missing shutdown function for g_Log.Init() : g_Log.Shutdown()
Missing shutdown function for sv.Init( bDedicated ) : sv.Shutdown()
Missing shutdown function for g_GameEventManager.Init() : g_GameEventManager.Shutdown()
Missing shutdown function for NET_Init( bDedicated ) : NET_Shutdown()
Missing shutdown function for Key_Init() : Key_Shutdown()
Missing shutdown function for Filter_Init() : Filter_Shutdown()
Missing shutdown function for saverestore->Init() : saverestore->Shutdown()
Missing shutdown function for COM_Init() : COM_Shutdown()
Missing shutdown function for V_Init() : V_Shutdown()
Missing shutdown function for g_pCVar->Init() : g_pCVar->Shutdown()
Missing shutdown function for Cmd_Init() : Cmd_Shutdown()
Missing shutdown function for Cbuf_Init() : Cbuf_Shutdown()
Missing shutdown function for Con_Init() : Con_Shutdown()
Missing shutdown function for Memory_Init() : Memory_Shutdown()
Missing shutdown function for Host_Init( s_bIsDedicated ) : Host_Shutdown()
Missing shutdown function for Sys_InitMemory() : Sys_ShutdownMemory()
Missing shutdown function for Sys_Init() : Sys_Shutdown()
Missing shutdown function for COM_InitFilesystem( info.m_pInitialMod ) : COM_ShutdownFileSystem()

Players previous model


Setting Carlos Santos to model: models/player/portal/male_02_medic.mdl
ServerLog:  Setting Carlos Santos to model: models/player/portal/male_02_medic.mdl
L 08/21/2017 - 19:56:26:  Setting Carlos Santos to model: models/player/portal/male_02_medic.mdl

Detour for SetModel


local pmeta = debug.getregistry().Player
local emeta = debug.getregistry().Entity
OLDSETMODEL = OLDSETMODEL or emeta.SetModel

function pmeta:SetModel(model)
        print("Setting " .. self:Nick() .. " to model: " .. model)
        OLDSETMODEL(self, model)
end

Link to Robotboy’s workshop addon I used: http://steamcommunity.com/sharedfiles/filedetails/?id=195065185

Link to suspected models causing the crash (images): http://forum.facepunch.com/showthread.php?t=1575660&p=52590463&viewfull=1#post52590463