oscar-broman / samp-weapon-config

A more consistent and responsive damage system with many new features
Apache License 2.0
91 stars 84 forks source link

Server restarting #208

Closed PazzOnee closed 2 years ago

PazzOnee commented 3 years ago

When i use latest version of weapon-config.inc server do restarting and i got log in mysql log folder logs/log-core.log

[07/21/21 21:30:31] [ERROR] signal 11 (SIGSEGV) catched; shutting log-core down (errno: 0, signal code: 1, exit status: 0)

Bt6K commented 3 years ago

I can confirm this with the latest version of weapon-config. Nothing was logged to server_log.txt or the screen session that the samp03svr process was running in.

I enabled define WC_DEBUG_SILENT and here is all I see in the logs before the samp03svr process dies:

root@server:/home/server# tail -25 server_log.txt
23/07/2021 17:51:46 (wc:1) OnPlayerTakeDamage(1 took 46.200000 from 3 by 24 on bodypart 6)
23/07/2021 17:51:46 (wc:3) OnPlayerGiveDamage(3 gave 46.200000 to 1 using 24 on bodypart 9)
23/07/2021 17:51:46 OnPlayerGiveDamage(3 gave 46.200000 to 1 using 24 on bodypart 9)
23/07/2021 17:51:47 (wc:3) OnPlayerGiveDamage(3 gave 46.200000 to 1 using 24 on bodypart 5)
23/07/2021 17:51:48 [nick] Hassan_F nick changed to Hassan_F(1)
23/07/2021 17:51:48 [nick] Str8killa nick changed to Str8killa(3)
23/07/2021 17:51:48 [nick] Hassan_F(1) nick changed to Hassan_F
23/07/2021 17:51:48 [nick] Str8killa(3) nick changed to Str8killa
23/07/2021 17:51:51 [connection] incoming connection: 192.168.1.1:62813 id: 5
23/07/2021 17:51:52 [join] pitoo has joined the server (5:192.168.1.1)
23/07/2021 17:51:52 OnPlayerConnect(5)
23/07/2021 17:51:52 Player 5 reports client version: 0.3.7-R4
23/07/2021 17:51:52 Player 5 reports serial: 99F40ECCE84989DDA89FE554A8D58FACFCE99C4F
23/07/2021 17:51:52 OnUserDataLoad(5, 7, 3)
23/07/2021 17:51:52 5 200 0

23/07/2021 17:51:55 OnPlayerDisconnect(2)
23/07/2021 17:51:55 [part] Ismael_DIazz has left the server (2:1)
23/07/2021 17:52:01 (wc:5) Requested class: 0
23/07/2021 17:52:01 (wc:5) True death class selection
23/07/2021 17:52:06 (wc:5) Requested class: 1
23/07/2021 17:52:07 [Nex-AC debug] Veh model: 463, veh: 1831, dist: 38.308612, ispassenger: 0, playerid: 4
23/07/2021 17:52:20 (wc:1) OnPlayerGiveDamage(1 gave 41.250000 to 0 using 34 on bodypart 9)
23/07/2021 17:52:21 (wc:1) OnPlayerGiveDamage(1 gave 41.250000 to 0 using 34 on bodypart 9)
23/07/2021 17:52:21 OnPlayerGiveDamage(1 gave 41.250000 to 0 using 34 on bodypart 9)
root@server:/home/server#

@ADRFranklin Tagging @NexiusTailer too since I know he made a fair few commits recently...and it seems to be one of those that has caused this

ADRFranklin commented 3 years ago

Without some crashdetect logs showing the crash, there is not a lot here for me to go off and debug.

Bt6K commented 3 years ago

I see mention of SendLastSyncPacket. Maybe https://github.com/oscar-broman/samp-weapon-config/commit/4012a02ce149d414d64047064957b8ef4948dd6f caused this?

