Bots-United / jk_botti

Bot (Computer AI) for Half-Life 1 Deathmatch
http://forums.bots-united.com/forumdisplay.php?f=83
Other
43 stars 19 forks source link

Rare server crash #1

Closed serfreeman1337 closed 7 years ago

serfreeman1337 commented 8 years ago

Here is crash log. I can send crash dump if need.

----------------------------------------------
CRASH: Сб. февр.  6 04:16:09 MSK 2016
Start Line: ./hlds_linux -game valve +ip 1.3.3.7 +port 1337 +maxplayers 32 +map crossfire -debug -pidfile hlds.13288.pid
[New Thread 13295]
[New Thread 13296]
[New Thread 13298]
[New Thread 13324]
[New Thread 13300]
[New Thread 13384]
[New Thread 2407]
[New Thread 13388]
[New Thread 13389]
Core was generated by `./hlds_linux -game valve +ip 1.3.3.7 +port 1337 +maxplayers 32 +map cross'.
Program terminated with signal 11, Segmentation fault.
#0  0xb1143a8e in ?? () from /hl/gungame/valve/addons/jk_botti/dlls/jk_botti_mm_i386.so
#0  0xb1143a8e in ?? () from /hl/gungame/valve/addons/jk_botti/dlls/jk_botti_mm_i386.so
#1  0xb1143e5e in ?? () from /hl/gungame/valve/addons/jk_botti/dlls/jk_botti_mm_i386.so
#2  0xb114409c in ?? () from /hl/gungame/valve/addons/jk_botti/dlls/jk_botti_mm_i386.so
#3  0xb11449ab in ?? () from /hl/gungame/valve/addons/jk_botti/dlls/jk_botti_mm_i386.so
#4  0xb114302d in BotShootTripmine(bot_t&) () from /hl/gungame/valve/addons/jk_botti/dlls/jk_botti_mm_i386.so
#5  0xb114ca62 in ?? () from /hl/gungame/valve/addons/jk_botti/dlls/jk_botti_mm_i386.so
#6  0xb114c2ac in BotThink(bot_t&) () from /hl/gungame/valve/addons/jk_botti/dlls/jk_botti_mm_i386.so
#7  0xb112e7aa in ?? () from /hl/gungame/valve/addons/jk_botti/dlls/jk_botti_mm_i386.so
#8  0xb11318be in ?? () from /hl/gungame/valve/addons/jk_botti/dlls/jk_botti_mm_i386.so
#9  0xb33f7285 in api_caller_void_args_void(void const*, void const*) () from /hl/gungame/./valve/addons/metamod/metamod.so
#10 0xb33f678f in main_hook_function_void(unsigned int, enum_api_t, unsigned int, void const*) () from /hl/gungame/./valve/addons/metamod/metamod.so
#11 0xb33f9dae in mm_StartFrame() () from /hl/gungame/./valve/addons/metamod/metamod.so
#12 0xb6fcd42d in SV_Physics() () from /hl/gungame/engine_i486.so
#13 0xb6f7829f in SV_Frame () from /hl/gungame/engine_i486.so
#14 0xb6f77a08 in _Host_Frame () from /hl/gungame/engine_i486.so
#15 0xb6f77793 in Host_Frame () from /hl/gungame/engine_i486.so
#16 0xb6f77681 in CEngine::Frame_noVirt () from /hl/gungame/engine_i486.so
#17 0xb6f8a3d0 in CDedicatedServerAPI::RunFrame() () from /hl/gungame/engine_i486.so
#18 0x08049c65 in RunServer () at ../dedicated/sys_ded.cpp:766
#19 0x08049472 in main (argc=14, argv=0xbfaf6af4) at ../dedicated/sys_ded.cpp:1146
No symbol table info available.
From        To          Syms Read   Shared Object Library
0xb7683914  0xb76c9c78  Yes         ./libstdc++.so.6
0xb7630a40  0xb7631998  Yes (*)     /lib/i386-linux-gnu/libdl.so.2
0xb761a610  0xb76269d8  Yes (*)     /lib/i386-linux-gnu/libpthread.so.0
0xb74c4c10  0xb75d57f4  Yes (*)     /lib/i386-linux-gnu/libc.so.6
0xb748b4b0  0xb74a5b38  Yes (*)     /lib/i386-linux-gnu/libm.so.6
0xb7713830  0xb772a4cf  Yes (*)     /lib/ld-linux.so.2
0xb7474e04  0xb7484490  Yes         ./libgcc_s.so.1
0xb6ef2a40  0xb70471b1  Yes (*)     /hl/gungame/engine_i486.so
0xb6e408c0  0xb6e44578  Yes (*)     /lib/i386-linux-gnu/librt.so.1
0xb6e2e5c0  0xb6e38d74  Yes (*)     ./libsteam_api.so
0xb6e14a00  0xb6e211b8  Yes         /hl/gungame/filesystem_stdio.so
0xb5d19400  0xb6947900  Yes (*)     /hl/.steam/sdk32/steamclient.so
0xb33f5b70  0xb340b984  Yes         /hl/gungame/./valve/addons/metamod/metamod.so
0xb325e610  0xb333b8f8  Yes (*)     /hl/gungame/valve/dlls/hl_i386.so
0xb31ad1e0  0xb31ca660  Yes (*)     /hl/gungame/valve/addons/reunion/reunion_mm_i386.so
0xb310db00  0xb31677a4  Yes (*)     /hl/gungame/valve/addons/amxmodx/dlls/amxmodx_mm_i386.so
0xb30ee2b0  0xb30f25f8  Yes (*)     valve/addons/amxmodx/modules/fun_amxx_i386.so
0xb30db6a0  0xb30e80a8  Yes (*)     valve/addons/amxmodx/modules/engine_amxx_i386.so
0xb30a1e30  0xb30cf168  Yes (*)     valve/addons/amxmodx/modules/fakemeta_amxx_i386.so
0xb30818f0  0xb3086df4  Yes (*)     valve/addons/amxmodx/modules/geoip_amxx_i386.so
0xb2e5e4e0  0xb2ec5418  Yes (*)     valve/addons/amxmodx/modules/hamsandwich_amxx_i386.so
0xb2e18bc0  0xb2e2d154  Yes (*)     valve/addons/amxmodx/modules/geoipmax_amxx_i386.so
0xb11183e0  0xb11533c7  Yes (*)     /hl/gungame/valve/addons/jk_botti/dlls/jk_botti_mm_i386.so
0xb2d28880  0xb2d2b8b0  Yes (*)     /hl/gungame/valve/addons/spawn_protect/sc-prot_mm_i686.so
0xb2c7d2f0  0xb2cff080  Yes (*)     /hl/gungame/valve/addons/VoiceTranscoder/VoiceTranscoder.so
0xb2abec40  0xb2b4d300  Yes (*)     valve/addons/amxmodx/modules/mysql_amxx_i386.so
0xb2a659a0  0xb2a69788  Yes (*)     valve/addons/amxmodx/modules/nvault_amxx_i386.so
0xb2a55820  0xb2a589c8  Yes (*)     valve/addons/amxmodx/modules/whois_amxx_i386.so
0xb2a21a90  0xb2a28fe8  Yes (*)     /lib/i386-linux-gnu/libnss_files.so.2
0xb2a1abb0  0xb2a1dbc8  Yes (*)     /lib/i386-linux-gnu/libnss_dns.so.2
0xb2a07630  0xb2a13828  Yes (*)     /lib/i386-linux-gnu/libresolv.so.2
0xaf01c400  0xafc4a900  Yes (*)     ./steamclient.so
0xae9c8670  0xaea3e020  Yes (*)     ./crashhandler.so
0xb2a7bed0  0xb2a7cf78  Yes (*)     valve/addons/amxmodx/modules/sockets_amxx_i386.so
(*): Shared library is missing debugging information.
Stack level 0, frame at 0xbfaf6170:
 eip = 0xb1143a8e; saved eip 0xb1143e5e
 called by frame at 0xbfaf61c0
 Arglist at 0xbfaf6168, args: 
 Locals at 0xbfaf6168, Previous frame's sp is 0xbfaf6170
 Saved registers:
  ebx at 0xbfaf615c, ebp at 0xbfaf6168, esi at 0xbfaf6160, edi at 0xbfaf6164, eip at 0xbfaf616c
End of crash report
----------------------------------------------

Oh yes, you will say its nosteam related problem blablabla nosteam = nosupport blablabla :\

LevShisterov commented 7 years ago

It crash in HaveRoomForThrow while trying to shot tripmine with MP5 grenade (pBot.pBotEnemy is NULL).

jkivilin commented 7 years ago

I can make a change that attempts fix this, but probably wont be able to reproduce or test.

jkivilin commented 7 years ago

Fix that I'm thinking is:

[edit] Proper fix would be to change BotFireWeapon take origin vector of pBotEnemy/tripmine and pass that down to call-path and avoid direct use of pBot.pBotEnemy altogether.

LevShisterov commented 7 years ago

The problem arise because of Gungame mod where all weapon are stripped and only one is given. So it happen, when bot receives MP5. The first variant you suggested is the same I think should work. Because bot should try to shot tripmine only if it doesn't has an enemy. So, storing tripmine edict into pBot structure and setting it into pBotEnemy in BotShootTripmine before calling BotFireWeapon should do the trick. I think there is even no need to backup pBotEnemy. But I didn't tested yet.

jkivilin commented 7 years ago

I made new beta release with fix for pBotEnemy==NULL bug when shooting tripmine. I cannot reproduce this bug, so I hope you can test this release: https://github.com/jkivilin/jk_botti/releases/tag/v1.44beta1

serfreeman1337 commented 7 years ago

got 48+ hours uptime looks like its fixed

thanks