theAsmodai / metamod-r

Metamod is a plugin/DLL manager that sits between the Half-Life Engine and an HL Game mod, allowing the dynamic loading/unloading of mod-like DLL plugins to add functionality to the HL server or game mod. Metamod-r is improved version of metamod.
GNU General Public License v3.0
139 stars 35 forks source link

[BUG]: Server Crash using query_client_cvar #67

Closed NiceFeatures closed 6 months ago

NiceFeatures commented 6 months ago

Contact Details (optional)

What happened?

If use this query the server crashes in few minutes.

include

include

include

public plugin_init() { register_plugin("Query cvar", "1.0", "GH") }

public client_putinserver(id) { set_task_ex(10.0, "CheckCvars", id, .flags = SetTask_Once) }

public CheckCvars(id) { if(is_user_connected(id)) { query_client_cvar(id, "cl_minmodels", "OnClMinModels_CallBack") } }

public OnClMinModels_CallBack(id, const Cvar[], const Value[]) { if (equal(Cvar, "cl_minmodels")) if(str_to_num(Value) != 0) rh_drop_client(id, fmt("Proibido usar cl_minmodels 1, mude para 0")) }

Here the log https://hastebin.com/share/sadelayefu.vbnet

Metamod-r Version

1.3.0.138 (Default)

AMX Mod X Version

1.10.x

What engine are you seeing the problem on?

reHLDS

What version of engine are you seeing the problem on?

reHLDS (3.13.0.788)

What OS are you seeing the problem on?

Linux

What OS version are you seeing the problem on?

Other Linux

Relevant log output

Hastebin