23/07/2021 18:38:49 [debug] Server crashed while executing server.amx
23/07/2021 18:38:49 [debug] AMX backtrace:
23/07/2021 18:38:49 [debug] #0 native SendLastSyncPacket () in SKY.so
23/07/2021 18:38:49 [debug] #1 000d5e18 in ?? (2) in server.amx
23/07/2021 18:38:49 [debug] #2 000d4dcc in ?? (2, 0) in server.amx
23/07/2021 18:38:49 [debug] #3 000da214 in ?? (2, 1092511334, 3, 31, 9, 0) in server.amx
23/07/2021 18:38:49 [debug] #4 000cf7f4 in public ac_OnPlayerGiveDamage (3, 2, 1092511334, 31, 9) in server.amx
23/07/2021 18:38:49 [debug] #5 00035914 in public OnPlayerGiveDamage (3, 2, 1092511335, 31, 9) in server.amx
23/07/2021 18:38:49 [debug] Native backtrace:
23/07/2021 18:38:49 [debug] #0 f6c3ef7f in _Z13GetStackTraceRSt6vectorI10StackFrameSaIS0_EEPv () in plugins/crashdetect.so
23/07/2021 18:38:49 [debug] #1 f6c3781d in _ZN11CrashDetect20PrintNativeBacktraceERSoRKN2os7ContextE () in plugins/crashdetect.so
23/07/2021 18:38:49 [debug] #2 f6c37e48 in _ZN11CrashDetect20PrintNativeBacktraceERKN2os7ContextE () in plugins/crashdetect.so
23/07/2021 18:38:49 [debug] #3 f6c395dc in _ZN11CrashDetect7OnCrashERKN2os7ContextE () in plugins/crashdetect.so
23/07/2021 18:38:49 [debug] #4 f6c3e79f in ?? () in plugins/crashdetect.so
23/07/2021 18:38:49 [debug] #5 f7f60b70 in __kernel_rt_sigreturn () in linux-gate.so.1
23/07/2021 18:38:49 [debug] #6 f67b429e in ?? () in plugins/SKY.so
23/07/2021 18:38:49 [debug] #7 f67bab6c in ?? () in plugins/SKY.so
23/07/2021 18:38:49 [debug] #8 f67b8d2f in ?? () in plugins/SKY.so
23/07/2021 18:38:49 [debug] #9 f67b8ebb in ?? () in plugins/SKY.so
23/07/2021 18:38:49 [debug] #10 080950e4 in ?? () in ./samp03svr
23/07/2021 18:38:49 [debug] #11 f6c3746f in _ZN11CrashDetect15ProcessCallbackEiPiS0_ () in plugins/crashdetect.so
23/07/2021 18:38:49 [debug] #12 f6c3cfeb in ?? () in plugins/crashdetect.so
23/07/2021 18:38:49 [debug] Registers:
23/07/2021 18:38:49 [debug] EAX: 00000000 EBX: 00000000 ECX: 00000006 EDX: fffd89cd
23/07/2021 18:38:49 [debug] ESI: 00000002 EDI: 00000038 EBP: fffd89bc ESP: fffd8900
23/07/2021 18:38:49 [debug] EIP: f67b429e EFLAGS: 00010293
23/07/2021 18:38:49 [debug] Stack:
23/07/2021 18:38:49 [debug] ESP+00000000: 00000009 098c83a0 fffd8978 00000800
23/07/2021 18:38:49 [debug] ESP+00000020: 00000009 00000002 f67b4189 f688f000
23/07/2021 18:38:49 [debug] ESP+00000040: fffd89bc 00000000 00000002 00000001
23/07/2021 18:38:49 [debug] ESP+00000060: 00d30000 00020001 0100072a 00000001
23/07/2021 18:38:49 [debug] ESP+00000080: f688f000 00000002 fffd8ae8 f67b8d2f
23/07/2021 18:38:49 [debug] ESP+000000a0: fffd89bc 00000000 00000003 00000000
23/07/2021 18:38:49 [debug] ESP+000000c0: 00000800 00000000 fffd89cd 0002d301
23/07/2021 18:38:49 [debug] ESP+000000e0: 00011a00 43dc0000 43b68000 00000000
23/07/2021 18:38:49 [debug] ESP+00000100: 001effff 7277656e 6e69626f 4d202d20
23/07/2021 18:38:49 [debug] ESP+00000120: ffff7e6e 00000000 00000008 ffffffff
23/07/2021 18:38:49 [debug] ESP+00000140: 352e3839 00000030 00000000 00000000
23/07/2021 18:38:49 [debug] ESP+00000160: 098be350 f7c25000 00000000 f7b80326
23/07/2021 18:38:49 [debug] ESP+00000180: 00000000 00000000 00800000 fffd8ac0
23/07/2021 18:38:49 [debug] ESP+000001a0: 09e49b30 fffd8ac0 fffd8b08 080e4dd6
23/07/2021 18:38:49 [debug] ESP+000001c0: 7277656e 6e69626f 4d202d20 00000b7f
23/07/2021 18:38:49 [debug] ESP+000001e0: 00000f68 09b8ea40 fffd8b38 f67b8ebb
23/07/2021 18:38:49 [debug] ESP+00000200: f67b8e57 f3ff9010 00000f68 080950e4
23/07/2021 18:38:49 [debug] ESP+00000220: 000d5e18 00000000 f67b8e50 f6c67000
23/07/2021 18:38:49 [debug] ESP+00000240: 09b8ea40 00000117 fffd8cdc f5b3963c
23/07/2021 18:38:49 [debug] ESP+00000260: ffffffec 098b25c0 00000000 fffd8b94
23/07/2021 18:38:49 [debug] ESP+00000280: 09b8ea40 00000000 01a4e2b0 000d5e18
23/07/2021 18:38:49 [debug] ESP+000002a0: 000d5db8 00000035 fffd8be4 098ba568
23/07/2021 18:38:49 [debug] ESP+000002c0: f66b9d8c fffd8c1c 0000cd75 f7f27000
23/07/2021 18:38:49 [debug] ESP+000002e0: 5b000000 0005abfa 567023b0 0006617e
23/07/2021 18:38:49 [debug] ESP+00000300: f6c67000 09bc4200 f3ff9010 f6c368e1
23/07/2021 18:38:49 [debug] ESP+00000320: 00000000 fffd8c7c 09dd8ac0 cdb50e00
23/07/2021 18:38:49 [debug] ESP+00000340: 00000000 f7f8d040 f7f8d544 fffd8cb4
23/07/2021 18:38:49 [debug] ESP+00000360: f6c67890 f3ff9010 01a4e298 f6c3cfeb
23/07/2021 18:38:49 [debug] ESP+00000380: f6c3cf87 f40d3e34 09b8ea40 f6c41e89
23/07/2021 18:38:49 [debug] ESP+000003a0: 01a4a460 01a4e2b0 f3ffe020 01a4e2a0
23/07/2021 18:38:49 [debug] ESP+000003c0: 000ed384 000d5e18 f40d7158 f6c36f55
23/07/2021 18:38:49 [debug] ESP+000003e0: 00000000 00000058 3cf34eb6 f6c67000
23/07/2021 18:38:49 [debug] Loaded modules:
23/07/2021 18:38:49 [debug] 00000000 - 00187f43 samp03svr
23/07/2021 18:38:49 [debug] f7f60000 - f7f60d2c linux-gate.so.1
23/07/2021 18:38:49 [debug] f7f4e000 - f7f50eec /lib32/libdl.so.2
23/07/2021 18:38:49 [debug] f7f2b000 - f7f4b463 /lib32/libpthread.so.0
23/07/2021 18:38:49 [debug] f7d4c000 - f7f36f2a /lib32/libstdc++.so.6
23/07/2021 18:38:49 [debug] f7c48000 - f7d4b6ec /lib32/libm.so.6
23/07/2021 18:38:49 [debug] f7c29000 - f7c459cc /lib32/libgcc_s.so.1
23/07/2021 18:38:49 [debug] f7a3e000 - f7c2f0b3 /lib32/libc.so.6
23/07/2021 18:38:49 [debug] f7f61000 - f7f8bf9b /lib/ld-linux.so.2
23/07/2021 18:38:49 [debug] f7698000 - f7a40ac7 plugins/mysql_static.so
23/07/2021 18:38:49 [debug] f768d000 - f76953b3 /lib32/librt.so.1
23/07/2021 18:38:49 [debug] f6c79000 - f6c8b268 /lib32/libnss_files.so.2
23/07/2021 18:38:49 [debug] f6c68000 - f6c779b4 plugins/sscanf.so
23/07/2021 18:38:49 [debug] f7f57000 - f7f5a310 plugins/CTime.so
23/07/2021 18:38:49 [debug] f6761000 - f6908168 plugins/SKY.so
23/07/2021 18:38:49 [debug] f6c1f000 - f6c673d4 plugins/crashdetect.so
23/07/2021 18:38:49 [debug] f668e000 - f6762b05 plugins/streamer.so
23/07/2021 18:38:49 [debug] f6559000 - f66927d8 plugins/pawnraknet.so
NexiusTailer commented 3 years ago

Try to test with and without this single change. I hope the problem is in something else, but anyway this can be quickly reverted if your doubt is confirmed. At the moment, it hasn't been tested enough on a large player base, unfortunately.

Bt6K commented 3 years ago

I reverted just that single change and the server hasn't crashed. Before, it would crash within 15 minutes of starting up. We're at 10 hours of uptime now, so it was certainly that commit it seems.

NexiusTailer commented 3 years ago

@ADRFranklin do you see any noticeable problems on the plugin side that can be fixed there, or will you have to revert commit 4012a02?

Bt6K commented 3 years ago

Any movement on this case? I would say at the very least https://github.com/oscar-broman/samp-weapon-config/commit/4012a02ce149d414d64047064957b8ef4948dd6f needs reverting for now until time can be devoted to investigate in more detail, as in its current state this include is pretty much unusable unless one manually rolls back that commit.