PDA

View Full Version : CSPForward random crashes


DimonBP
03-23-2015, 09:38
Good day everyone!

After updating AMX Mod X to the latest dev version, some crashes ocurred.

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `./hlds_linux -noipx -tos -game cstrike -port 27015 -maxplayers 20'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0xf31273aa in CSPForward::execute(int*, ForwardPreparedArray*) () from /usr/local/users/dimonbp/csclassic/cstrike/addons/amxmodx/sos/amxmodx.so
#0 0xf31273aa in CSPForward::execute(int*, ForwardPreparedArray*) () from /usr/local/users/dimonbp/csclassic/cstrike/addons/amxmodx/sos/amxmodx.so
No symbol table info available.

I can provide more information if necessary. Thank you. :)

Arkshine
03-23-2015, 15:01
Yes; this needs more information.

Were you using before 1.8.2 or 1.8.3-dev? If latter, what build?
When does it crashes? Is it reproducible?
Did you try to debug it (like disabling third-party plugins until it doesn't crash)?
What is output of: amxx modules and amxx list, and amxx version?

DimonBP
03-23-2015, 18:01
amxx modules:


Currently loaded modules:
name version author status
[ 1] MySQL 1.8.3-dev+ AMX Mod X Dev Team running
[ 2] Engine 1.8.3-dev+ AMX Mod X Dev Team running
[ 3] FakeMeta 1.8.3-dev+ AMX Mod X Dev Team running
[ 4] Fun 1.8.3-dev+ AMX Mod X Dev Team running
[ 5] CStrike 1.8.3-dev+ AMX Mod X Dev Team running
[ 6] CSX 1.8.3-dev+ AMX Mod X Dev Team running
[ 7] Ham Sandwich 1.8.3-dev+ AMX Mod X Dev Team running
[ 8] Admin Free Look 1.5.4 Arkshine running


amxx list
[ 1] AMXBans Core 6.13 YamiKaitou amxbans_core.am running
[ 2] AMXBans Main 6.13 YamiKaitou amxbans_main.am running
[ 3] Admin Commands 1.8.3-dev+ AMXX Dev Team admincmd.amxx running
[ 4] Admin: ESP Mini 1.3m KoST admin_esp_mini. running
[ 5] AMXX Gag 1.4.9 xPaw & Exolent amx_gag.amxx running
[ 6] Admin Help 1.8.3-dev+ AMXX Dev Team adminhelp.amxx running
[ 7] Multi-Lingual System 1.8.3-dev+ AMXX Dev Team multilingual.am running
[ 8] Map autorestart 1.0 DimonBP server_autorest running
[ 9] Auto Demo Recorder 1.5 IzI amx_demrecorder running
[ 10] Reset Score 1.0 Silenttt resetscore.amxx running
[ 11] Server: Calladmin 1.1 DimonBP server_calladmi running
[ 12] Menus Front-End 1.8.3-dev+ AMXX Dev Team menufront.amxx running
[ 13] Commands Menu 1.8.3-dev+ AMXX Dev Team cmdmenu.amxx running
[ 14] Players Menu 1.8.3-dev+ AMXX Dev Team plmenu.amxx running
[ 15] Teleport Menu 1.8.3-dev+ AMXX Dev Team telemenu.amxx running
[ 16] Maps Menu 1.8.3-dev+ AMXX Dev Team mapsmenu.amxx running
[ 17] Plugin Menu 1.8.3-dev+ AMXX Dev Team pluginmenu.amxx running
[ 18] Admin Chat 1.8.3-dev+ AMXX Dev Team adminchat.amxx running
[ 19] Anti Flood 1.8.3-dev+ AMXX Dev Team antiflood.amxx running
[ 20] Scrolling Message 1.8.3-dev+ AMXX Dev Team scrollmsg.amxx running
[ 21] Info. Messages 1.8.3-dev+ AMXX Dev Team imessage.amxx running
[ 22] Admin Votes 1.8.3-dev+ AMXX Dev Team adminvote.amxx running
[ 23] Galileo 1.1.290 Brad Jones galileo.amxx running
[ 24] TimeLeft 1.8.3-dev+ AMXX Dev Team timeleft.amxx running
[ 25] Pause Plugins 1.8.3-dev+ AMXX Dev Team pausecfg.amxx running
[ 26] Stats Configuration 1.8.3-dev+ AMXX Dev Team statscfg.amxx running
[ 27] Restrict Weapons 1.8.3-dev+ AMXX Dev Team restmenu.amxx running
[ 28] HLstatsX CE Ingame Plu 1.6.19 psychonic hlstatsx_comman running
[ 29] StatsX 1.8.3-dev+ AMXX Dev Team statsx.amxx running
[ 30] CS Misc. Stats 1.8.3-dev+ AMXX Dev Team miscstats.amxx running
[ 31] CS Stats Logging 1.8.3-dev+ AMXX Dev Team stats_logging.a running
[ 32] Team Balancer 1.8b3 Ptahhotep ptb.amxx running
[ 33] VIP for Classic 1.2 DimonBP vip_classic.amx running

amxx version

Authors:
David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko
Felix "SniperBeamer" Geyer, Jonny "Got His Gun" Bergstrom
Lukasz "SidLuke" Wlasinski, Christian "Basic-Master" Hammacher
Borja "faluco" Ferrer, Scott "DS" Ehlert
Compiled: Mar 14 2015 05:25:11
Built from: https://github.com/alliedmodders/amxmodx/commit/32e1908
Build ID: 4683:32e1908
Core mode: JIT+ASM32

Before I used 1.8.3, but about build have no idea, but I will try to get this information from backups a bit later, also all third-party plugins recompiled manually for newest dev build.

New crash caused by new reason:

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `./hlds_linux -noipx -tos -game cstrike -port 27015 -maxplayers 20'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00000000 in ?? ()
#0 0x00000000 in ?? ()
#1 0xf311f708 in amx_Callback () from /usr/local/users/dimonbp/csclassic/cstrike/addons/amxmodx/sos/amxmodx.so
#2 0xf313e622 in JIT_OP_SYSREQ () from /usr/local/users/dimonbp/csclassic/cstrike/addons/amxmodx/sos/amxmodx.so
#3 0x0000408c in ?? ()
#4 0x094e67b4 in ?? ()

