Facepunch / garrysmod-issues

Garry's Mod issue tracker
142 stars 56 forks source link

Linux Server Crash #4885

Closed blobles-dev closed 6 months ago

blobles-dev commented 3 years ago

Running 31st March update,

This might be related to #4875, but this crash did not happen after a changelevel, 10-15 minutes afterwards, so potentially unrelated.

Protocol version 24 Exe version 2020.10.14 (garrysmod) Exe build: 04:02:35 Mar 30 2021 (8173) (4000) GMod version 2021.03.30, branch: unknown Linux 32bit Dedicated Server

Console before crash:

-------------------------------------------------------------------------------
CMDLCache::GetStudioHdr(0x4A) : invalid handle, not in dictionary (of size 464).
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
CMDLCache::GetStudioHdr(0x4A) : invalid handle, not in dictionary (of size 464).
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
CMDLCache::GetStudioHdr(0x4A) : invalid handle, not in dictionary (of size 464).
-------------------------------------------------------------------------------

debug.log:

[New LWP 21]
[New LWP 24]
[New LWP 28]
[New LWP 46]
[New LWP 466]
[New LWP 22]
[New LWP 43]
[New LWP 51]
[New LWP 50]
[New LWP 41]
[New LWP 44]
[New LWP 54]
[New LWP 52]
[New LWP 26]
[New LWP 27]
[New LWP 53]
[New LWP 465]
[New LWP 23]
[New LWP 25]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `./srcds_linux -game garrysmod -console -port 27015 +ip 51.81.116.29 -strictport'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0xf2f026f3 in CMDLCache::GetVCollideEx(unsigned short, bool) () from /home/container/bin/datacache_srv.so
[Current thread is 1 (Thread 0xf7263fc0 (LWP 21))]
#0  0xf2f026f3 in CMDLCache::GetVCollideEx(unsigned short, bool) () from /home/container/bin/datacache_srv.so
#1  0xf2f02b81 in CMDLCache::GetVCollide(unsigned short) () from /home/container/bin/datacache_srv.so
#2  0xf5bfe60a in CModelInfo::GetVCollide(int) () from /home/container/bin/engine_srv.so
#3  0xf21cee87 in CBaseAnimating::SetModel(char const*) () from /home/container/garrysmod/bin/server_srv.so
#4  0xf204eca0 in Entity__SetModel(ILuaInterface*) () from /home/container/garrysmod/bin/server_srv.so
#5  0xeea3fd19 in lj_BC_FUNCC () from /home/container/garrysmod/bin/lua_shared_srv.so
#6  0xeea33198 in lua_pcall () from /home/container/garrysmod/bin/lua_shared_srv.so
#7  0xee9fd5ec in CLuaInterface::PCall(int, int, int) () from /home/container/garrysmod/bin/lua_shared_srv.so
#8  0xeea06a56 in CLuaInterface::CallFunctionProtected(int, int, bool) () from /home/container/garrysmod/bin/lua_shared_srv.so
#9  0xee9fe6bc in CLuaInterface::CallInternalNoReturns(int) () from /home/container/garrysmod/bin/lua_shared_srv.so
#10 0xf2018f4f in LuaConCommand(CCommand const&) () from /home/container/garrysmod/bin/server_srv.so
#11 0xf5c5234c in CGameClient::ExecuteStringCommand(char const*) () from /home/container/bin/engine_srv.so
#12 0xf5b7888b in CBaseClient::ProcessStringCmd(NET_StringCmd*) () from /home/container/bin/engine_srv.so
#13 0xf5b39f88 in NET_StringCmd::Process() () from /home/container/bin/engine_srv.so
#14 0xf5c1bbf2 in CNetChan::ProcessMessages(bf_read&) () from /home/container/bin/engine_srv.so
#15 0xf5c1bf43 in CNetChan::CheckReceivingList(int) () from /home/container/bin/engine_srv.so
#16 0xf5c1c22f in CNetChan::ProcessPacket(netpacket_s*, bool) () from /home/container/bin/engine_srv.so
#17 0xf5c244ae in NET_ProcessSocket(int, IConnectionlessPacketHandler*) () from /home/container/bin/engine_srv.so
#18 0xf5b87f7e in CBaseServer::RunFrame() () from /home/container/bin/engine_srv.so
#19 0xf5c6451e in SV_Frame(bool) () from /home/container/bin/engine_srv.so
#20 0xf5be27ce in _Host_RunFrame_Server(bool) () from /home/container/bin/engine_srv.so
#21 0xf5be3124 in _Host_RunFrame(float) () from /home/container/bin/engine_srv.so
#22 0xf5bef338 in CHostState::State_Run(float) () from /home/container/bin/engine_srv.so
#23 0xf5bef616 in CHostState::FrameUpdate(float) () from /home/container/bin/engine_srv.so
#24 0xf5bef65d in HostState_Frame(float) () from /home/container/bin/engine_srv.so
#25 0xf5c79738 in CEngine::Frame() () from /home/container/bin/engine_srv.so
#26 0xf5c772e6 in CDedicatedServerAPI::RunFrame() () from /home/container/bin/engine_srv.so
#27 0xf706c66a in RunServer() () from bin/dedicated_srv.so
#28 0xf5c7738d in CModAppSystemGroup::Main() () from /home/container/bin/engine_srv.so
#29 0xf5ccd038 in CAppSystemGroup::Run() () from /home/container/bin/engine_srv.so
#30 0xf5c7769d in CDedicatedServerAPI::ModInit(ModInfo_t&) () from /home/container/bin/engine_srv.so
#31 0xf706c328 in CDedicatedAppSystemGroup::Main() () from bin/dedicated_srv.so
#32 0xf70c9048 in CAppSystemGroup::Run() () from bin/dedicated_srv.so
#33 0xf70c9048 in CAppSystemGroup::Run() () from bin/dedicated_srv.so
#34 0xf70196fa in main () from bin/dedicated_srv.so
#35 0x08048aab in main ()
No symbol table info available.
eax            0x1e54c4a0   508871840
ecx            0x4a 74
edx            0x1  1
ebx            0x0  0
esp            0xffd5ab20   0xffd5ab20
ebp            0xffd5ab48   0xffd5ab48
esi            0xf2f43c60   -218874784
edi            0xf2f43c60   -218874784
eip            0xf2f026f3   0xf2f026f3 <CMDLCache::GetVCollideEx(unsigned short, bool)+51>
eflags         0x210206 [ PF IF RF ID ]
cs             0x23 35
ss             0x2b 43
ds             0x2b 43
es             0x2b 43
fs             0x0  0
gs             0x63 99
From        To          Syms Read   Shared Object Library
0xf77259a0  0xf773b9f8  Yes (*)     bin/libtcmalloc_minimal.so.4
0xf7706ad0  0xf7707a84  Yes (*)     /lib/i386-linux-gnu/libdl.so.2
0xf76eb9d0  0xf76fb20f  Yes (*)     /lib/i386-linux-gnu/libpthread.so.0
0xf7523610  0xf7670386  Yes (*)     /lib/i386-linux-gnu/libc.so.6
0xf73f33a0  0xf74b09c4  Yes (*)     /usr/lib/i386-linux-gnu/libstdc++.so.6
0xf728c590  0xf734c8f5  Yes (*)     /lib/i386-linux-gnu/libm.so.6
0xf72670b0  0xf727cb55  Yes (*)     /lib/i386-linux-gnu/libgcc_s.so.1
0xf7768ab0  0xf77837fb  Yes (*)     /lib/ld-linux.so.2
0xf723f9b0  0xf7253c38  Yes (*)     bin/libtier0_srv.so
0xf722d910  0xf72313a4  Yes (*)     /lib/i386-linux-gnu/librt.so.1
0xf7144d60  0xf71675f8  Yes (*)     bin/libvstdlib_srv.so
0xf7018580  0xf70e9bb4  Yes (*)     bin/dedicated_srv.so
0xf6f95780  0xf6fc1fb4  Yes (*)     bin/libsteam_api.so
0xf6661e80  0xf666de44  Yes (*)     /lib/i386-linux-gnu/libtinfo.so.5
0xf5b1cd80  0xf5cece74  Yes (*)     /home/container/bin/engine_srv.so
0xf5a7a5f0  0xf5a9bc13  Yes (*)     /home/container/bin/soundemittersystem_srv.so
0xf394be90  0xf3a0d783  Yes (*)     /home/container/bin/materialsystem_srv.so
0xf310ac50  0xf31b4313  Yes (*)     /home/container/bin/studiorender_srv.so
0xf2f72b60  0xf308be30  Yes (*)     /home/container/bin/vphysics_srv.so
0xf2eda3b0  0xf2f239e3  Yes (*)     /home/container/bin/datacache_srv.so
0xf2ea8400  0xf2eb8973  Yes (*)     /home/container/bin/shaderapiempty_srv.so
0xf1de3330  0xf28e2c44  Yes (*)     /home/container/garrysmod/bin/server_srv.so
0xf193fb90  0xf1951283  Yes (*)     /home/container/bin/scenefilecache_srv.so
0xeeac1bb0  0xeeac8554  Yes (*)     /lib/i386-linux-gnu/libnss_files.so.2
0xeeab9b70  0xeeabcad4  Yes (*)     /lib/i386-linux-gnu/libnss_dns.so.2
0xeeaa3660  0xeeaaf4c4  Yes (*)     /lib/i386-linux-gnu/libresolv.so.2
0xee9f9a40  0xeea6a314  Yes (*)     /home/container/garrysmod/bin/lua_shared_srv.so
0xecac2d80  0xede4d104  Yes (*)     bin/steamclient.so
0xefac2130  0xefaea064  Yes (*)     bin/crashhandler.so
0xeb8f0650  0xeb99182c  Yes (*)     bin/libSDL2-2.0.so.0
0xf0e0bfe0  0xf0f6dd14  Yes         /home/container/garrysmod/lua/bin/gmsv_mysqloo_linux.dll
0xefb64000  0xefd92644  Yes (*)     /home/container/garrysmod/lua/bin/gmsv_chttp_linux.dll
(*): Shared library is missing debugging information.
Dump of assembler code for function _ZN9CMDLCache13GetVCollideExEtb:
   0xf2f026c0 <+0>: push   %ebp
   0xf2f026c1 <+1>: mov    %esp,%ebp
   0xf2f026c3 <+3>: push   %edi
   0xf2f026c4 <+4>: push   %esi
   0xf2f026c5 <+5>: push   %ebx
   0xf2f026c6 <+6>: sub    $0x1c,%esp
   0xf2f026c9 <+9>: mov    0xf2f4401c,%ecx
   0xf2f026cf <+15>:    mov    0x8(%ebp),%edi
   0xf2f026d2 <+18>:    mov    0xc(%ebp),%eax
   0xf2f026d5 <+21>:    mov    0x10(%ebp),%edx
   0xf2f026d8 <+24>:    mov    0x30(%ecx),%ecx
   0xf2f026db <+27>:    test   %ecx,%ecx
   0xf2f026dd <+29>:    jne    0xf2f02728 <_ZN9CMDLCache13GetVCollideExEtb+104>
   0xf2f026df <+31>:    cmp    $0xffff,%ax
   0xf2f026e3 <+35>:    je     0xf2f02728 <_ZN9CMDLCache13GetVCollideExEtb+104>
   0xf2f026e5 <+37>:    movzwl %ax,%ecx
   0xf2f026e8 <+40>:    mov    %ecx,%eax
   0xf2f026ea <+42>:    shl    $0x4,%eax
   0xf2f026ed <+45>:    add    0x28(%edi),%eax
   0xf2f026f0 <+48>:    mov    0xc(%eax),%ebx
=> 0xf2f026f3 <+51>:    testb  $0x2,0x20(%ebx)
   0xf2f026f7 <+55>:    je     0xf2f02710 <_ZN9CMDLCache13GetVCollideExEtb+80>
   0xf2f026f9 <+57>:    testw  $0x7fff,0x4(%ebx)
   0xf2f026ff <+63>:    je     0xf2f02728 <_ZN9CMDLCache13GetVCollideExEtb+104>
   0xf2f02701 <+65>:    lea    0x4(%ebx),%eax
   0xf2f02704 <+68>:    add    $0x1c,%esp
   0xf2f02707 <+71>:    pop    %ebx
   0xf2f02708 <+72>:    pop    %esi
   0xf2f02709 <+73>:    pop    %edi
   0xf2f0270a <+74>:    pop    %ebp
   0xf2f0270b <+75>:    ret    
   0xf2f0270c <+76>:    lea    0x0(%esi,%eiz,1),%esi
   0xf2f02710 <+80>:    movzbl %dl,%esi
   0xf2f02713 <+83>:    mov    %ecx,0x4(%esp)
   0xf2f02717 <+87>:    mov    %esi,0x8(%esp)
   0xf2f0271b <+91>:    mov    %edi,(%esp)
   0xf2f0271e <+94>:    call   0xf2f01f30 <_ZN9CMDLCache19UnserializeVCollideEtb>
   0xf2f02723 <+99>:    jmp    0xf2f026f9 <_ZN9CMDLCache13GetVCollideExEtb+57>
   0xf2f02725 <+101>:   lea    0x0(%esi),%esi
   0xf2f02728 <+104>:   add    $0x1c,%esp
   0xf2f0272b <+107>:   xor    %eax,%eax
   0xf2f0272d <+109>:   pop    %ebx
   0xf2f0272e <+110>:   pop    %esi
   0xf2f0272f <+111>:   pop    %edi
   0xf2f02730 <+112>:   pop    %ebp
   0xf2f02731 <+113>:   ret    
End of assembler dump.
Stack level 0, frame at 0xffd5ab50:
 eip = 0xf2f026f3 in CMDLCache::GetVCollideEx(unsigned short, bool); saved eip = 0xf2f02b81
 called by frame at 0xffd5ab70
 Arglist at 0xffd5ab48, args: 
 Locals at 0xffd5ab48, Previous frame's sp is 0xffd5ab50
 Saved registers:
  ebx at 0xffd5ab3c, ebp at 0xffd5ab48, esi at 0xffd5ab40, edi at 0xffd5ab44, eip at 0xffd5ab4c
End of Source crash report
----------------------------------------------
robotboy655 commented 3 years ago

image

Looks like you are hitting some kind of unknown issue with the engine. I can add some more safeguards in other places but I cannot even begin to guess at the root cause. Perhaps some bad model is not being cached properly?

As far as I can tell you are the only one who is having this issue, so maybe you can look into potential causes of this, remove some addons, see if it continues, maybe log Entity.SetModel calls, etc.

blobles-dev commented 3 years ago

Thanks for the update, seems to be a very rare occurrence. Hasn't happened since I first reported it, which was not long after I updated to latest version. Safeguarding seems like the best bet for now.

On Wed, 7 Apr 2021, 15:00 Rubat, @.***> wrote:

[image: image] https://user-images.githubusercontent.com/3299036/113878165-09df2280-97c2-11eb-9ae5-bc4bac8e9943.png

Looks like you are hitting some kind of unknown issue with the engine. I can add some more safeguards in other places but I cannot even begin to guess at the root cause.

As far as I can tell you are the only one who is having this issue, so maybe you can look into potential causes of this, remove some addons, see if it continues, maybe log Entity.SetModel calls, etc.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Facepunch/garrysmod-issues/issues/4885#issuecomment-814938627, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASCMDQQQLYA2Z3ANFX5RFHLTHRQPDANCNFSM42G26LIQ .