pBlueG / SA-MP-MySQL

MySQL plugin for San Andreas Multiplayer
BSD 3-Clause "New" or "Revised" License
198 stars 79 forks source link

R41-2 (Debian Static) #135

Closed ghost closed 7 years ago

ghost commented 7 years ago

How does one fix this issue?

[OnGameModeInit] Initialising 'Main'...
[07:11:55] [debug] Server crashed while executing <unknown>
[07:11:55] [debug] AMX backtrace:
[07:11:55] [debug] #0 native mysql_connect () from mysql.so
[07:11:55] [debug] #1 000b80fc in ?? () from <unknown>
[07:11:55] [debug] #2 0003cf1c in public ScriptInit_OnGameModeInit () from <unknown>
[07:11:55] [debug] #3 0000c0f4 in public FIXES_OnGameModeInit () from <unknown>
[07:11:55] [debug] #4 00004350 in public ScriptInit_OnGameModeInit () from <unknown>
[07:11:55] [debug] Native backtrace:
[07:11:55] [debug] #0 e609fca0 in _Z13GetStackTraceRSt6vectorI10StackFrameSaIS0_EEPv () from plugins/crashdetect.so
[07:11:55] [debug] #1 e6098d22 in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so
[07:11:55] [debug] #2 e6099314 in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so
[07:11:55] [debug] #3 e609b964 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so
[07:11:55] [debug] #4 e609f5cd in ?? () from plugins/crashdetect.so
[07:11:55] [debug] #5 e640e410 in ?? ()
[07:11:55] [debug] #6 e640e430 in ?? ()
[07:11:55] [debug] #7 e60f6687 in gsignal () from /lib/i386-linux-gnu/libc.so.6
[07:11:55] [debug] #8 e60f9ab3 in abort () from /lib/i386-linux-gnu/libc.so.6
[07:11:55] [debug] #9 e632fd6f in _ZN9__gnu_cxx27__verbose_terminate_handlerEv () from /usr/lib/i386-linux-gnu/libstdc++.so.6
[07:11:55] [debug] #10 e632d924 in ?? () from /usr/lib/i386-linux-gnu/libstdc++.so.6
[07:11:55] [debug] #11 e632d99d in ?? () from /usr/lib/i386-linux-gnu/libstdc++.so.6
[07:11:55] [debug] #12 e632dc51 in ?? () from /usr/lib/i386-linux-gnu/libstdc++.so.6
[07:11:55] [debug] #13 e6354203 in _ZSt20__throw_system_errori () from /usr/lib/i386-linux-gnu/libstdc++.so.6
[07:11:55] [debug] #14 e63569db in ?? () from /usr/lib/i386-linux-gnu/libstdc++.so.6
[07:11:55] [debug] #15 e6356a30 in _ZNSt6thread15_M_start_threadESt10shared_ptrINS_10_Impl_baseEE () from /usr/lib/i386-linux-gnu/libstdc++.so.6
[07:11:55] [debug] #16 e5d21462 in ?? () from plugins/mysql.so
[07:11:55] [debug] #17 e5d25737 in ?? () from plugins/mysql.so
[07:11:55] [debug] #18 e5d437cd in ?? () from plugins/mysql.so
[07:11:55] [debug] #19 080950e4 in ?? () from ./samp03svr
[07:11:55] [debug] #20 e609a7b3 in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[07:11:55] [debug] #21 09e76838 in ?? () from ¬ð=æàî=æŒ4©äŒ4©ä8©äŒ4©ä6:©äŒ<©ä´'>æ

My server won't start now after updating the plugin too it.

maddinat0r commented 7 years ago

Can you share your server.cfg? Did you also replace all files correctly when updating? Try re-downloading the package and make sure you (re)place your files correctly as shown by the layout in the package.

ghost commented 7 years ago

Sure:

echo Executing Server Config...
lanmode 0
maxplayers 30
hostname Test Server
gamemode0 Main 1
filterscripts 
announce 0
query 1
weburl www.sa-mp.com
maxnpc 
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300
stream_rate 1000
plugins crashdetect.so mysql.so sscanf.so streamer.so Whirlpool.so