By the way, I tried to reproduce this crash, as it happens after mapchange but unsuccessfully, server worked fine with manual changelevel and amx_map.

UPDATE: OK, probably I found the reason of this crashes. It happened when SQL connection was lost. Where are my small "upgrade" for AMXBans about what I forgot to tell you. This thing restarts server when MySQL server is gone away.

That`s why I tested with offline MySQL server - server crashes in a loop but when online - all is working normally.

After this I tried to upgrade my small part of upgrade and changed:

server_cmd("restart")
return PLUGIN_HANDLED

to

new map[33]
get_mapname(map,32)
server_cmd("amx_map %s", map)
return PLUGIN_HANDLED

Now, when MySQL is unreachable, server is changing map successfully (in a loop, if connection cannot be reestablished) and there a no crash present.

OnePL
03-23-2015, 20:08
Instead:
server_cmd("amx_map %s", map)

Use:
engine_changelevel(map)

Arkshine
03-23-2015, 21:37
You have to know that now Mysql module will restart automatically connection and has now timeout your provide in native will be applied for read/write.

I mean that; https://github.com/alliedmodders/amxmodx/blob/master/modules/mysqlx/mysql/MysqlDriver.cpp#L67-L75

DimonBP
03-24-2015, 02:00
You have to know that now Mysql module will restart automatically connection and has now timeout your provide in native will be applied for read/write.

I mean that; https://github.com/alliedmodders/amxmodx/blob/master/modules/mysqlx/mysql/MysqlDriver.cpp#L67-L75

Thank you, removed this code and SQL module now reconnects if connection is lost. Topic can be closed, the problem is solved. :)