Zeex / samp-plugin-profiler

Performance profiler plugin for SA-MP server
http://forum.sa-mp.com/showthread.php?t=271129
BSD 2-Clause "Simplified" License
46 stars 8 forks source link

Profiler crashes on server start #25

Closed DerShoxy closed 6 years ago

DerShoxy commented 6 years ago

The server is crashing on start up when profiler.so is loaded.

Server log

[00:56:25] [debug] Server crashed due to an unknown error [00:56:25] [debug] Native backtrace: [00:56:25] [debug] #0 f72d3180 in _Z13GetStackTraceRSt6vectorI10StackFrameSaIS0_EEPv () from plugins/crashdetect.so [00:56:25] [debug] #1 f72cb064 in _ZN11CrashDetect20PrintNativeBacktraceERSoRKN2os7ContextE () from plugins/crashdetect.so [00:56:25] [debug] #2 f72cbd64 in _ZN11CrashDetect20PrintNativeBacktraceERKN2os7ContextE () from plugins/crashdetect.so [00:56:25] [debug] #3 f72cdcdb in _ZN11CrashDetect7OnCrashERKN2os7ContextE () from plugins/crashdetect.so [00:56:25] [debug] #4 f72d24d5 in ?? () from plugins/crashdetect.so [00:56:25] [debug] #5 f7782ba0 in kernel_rt_sigreturn () from linux-gate.so.1 [00:56:25] [debug] #6 f7782bb9 in kernel_vsyscall () from linux-gate.so.1 [00:56:25] [debug] #7 f747c367 in gsignal () from /lib/i386-linux-gnu/i686/cmov/libc.so.6 [00:56:25] [debug] #8 f747da23 in abort () from /lib/i386-linux-gnu/i686/cmov/libc.so.6 [00:56:25] [debug] #9 f74756c7 in ?? () from /lib/i386-linux-gnu/i686/cmov/libc.so.6 [00:56:25] [debug] #10 f7475777 in ?? () from /lib/i386-linux-gnu/i686/cmov/libc.so.6 [00:56:25] [debug] #11 08098558 in ?? () from ./samp03svr [00:56:25] [debug] #12 f442e312 in amx_Init () from plugins/profiler.so [00:56:25] [debug] #13 f442c38c in _ZNK13AmxPathFinder11FindAmxPathEP13tagAMX_HEADER () from plugins/profiler.so [00:56:25] [debug] #14 f442c9a4 in _ZNK13AmxPathFinder11FindAmxPathEP6tagAMX () from plugins/profiler.so [00:56:25] [debug] #15 f44314e8 in _ZN8ProfilerC2EP6tagAMX () from plugins/profiler.so [00:56:25] [debug] #16 f442ee0c in _ZN10AMXServiceI8ProfilerE14CreateInstanceEP6tagAMX () from plugins/profiler.so [00:56:25] [debug] #17 f442f23b in AmxLoad () from plugins/profiler.so [00:56:25] [debug] #18 080a1261 in ?? () from ./samp03svr [00:56:25] [debug] #19 080ab601 in ?? () from ./samp03svr [00:56:25] [debug] #20 080aba0b in ?? () from ./samp03svr [00:56:25] [debug] #21 080aa0fd in ?? () from ./samp03svr [00:56:25] [debug] #22 f7467a63 in __libc_start_main () from /lib/i386-linux-gnu/i686/cmov/libc.so.6 [00:56:25] [debug] Registers: [00:56:25] [debug] EAX: 00000000 EBX: 000074de ECX: 000074de EDX: 00000006 [00:56:25] [debug] ESI: f710c000 EDI: f75f7000 EBP: ff911118 ESP: ff910d04 [00:56:25] [debug] EIP: f7782bb9 EFLAGS: 00200206 [00:56:25] [debug] Stack: [00:56:25] [debug] ESP+00000000: ff911118 00000006 000074de f747c367 [00:56:25] [debug] ESP+00000020: ff910d34 00000000 33303850 ff910d70 [00:56:25] [debug] ESP+00000040: 00000000 00000000 00000000 00000000 [00:56:25] [debug] ESP+00000060: 00000000 00000000 00000000 00000000 [00:56:25] [debug] ESP+00000080: 00000000 00000000 00000000 00000000 [00:56:25] [debug] ESP+000000a0: 00000000 00000000 00000000 00000000 [00:56:25] [debug] ESP+000000c0: f75f8144 ffffffff 00000000 00000043 [00:56:25] [debug] ESP+000000e0: ff910e08 ff910e00 08049bfb 00000004 [00:56:25] [debug] ESP+00000100: 08158538 f75f7420 f74bb0fe f75f7960 [00:56:25] [debug] ESP+00000120: f75f7000 f75f7960 00000000 00000003 [00:56:25] [debug] ESP+00000140: f75f7000 08158538 f74756c7 00000000 [00:56:25] [debug] ESP+00000160: 00000000 0815806d f75ad592 08158538 [00:56:25] [debug] ESP+00000180: 00000005 0ac21370 00001000 f75f7000 [00:56:25] [debug] ESP+000001a0: 08158538 0815836d 00000323 0815806d [00:56:25] [debug] ESP+000001c0: f7475726 007b5e85 08098558 08158538 [00:56:25] [debug] ESP+000001e0: f778beb7 00000006 00000040 00000015 [00:56:25] [debug] ESP+00000200: 00000000 007b5dd4 00000000 007b5dd0 [00:56:25] [debug] ESP+00000220: 00000000 007b5dc4 00000000 007b5dc0 [00:56:25] [debug] ESP+00000240: 00000000 007b5db4 00000000 007b5db0 [00:56:25] [debug] ESP+00000260: 00000000 007b5da4 00000000 007b5da0 [00:56:25] [debug] ESP+00000280: 00000000 007b5d94 00000000 007b5d90 [00:56:25] [debug] ESP+000002a0: 00000000 007b5e84 00000000 007b5e80 [00:56:25] [debug] ESP+000002c0: 00000000 007b5e74 00000000 007b5e70 [00:56:25] [debug] ESP+000002e0: 00000000 007b5e64 00000000 007b5e60 [00:56:25] [debug] ESP+00000300: 00000000 007b5e54 00000000 007b5e50 [00:56:25] [debug] ESP+00000320: 00000000 007b5e44 00000000 007b5e40 [00:56:25] [debug] ESP+00000340: 00000000 007b5e34 00000000 007b5e30 [00:56:25] [debug] ESP+00000360: 00000000 007b5e24 00000000 007b5e20 [00:56:25] [debug] ESP+00000380: 00000000 007b5e14 00000000 007b5e10 [00:56:25] [debug] ESP+000003a0: 00000000 007b5e04 00000000 007b5e00 [00:56:25] [debug] ESP+000003c0: 00000000 007b5df4 00000000 007b5df0 [00:56:25] [debug] ESP+000003e0: 00000000 007b5de4 00000000 007b5de0 [00:56:25] [debug] Loaded modules: [00:56:25] [debug] 00000000 - 00187dc3 samp03svr [00:56:25] [debug] f7782000 - f7782d0b linux-gate.so.1 [00:56:25] [debug] f776d000 - f776f81b /lib/i386-linux-gnu/i686/cmov/libdl.so.2 [00:56:25] [debug] f7751000 - f776bd2b /lib/i386-linux-gnu/i686/cmov/libpthread.so.0 [00:56:25] [debug] f765e000 - f7757cda /usr/lib/i386-linux-gnu/libstdc++.so.6 [00:56:25] [debug] f7618000 - f765cb43 /lib/i386-linux-gnu/i686/cmov/libm.so.6 [00:56:25] [debug] f75fb000 - f76173c4 /lib/i386-linux-gnu/libgcc_s.so.1 [00:56:25] [debug] f744e000 - f760322f /lib/i386-linux-gnu/i686/cmov/libc.so.6 [00:56:25] [debug] f7783000 - f77a3d6c /lib/ld-linux.so.2 [00:56:25] [debug] f72f9000 - f7453ee0 plugins/sampcac_server.so [00:56:25] [debug] f72b5000 - f72f7ac4 plugins/crashdetect.so [00:56:25] [debug] f720f000 - f72b514c plugins/streamer.so [00:56:25] [debug] f7773000 - f777a09f /lib/i386-linux-gnu/i686/cmov/librt.so.1 [00:56:25] [debug] f7116000 - f720ee58 plugins/mysqlR32_x64.so [00:56:25] [debug] f6f20000 - f7109ee4 /usr/lib32/libmysqlclient_r.so.15 [00:56:25] [debug] f6eef000 - f6f1e64f /lib/i386-linux-gnu/i686/cmov/libcrypt.so.1 [00:56:25] [debug] f6ed6000 - f6eee1a7 /lib/i386-linux-gnu/i686/cmov/libnsl.so.1 [00:56:25] [debug] f6eb9000 - f6ed4d4c /lib/i386-linux-gnu/libz.so.1 [00:56:25] [debug] f6eac000 - f6eb73ef /lib/i386-linux-gnu/i686/cmov/libnss_files.so.2 [00:56:25] [debug] f44b5000 - f44fe673 plugins/FCNPC.so [00:56:25] [debug] f7111000 - f711408c plugins/MapAndreas.so [00:56:25] [debug] f710d000 - f71102cc plugins/merrandom.so [00:56:25] [debug] f4458000 - f44b48e8 plugins/CVector.so [00:56:25] [debug] f3a9a000 - f3afee6e plugins/regex.so [00:56:25] [debug] f4448000 - f4456f7c plugins/sscanf.so [00:56:25] [debug] f3852000 - f38ffc5b plugins/YSF.so [00:56:25] [debug] f441e000 - f4447cbc plugins/profiler.so

Environment

CPU(s) 8 x Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz (1 Socket) 64GB RAM 2x 250GB Samsung SSD Debian 8 Jessie 64 bit

Zeex commented 6 years ago

It looks like some AMX file in your gamemodes or filterscripts folder (or AMX_PATH) is corrupted. There is this dumb search procedure where profiler tries to load all AMX files one by one and compares their headers in order to find the currently loaded AMX file (which was loaded by the server). This is used to get its filename and load debug info from it.

One solution is to find which AMX file is corrupted and remove it. You can do this by first removing all unused scripts, and then removing all other scripts one by one until it starts working. The damanged script probably just needs to be recompiled. If recompiling doesn't help then it could be some other bug (e..g invalid bytecode). In that case it should fail to work without the profiler.

DerShoxy commented 6 years ago

Thanks for your answer, the reason was an old corrupted gamemode file in the gamemodes folder!