----------------------------------------------
CRASH: Wed Dec 13 18:14:40 -03 2023
Start Line: ./hlds_linux -console -game cstrike +ip 177.54.152.211 +port 27050 +maxplayers 14 +sys_ticrate 1000 -pingboost 3 +map de_dust2 +fps_max 1000 -debug +insecure -pidfile hlds.10355.pid
[New LWP 23108]
[New LWP 23115]
[New LWP 23121]
[New LWP 23119]
[New LWP 23120]
[New LWP 23212]
[New LWP 23216]
[New LWP 23217]
[New LWP 23211]
[New LWP 23221]
[New LWP 23218]
[New LWP 23122]
[New LWP 23124]
[New LWP 23223]
[New LWP 23235]
[New LWP 23237]
[New LWP 23220]
[New LWP 23481]
[New LWP 23233]
[New LWP 23639]
[New LWP 23383]
[New LWP 23242]
[New LWP 23210]
[New LWP 23236]
[New LWP 23232]
[New LWP 23384]
[New LWP 24369]
[New LWP 23213]
[New LWP 23219]
[New LWP 23563]
[New LWP 23238]
[New LWP 23659]
[New LWP 23123]
[New LWP 23483]
[New LWP 23222]
[New LWP 23261]
[New LWP 23239]
[New LWP 23766]
[New LWP 24501]
[New LWP 23114]
[New LWP 23934]
[New LWP 23243]
[New LWP 24426]
[New LWP 23234]
[New LWP 23561]
[New LWP 24401]
[New LWP 23657]
[New LWP 23253]
[New LWP 23977]
[New LWP 23526]
[New LWP 24540]
[New LWP 23412]
[New LWP 23246]
[New LWP 24127]
[New LWP 24125]
[New LWP 23885]
[New LWP 24587]
[New LWP 23252]
[New LWP 23875]
[New LWP 24423]
[New LWP 23245]
[New LWP 24425]
[New LWP 23254]
[New LWP 23831]
[New LWP 24432]
[New LWP 24378]
[New LWP 23425]
[New LWP 23255]
[New LWP 23668]
[New LWP 23515]
[New LWP 24552]
[New LWP 23400]
[New LWP 23800]
[New LWP 24400]
[New LWP 24551]
[New LWP 23250]
[New LWP 23364]
[New LWP 24397]
[New LWP 23508]
[New LWP 23378]
[New LWP 23870]
[New LWP 23248]
[New LWP 24519]
[New LWP 23465]
[New LWP 23788]
[New LWP 24393]
[New LWP 23257]
[New LWP 23382]
[New LWP 24386]
[New LWP 23649]
[New LWP 23386]
[New LWP 23935]
[New LWP 24492]
[New LWP 23524]
[New LWP 23770]
[New LWP 24298]
[New LWP 23482]
[New LWP 23385]
[New LWP 24311]
[New LWP 23876]
[New LWP 23478]
[New LWP 23595]
[New LWP 23600]
[New LWP 24422]
[New LWP 24229]
[New LWP 23516]
[New LWP 23418]
[New LWP 24157]
[New LWP 23886]
[New LWP 23580]
[New LWP 23615]
[New LWP 23562]
[New LWP 24409]
[New LWP 24193]
[New LWP 23624]
[New LWP 24147]
[New LWP 23500]
[New LWP 23887]
[New LWP 23671]
[New LWP 23771]
[New LWP 23522]
[New LWP 24259]
[New LWP 24177]
[New LWP 23685]
[New LWP 24104]
[New LWP 23650]
[New LWP 23908]
[New LWP 23708]
[New LWP 23518]
[New LWP 23864]
[New LWP 24242]
[New LWP 24146]
[New LWP 23709]
[New LWP 24097]
[New LWP 23947]
[New LWP 23480]
[New LWP 23783]
[New LWP 23866]
[New LWP 23683]
[New LWP 24112]
[New LWP 24241]
[New LWP 23798]
[New LWP 24036]
[New LWP 23959]
[New LWP 23394]
[New LWP 23982]
[New LWP 23803]
[New LWP 24093]
[New LWP 23768]
[New LWP 23517]
[New LWP 24225]
[New LWP 23946]
[New LWP 24027]
[New LWP 23981]
[New LWP 23247]
[New LWP 23258]
[New LWP 24029]
[New LWP 23889]
[New LWP 24030]
[New LWP 23799]
[New LWP 24224]
[New LWP 24098]
[New LWP 23507]
[New LWP 23928]
[New LWP 24099]
[New LWP 23244]
[New LWP 24033]
[New LWP 23215]
[New LWP 24172]
[New LWP 23980]
[New LWP 23921]
[New LWP 24138]
[New LWP 23867]
[New LWP 23466]
[New LWP 24226]
[New LWP 24037]
[New LWP 23950]
[New LWP 23979]
[New LWP 23379]
[New LWP 23951]
[New LWP 24158]
[New LWP 23415]
[New LWP 23772]
[New LWP 23816]
[New LWP 24105]
[New LWP 24227]
[New LWP 23991]
[New LWP 23976]
[New LWP 23259]
[New LWP 24026]
[New LWP 23365]
[New LWP 24175]
[New LWP 23769]
[New LWP 23802]
[New LWP 24145]
[New LWP 24260]
[New LWP 24045]
[New LWP 23952]
[New LWP 23251]
[New LWP 23322]
[New LWP 24100]
[New LWP 24304]
[New LWP 23669]
[New LWP 23795]
[New LWP 24402]
[New LWP 24337]
[New LWP 24128]
[New LWP 23949]
[New LWP 23260]
[New LWP 24132]
[New LWP 23249]
[New LWP 24485]
[New LWP 23653]
[New LWP 23759]
[New LWP 24415]
[New LWP 24491]
[New LWP 24210]
[New LWP 23888]
[New LWP 23241]
[New LWP 23256]
[New LWP 24230]
[New LWP 24502]
[New LWP 24588]
[New LWP 23686]
[New LWP 24433]
[New LWP 24498]
[New LWP 24258]
[New LWP 23240]
[New LWP 24521]
[New LWP 24312]
[New LWP 24365]
[New LWP 23660]
[New LWP 24487]
[New LWP 23214]
[New LWP 24527]
[New LWP 24394]
[New LWP 23581]
[New LWP 24424]
[New LWP 24533]
[New LWP 23380]
[New LWP 24584]
[New LWP 23567]
[New LWP 24431]
[New LWP 24565]
[New LWP 24466]
[New LWP 23441]
[New LWP 24468]
[New LWP 23413]
[New LWP 24526]
[New LWP 24585]
[New LWP 24583]
[New LWP 24564]
[New LWP 23409]
[New LWP 23399]
[New LWP 24586]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `./hlds_linux -console -game cstrike +ip 177.54.152.211 +port 27050 +maxplayers'.
Program terminated with signal 11, Segmentation fault.
#0  0xf1dccd3a in C_CvarValue2(edict_s const*, int, char const*, char const*) () from /home/cs27050-211csdx/cstrike/addons/amxmodx/dlls/amxmodx_mm_i386.so
#0  0xf1dccd3a in C_CvarValue2(edict_s const*, int, char const*, char const*) () from /home/cs27050-211csdx/cstrike/addons/amxmodx/dlls/amxmodx_mm_i386.so
#1  0xffffffff in ?? ()
#2  0xffffffff in ?? ()
#3  0x0a95d438 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
No symbol table info available.
From        To          Syms Read   Shared Object Library
0xf7771a30  0xf777291c  Yes (*)     /lib/libdl.so.2
0xf76e4914  0xf772ac78  Yes         ./libstdc++.so.6
0xf7660490  0xf768ac66  Yes (*)     /lib/libm.so.6
0xf74a87b0  0xf75f87db  Yes (*)     /lib/libc.so.6
0xf77848a0  0xf779fb91  Yes (*)     /lib/ld-linux.so.2
0xf747ce04  0xf748c490  Yes         ./libgcc_s.so.1
0xf6d9c820  0xf6e8dfb0  Yes (*)     /home/cs27050-211csdx/engine_i486.so
0xf6d608e0  0xf6d63f3a  Yes (*)     /lib/librt.so.1
0xf6d4e5c0  0xf6d58d74  Yes (*)     ./libsteam_api.so
0xf6d35730  0xf6d41907  Yes (*)     /lib/libpthread.so.0
0xf6d0be00  0xf6d27838  Yes (*)     /home/cs27050-211csdx/filesystem_stdio.so
0xf4f38000  0xf64c00c4  Yes (*)     ./steamclient.so
0xf4d6f670  0xf4de5020  Yes (*)     ./crashhandler.so
0xf250b3a0  0xf254ea90  Yes (*)     /home/cs27050-211csdx/./cstrike/addons/metamod/metamod_i386.so
0xf22b46a0  0xf244bb90  Yes (*)     /home/cs27050-211csdx/cstrike/dlls/cs.so
0xf2165090  0xf216846a  Yes (*)     /home/cs27050-211csdx/cstrike/addons/accuracyfix/dlls/accuracyfix_mm.so
0xf212d850  0xf2151550  Yes (*)     /home/cs27050-211csdx/cstrike/addons/protecoes/reunion/reunion_mm_i386.so
0xf210e200  0xf2121120  Yes (*)     /home/cs27050-211csdx/cstrike/addons/protecoes/rechecker/rechecker_mm_i386.so
0xf20767b0  0xf20e0bc4  Yes (*)     /home/cs27050-211csdx/cstrike/addons/protecoes/vtc/VoiceTranscoder.so
0xf1fc0340  0xf1fd348e  Yes (*)     /home/cs27050-211csdx/cstrike/addons/protecoes/whblocker/whblocker_mm_i386.so
0xf0d50530  0xf0d7f9b4  Yes (*)     /home/cs27050-211csdx/cstrike/addons/protecoes/hitbox_fix/hitbox_fix_mm_i386.so
0xf1f9d690  0xf1fb2014  Yes (*)     /home/cs27050-211csdx/cstrike/addons/protecoes/snac/SafeNameAndChat.so
0xf1dc8070  0xf1e2c2e0  Yes (*)     /home/cs27050-211csdx/cstrike/addons/amxmodx/dlls/amxmodx_mm_i386.so
0xf1d78d50  0xf1d88460  Yes (*)     cstrike/addons/amxmodx/modules/cstrike_amxx_i386.so
0xf1d359e0  0xf1d61dac  Yes (*)     cstrike/addons/amxmodx/modules/fakemeta_amxx_i386.so
0xf1ca8020  0xf1cf1180  Yes (*)     cstrike/addons/amxmodx/modules/reapi_amxx_i386.so
0xf0a18790  0xf0ab0fc5  Yes (*)     cstrike/addons/amxmodx/modules/mysql_amxx_i386.so
0xf1b712d0  0xf1c52980  Yes (*)     cstrike/addons/amxmodx/modules/sqlite_amxx_i386.so
0xf1aed830  0xf1b34974  Yes (*)     cstrike/addons/amxmodx/modules/hamsandwich_amxx_i386.so
0xf1a58120  0xf1a5e444  Yes (*)     cstrike/addons/amxmodx/modules/csx_amxx_i386.so
0xf1951290  0xf195d80c  Yes (*)     cstrike/addons/amxmodx/modules/engine_amxx_i386.so
0xf097b660  0xf097ff84  Yes (*)     cstrike/addons/amxmodx/modules/fun_amxx_i386.so
0xf0510400  0xf07cb5b4  Yes         cstrike/addons/amxmodx/modules/easy_http_amxx_i386.so
0xf19eda10  0xf19f5089  Yes (*)     /lib/libnss_files.so.2
0xf19e5be0  0xf19e91f4  Yes (*)     /lib/libnss_dns.so.2
0xf19ce6b0  0xf19dd124  Yes (*)     /lib/libresolv.so.2
0xf1a3e7b0  0xf1a47a8c  Yes (*)     cstrike/addons/amxmodx/modules/json_amxx_i386.so
0xf09945d0  0xf09dd508  Yes (*)     cstrike/addons/amxmodx/modules/regex_amxx_i386.so
(*): Shared library is missing debugging information.
Stack level 0, frame at 0xfff72e14:
 eip = 0xf1dccd3a in C_CvarValue2(edict_s const*, int, char const*, char const*); saved eip 0xffffffff
 called by frame at 0xfff72e18
 Arglist at 0xfff72e0c, args: 
 Locals at 0xfff72e0c, Previous frame's sp is 0xfff72e14
 Saved registers:
  ebx at 0xfff72e08, ebp at 0xfff72e0c, esi at 0xfff72e00, edi at 0xfff72e04, eip at 0xfff72e10
End of crash report
----------------------------------------------

For immediate assistance, please email our customer support: support@toptal.com
s1lentq commented 6 months ago

This is an amxmodx bug, not related to metamod-r. C_CvarValue2 callback does not check that player can be disconnected instantly. You should send a bug report in amxmodx

p.s As a temporary workaround, you can make a delayed kick in 0.1 secs

NiceFeatures commented 6 months ago

Reported, thanks.