Let me drop the big UPDATE here:
1). I am retarded.
2). I've been backtracing the old core dump from wrong mysql initiating (which was later resolved).
3). New backtracing look like this:
Code:
#0 0x080e983d in ?? ()
(gdb) bt
#0 0x080e983d in ?? ()
#1 0x0808f697 in ?? ()
#2 0x0808fa6f in ?? ()
#3 0x080943e1 in ?? ()
#4 0x08061779 in ?? ()
#5 0x08062451 in ?? ()
#6 0x0806251d in ?? ()
#7 0x080d2b22 in ?? ()
#8 0xb738aa83 in __libc_start_main (main=0x80d2990, argc=12, argv=0xbfd22604,
init=0x8049b90, fini=0x8139b50, rtld_fini=0xb7722180 <_dl_fini>,
stack_end=0xbfd225fc) at libc-start.c:287
#9 0x0804a4d1 in ?? ()
4). Thanks to Kung's lessons I've managed to check the code behind those addresess:
Behind #1 0x0808f697 in ?? () there is:
PHP Code:
int __cdecl sub_808F510(int a1, int a2, int a3)
{
int result; // eax@4
char v4; // [sp+4h] [bp-3D4h]@0
int v5; // [sp+14h] [bp-3C4h]@9
char *v6; // [sp+18h] [bp-3C0h]@9
char *v7; // [sp+1Ch] [bp-3BCh]@11
char v8[896]; // [sp+20h] [bp-3B8h]@11
char s; // [sp+3A0h] [bp-38h]@9
int v10; // [sp+3C4h] [bp-14h]@5
int v11; // [sp+3C8h] [bp-10h]@9
int i; // [sp+3CCh] [bp-Ch]@9
char v13[8]; // [sp+3D0h] [bp-8h]@25
if ( a3 )
*(_DWORD *)(a1 + 134408) = *(_DWORD *)(a1 + 133144);
else
*(_DWORD *)(a1 + 134408) = -1;
result = *(_DWORD *)(a1 + 133132) - *(_DWORD *)(a1 + 133136);
if ( result <= 127 )
{
v10 = sub_8067EE8(a2);
if ( v10 > 0 )
{
if ( v10 <= 32 )
{
v11 = dword_842BC8C;
v11 = *(_DWORD *)(a1 + 133144) ^ dword_842BC8C;
v11 ^= sub_80AA70C(a1 + 1032 * (*(_DWORD *)(a1 + 133136) & 0x7F) + 1036, 32);
v5 = sub_808FE02(-1653759219 * ((a1 - (signed int)dword_841FB0C) >> 2));
sub_80684E6(v5, &s);
v6 = &s;
for ( i = 0; i < v10; ++i )
{
v7 = &v8[28 * i];
sub_8068ADE(a2, v11, v6, v7);
if ( !(unsigned __int8)sub_80E97F0(v5, (unsigned __int8)v7[8]) )
v7[8] = *(_BYTE *)(v5 + 212);
if ( !(unsigned __int8)sub_80E97F0(v5, (unsigned __int8)v7[9]) )
v7[9] = *(_BYTE *)(v5 + 208);
v6 = v7;
}
*(_DWORD *)(a1 + 9924 * (*(_DWORD *)(a1 + 133144) & 0x1F) + 144352) = dword_841FB04;
if ( *(_DWORD *)a1 == 3 )
sub_808E1F0(a1, v8);
if ( !*(_BYTE *)(dword_848B200 + 8) || *(_DWORD *)(a1 + 452016) )
{
if ( *(_DWORD *)a1 == 4 )
{
for ( i = 0; ; ++i )
{
result = i;
if ( i >= v10 )
break;
if ( *(_DWORD *)&v13[28 * i - 944] <= *(_DWORD *)&v13[28 * v10 - 972]
&& *(_DWORD *)&v13[28 * i - 944] > *(_DWORD *)(a1 + 133156) )
{
sub_808F488(a1, &v8[28 * i]);
}
}
}
else
{
result = a1;
*(_DWORD *)(a1 + 134408) = -1;
}
}
else
{
result = sub_808DC8C(a1, "EXE_CANNOTVALIDATEPURECLIENT");
}
}
else
{
result = sub_8060B2C("cmdCount > MAX_PACKET_USERCMDS\n", v4);
}
}
else
{
result = sub_8060B2C("cmdCount < 1\n", v4);
}
}
return result;
}
5). Today on the server which partly uses my scripts I've noticed this:
http://i.imgur.com/HVVa5hn.jpg
It was spamming the hell out of the console.
6). thOuMta (server's admin) did not see it (only me).
7). To stop this spam I've used the cl_maxpackets "30" command. (this server had set 20 at default).
8). Kung foo man has pointed out the problem with "cmdCount > MAX_PACKET_USERCMDS".
Not sure what to do about it, Should I patch libcod with this? https://killtube.org/showthread.php?...tch-must-apply or just parse cl_maxpackets?
Or.. maybe as it was said in this thread https://killtube.org/showthread.php?...ACKET_USERCMDS I have "wait without ending on disconnect"
Could my self SearchForBan(); be treated as a wait and I should move it somewhere?
PHP Code:
SearchForBan()
{
if(!isDefined(self))
{
printf("\n Self wasn't defined :(");
return;
}
myIP = self getIP();
if(!isDefined(myIP))
{
printf("\n myIP wasnt defined! \n");
return;
}
printf("SELECT `ip`, `name`, `reason`, `whobanned` FROM `bans` WHERE `ip` = \"%\" LIMIT 1\n", myIP);
maps\mp\gametypes\_mysql::asyncQuery("SELECT `ip`, `name`, `reason`, `whobanned` FROM `bans` WHERE `ip` = \"" + myIP + "\" LIMIT 1", ::checkBan);
printf("SELECT `ip`, `name`, `reason`, `whobanned` FROM `bans` WHERE `ip` = \"%\" LIMIT 1\n", myIP);
}
checkBan(rows, args)
{
if(isDefined(rows) && isDefined(rows[0]) && isDefined(rows[0]["ip"]) && isDefined(self))
{
kickmsg = rows[0]["name"] + "^7, You're banned by " + rows[0]["whobanned"] + "^7, because of reason: " + rows[0]["reason"] + ". Check www.whiskaskitler.xyz to get unbanned :) " + ". You will need your IP: " + rows[0]["ip"];
kick2(self getEntityNumber(), kickmsg);
}
}
Callback_PlayerConnect()
{
thread dummy();
self.statusicon = "hud_status_connecting";
self waittill("begin");
self.statusicon = "";
level notify("connected", self);
if(!level.splitscreen)
iprintln(&"MP_CONNECTED", self);
lpselfnum = self getEntityNumber();
lpGuid = self getGuid();
logPrint("J;" + lpGuid + ";" + lpselfnum + ";" + self.name + "\n");
if(game["state"] == "intermission")
{
spawnIntermission();
return;
}
level endon("intermission");
self SearchForBan();
if(level.splitscreen)
scriptMainMenu = game["menu_ingame_spectator"];
else
scriptMainMenu = game["menu_ingame"];
if(isDefined(self.pers["team"]) && self.pers["team"] != "spectator")
{
self setClientCvar("ui_allow_weaponchange", "1");
if(self.pers["team"] == "allies")
self.sessionteam = "allies";
else
self.sessionteam = "axis";
if(isDefined(self.pers["weapon"]))
spawnPlayer();
else
{
spawnSpectator();
if(self.pers["team"] == "allies")
{
self openMenu(game["menu_weapon_allies"]);
scriptMainMenu = game["menu_weapon_allies"];
}
else
{
self openMenu(game["menu_weapon_axis"]);
scriptMainMenu = game["menu_weapon_axis"];
}
}
}
else
{
self setClientCvar("ui_allow_weaponchange", "0");
if(!isDefined(self.pers["skipserverinfo"]))
self openMenu(game["menu_team"]);
self.pers["team"] = "spectator";
self.sessionteam = "spectator";
spawnSpectator();
}
self setClientCvar("g_scriptMainMenu", scriptMainMenu);
}
Sorry for the long post. I've wanted to make it with as many details as (I thought) it needs.
Thank you.
Edit: used cl_maxpackets "20" on my server and also got spammed.