I redownloaded the Debian one like three times, and replaced it. Still an issue.

maddinat0r commented 7 years ago

Try enabling debug logging, start your server, wait until it crashes and post the generated mysql.log here.

ghost commented 7 years ago

And how do I do that?

ghost commented 7 years ago

Here is the same error, re-placed the plugins etc.

[OnGameModeInit] Initialising 'Main'...
[11:27:38] [debug] Server crashed while executing <unknown>
[11:27:38] [debug] AMX backtrace:
[11:27:38] [debug] #0 native mysql_connect () from mysql.so
[11:27:38] [debug] #1 000b80fc in ?? () from <unknown>
[11:27:38] [debug] #2 0003cf1c in public ScriptInit_OnGameModeInit () from <unknown>
[11:27:38] [debug] #3 0000c0f4 in public FIXES_OnGameModeInit () from <unknown>
[11:27:38] [debug] #4 00004350 in public ScriptInit_OnGameModeInit () from <unknown>
[11:27:38] [debug] Native backtrace:
[11:27:38] [debug] #0 e3ee9ca0 in _Z13GetStackTraceRSt6vectorI10StackFrameSaIS0_EEPv () from plugins/crashdetect.so
[11:27:38] [debug] #1 e3ee2d22 in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so
[11:27:38] [debug] #2 e3ee3314 in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so
[11:27:38] [debug] #3 e3ee5964 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so
[11:27:38] [debug] #4 e3ee95cd in ?? () from plugins/crashdetect.so
[11:27:38] [debug] #5 e4258410 in ?? ()
[11:27:38] [debug] #6 e4258430 in ?? ()
[11:27:38] [debug] #7 e3f40687 in gsignal () from /lib/i386-linux-gnu/libc.so.6
[11:27:38] [debug] #8 e3f43ab3 in abort () from /lib/i386-linux-gnu/libc.so.6
[11:27:38] [debug] #9 e4179d6f in _ZN9__gnu_cxx27__verbose_terminate_handlerEv () from /usr/lib/i386-linux-gnu/libstdc++.so.6
[11:27:38] [debug] #10 e4177924 in ?? () from /usr/lib/i386-linux-gnu/libstdc++.so.6
[11:27:38] [debug] #11 e417799d in ?? () from /usr/lib/i386-linux-gnu/libstdc++.so.6
[11:27:38] [debug] #12 e4177c51 in ?? () from /usr/lib/i386-linux-gnu/libstdc++.so.6
[11:27:38] [debug] #13 e419e203 in _ZSt20__throw_system_errori () from /usr/lib/i386-linux-gnu/libstdc++.so.6
[11:27:38] [debug] #14 e41a09db in ?? () from /usr/lib/i386-linux-gnu/libstdc++.so.6
[11:27:38] [debug] #15 e41a0a30 in _ZNSt6thread15_M_start_threadESt10shared_ptrINS_10_Impl_baseEE () from /usr/lib/i386-linux-gnu/libstdc++.so.6
[11:27:38] [debug] #16 e3b6b462 in ?? () from plugins/mysql.so
[11:27:38] [debug] #17 e3b6f737 in ?? () from plugins/mysql.so
[11:27:38] [debug] #18 e3b8d7cd in ?? () from plugins/mysql.so
[11:27:38] [debug] #19 080950e4 in ?? () from ./samp03svr
[11:27:38] [debug] #20 e3ee47b3 in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[11:27:38] [debug] #21 0be3c648 in ?? () from ¬"äàŽ"äŒ4™âŒ4™â8™âŒ4™â6:™âŒ<™â´Ç"ä

errors.log

[12/09/16 11:27:38] [log-core] signal 6 (SIGABRT) catched; shutting log-core down (errno: 0, signal code: -6, exit status: 0)

log-core.log

[12/09/16 11:27:38] [ERROR] signal 6 (SIGABRT) catched; shutting log-core down (errno: 0, signal code: -6, exit status: 0)
ghost commented 7 years ago

Update: https://github.com/Misiur/YSI-Includes/issues/134#issuecomment-266074451 - As well debugged:

[12/09/16 12:15:44] [DEBUG] mysql_connect("localhost", "f14021_gamezz", "*****", "f14021_gamezz", 1) (Game.pwn:366 -> Game.pwn:39 -> include\YSI\..\YSI_Coding\..\YSI_Core\..\YSI_Internal\..\YSI_Server\y_scriptinit.inc:184 -> include\fixes.inc:3279)
[12/09/16 12:15:44] [DEBUG] CHandleManager::Create(this=0xe3873830, host='localhost', user='f14021_gamez', pass='****', db='f14021_gamez', options=0xe38734f0)
[12/09/16 12:15:44] [DEBUG] CConnection::CConnection(this=0xe38738f0, host='localhost', user='f14021_gamez', passw='****', db='f14021_gamez', options=0xe38734f0)
[12/09/16 12:15:44] [DEBUG] CConnection::CConnection - new connection = 0xe3873b50
[12/09/16 12:15:44] [DEBUG] CConnection::CConnection(this=0xe1a39008, host='localhost', user='f14021_gamez', passw='****', db='f14021_gamez', options=0xe38734f0)
[12/09/16 12:15:44] [DEBUG] CConnection::CConnection - new connection = 0xe388c0c0

Line 366 is:

g_SQL = mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DATABASE, options);
maddinat0r commented 7 years ago

Do you get that crash when you revert back to R41 and/or R40?

ghost commented 7 years ago

R41:

[12/10/16 17:28:55] [DEBUG] mysql_connect("localhost", "f14021_gamez", "*****", "f14021_gamez", 1) (Game.pwn:366)
[12/10/16 17:28:55] [DEBUG] CHandleManager::Create(this=0xdde736f8, host='localhost', user='f14021_gamez', pass='****', db='f14021_gamez', options=0xdde73330)
[12/10/16 17:28:55] [DEBUG] CConnection::CConnection(this=0xdde73770, host='localhost', user='f14021_gamez', passw='****', db='f14021_gamez', options=0xdde73330)
[12/10/16 17:28:55] [DEBUG] CConnection::CConnection - new connection = 0xdde739f8
[12/10/16 17:28:55] [DEBUG] CConnection::CConnection(this=0xdc111008, host='localhost', user='f14021_gamez', passw='****', db='f14021_gamez', options=0xdde73330)
[12/10/16 17:28:55] [DEBUG] CConnection::CConnection - new connection = 0xdde8bf68

R40:

[OnGameModeInit] Initialising 'Main'...
[17:34:06] [debug] Server crashed while executing <unknown>
[17:34:06] [debug] AMX backtrace:
[17:34:06] [debug] #0 native mysql_connect () from mysql.so
[17:34:06] [debug] #1 000b812c in ?? () from <unknown>
[17:34:06] [debug] #2 0003cf24 in public ScriptInit_OnGameModeInit () from <unknown>
[17:34:06] [debug] #3 0000c0fc in public FIXES_OnGameModeInit () from <unknown>
[17:34:06] [debug] #4 00004358 in public ScriptInit_OnGameModeInit () from <unknown>
[17:34:06] [debug] Native backtrace:
[17:34:06] [debug] #0 e4400ca0 in _Z13GetStackTraceRSt6vectorI10StackFrameSaIS0_EEPv () from plugins/crashdetect.so
[17:34:06] [debug] #1 e43f9d22 in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so
[17:34:06] [debug] #2 e43fa314 in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so
[17:34:06] [debug] #3 e43fc964 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so
[17:34:06] [debug] #4 e44005cd in ?? () from plugins/crashdetect.so
[17:34:06] [debug] #5 e476f410 in ?? ()
[17:34:06] [debug] #6 e476f430 in ?? ()
[17:34:06] [debug] #7 e4457687 in gsignal () from /lib/i386-linux-gnu/libc.so.6
[17:34:06] [debug] #8 e445aab3 in abort () from /lib/i386-linux-gnu/libc.so.6
[17:34:06] [debug] #9 e4690d6f in _ZN9__gnu_cxx27__verbose_terminate_handlerEv () from /usr/lib/i386-linux-gnu/libstdc++.so.6
[17:34:06] [debug] #10 e468e924 in ?? () from /usr/lib/i386-linux-gnu/libstdc++.so.6
[17:34:06] [debug] #11 e468e99d in ?? () from /usr/lib/i386-linux-gnu/libstdc++.so.6
[17:34:06] [debug] #12 e468ec51 in ?? () from /usr/lib/i386-linux-gnu/libstdc++.so.6
[17:34:06] [debug] #13 e46b5203 in _ZSt20__throw_system_errori () from /usr/lib/i386-linux-gnu/libstdc++.so.6
[17:34:06] [debug] #14 e46b79db in ?? () from /usr/lib/i386-linux-gnu/libstdc++.so.6
[17:34:06] [debug] #15 e46b7a30 in _ZNSt6thread15_M_start_threadESt10shared_ptrINS_10_Impl_baseEE () from /usr/lib/i386-linux-gnu/libstdc++.so.6
[17:34:06] [debug] #16 e43a47ee in ?? () from plugins/mysql.so
[17:34:06] [debug] #17 e43a9451 in ?? () from plugins/mysql.so
[17:34:06] [debug] #18 e43c1f3d in ?? () from plugins/mysql.so
[17:34:06] [debug] #19 080950e4 in ?? () from ./samp03svr
[17:34:06] [debug] #20 e43fb7b3 in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[17:34:06] [debug] #21 0b6fa6f8 in ?? () from ¬

Nothing about mysql.log in the logs folder. However in log-core.log

[12/09/16 12:15:44] [ERROR] signal 6 (SIGABRT) catched; shutting log-core down (errno: 0, signal code: -6, exit status: 0)
[12/09/16 12:21:55] [ERROR] signal 6 (SIGABRT) catched; shutting log-core down (errno: 0, signal code: -6, exit status: 0)
[12/10/16 17:28:55] [ERROR] signal 6 (SIGABRT) catched; shutting log-core down (errno: 0, signal code: -6, exit status: 0)
[12/10/16 17:32:24] [ERROR] signal 6 (SIGABRT) catched; shutting log-core down (errno: 0, signal code: -6, exit status: 0)
maddinat0r commented 7 years ago

Which Linux distribution + version are you using? Does the server hardware your SA-MP server runs on only has one core available?

ghost commented 7 years ago

I'm using a server from frag.gs, and they said they're using Ubuntu when I asked and to use the Debian version.

SysadminJeroen commented 7 years ago

@xFirez Any specific version?

ghost commented 7 years ago

@Jeroen52 Sorry, I updated my message, no they didn't say what version just Ubuntu and to use the Debian version.

SysadminJeroen commented 7 years ago

Could you look for a second time at the comment? I think you might have edited it incorrectly. And about versions, are you using Ubuntu 16.10, Debian 8.5, or something else?

ghost commented 7 years ago

@Jeroen52 Like I said I don't know what "version" of Ubuntu it is. The support person told me to use the Debian one. I tried CentOS, other Debian version and I get the same error. Maybe it's 16.04 or 16.10, not sure what version of Ubuntu they're running. I will try and ask...

Spoookymon commented 7 years ago

MySQL R40 and + is incompatible with with most samp server hostings i know. They dont want to update server OS because it can F** UP other samp server plugins.

maddinat0r commented 7 years ago

I've talked with @xFirez through PM's on the official SA-MP forum, and the issue seems to be the host (quoting a PM I wrote):

Okay, so the problem is very likely somewhere within the host. The plugin crashes upon creating a thread. Thread creation gives a "Resource temporarily unavailable" exception, which is a system error. So simply said you hit the hardware limits of your host (which is kind of ridiculous for a measly SA-MP server).