Arkshine / CSBotEnabler

Enable CSBot on Counter-Strike 1.6
46 stars 10 forks source link

Reappearing crashes on linux #2

Open gmacev opened 8 years ago

gmacev commented 8 years ago

Crashes the server sometimes few times a day, sometimes few times a week, but always with the same error:

0 0xc2100000 in ?? ()

0 0xc2100000 in ?? ()

1 0xb31f49d6 in CCSBot::GetAttacker (this=0xbdbbb30) at ../cstrike/dlls/bot/cs_bot.cpp:612

2 0xb324e751 in AttackState::OnUpdate (this=0xbdbc5cc, me=0xbdbbb30) at ../cstrike/dlls/bot/states/cs_bot_attack.cpp:477

3 0xb3210aca in CCSBot::Update (this=0xbdbbb30) at ../cstrike/dlls/bot/cs_bot_update.cpp:908

4 0xb322c98e in CBot::BotThink (this=0xbdbbb30) at ../game_shared/bot/bot.cpp:110

5 0xb322d31a in CBotManager::StartFrame (this=0xa4ec648) at ../game_shared/bot/bot_manager.cpp:180

6 0xb3205029 in CCSBotManager::StartFrame (this=0xa4ec648) at ../cstrike/dlls/bot/cs_bot_manager.cpp:199

7 0xb3149e9a in StartFrame () at ../cstrike/dlls/client.cpp:4525

8 0xb33f56a9 in ?? () from /root/public/./cstrike/addons/metamod/dlls/metamod.so

9 0xb7011c28 in SV_Physics () at ../engine/sv_phys.c:1985

10 0xb7009b26 in SV_Frame () at ../engine/sv_main.c:9236

11 0xb6fd1e92 in _Host_Frame (time=0.00144590402) at ../engine/host.c:1404

12 0xb6fd2252 in Host_Frame (time=0.00144590402, iState=1, stateInfo=0xbfe4ca6c) at ../engine/host.c:1522

13 0xb6ff68dc in CEngine::Frame (this=0xb708d6a0) at ../engine/sys_engine.cpp:245

14 0xb6ff3c43 in RunFrame (this=) at ../engine/sys_dll2.cpp:1235

15 CDedicatedServerAPI::RunFrame (this=0xb7088d00) at ../engine/sys_dll2.cpp:1226

16 0x08049c65 in RunServer () at ../dedicated/sys_ded.cpp:766

17 0x08049472 in main (argc=16, argv=0xbfe4ccb4) at ../dedicated/sys_ded.cpp:1146

No symbol table info available.

Arkshine commented 8 years ago

This doesn't seem an issue with the module. It does nothing in this area. Module is about just patching memory at several places to skip the check which verifies if the game is "czero" (to get access to cvars/commands/manager/etc..).

GetAttacker() looks like:

CBasePlayer *CCSBot::GetAttacker() const
{
    if (m_attacker != NULL && m_attacker->IsAlive())
        return m_attacker;

    return NULL;
}

If you get a crash there, it means m_attacker is not null but holds an invalid pointer. Not sure how it's possible looking at the code.

Maybe a bot received damages by a player who has been disconnected/crashed/whatever right away and the value stored in m_attacker was no more valid at this point. Did you check the server log to see what's happening when a crash is triggered?

Do you get the dump from hlds_run script? If so, it should provide more information, make sure to paste the full output.

gmacev commented 8 years ago

Sorry, something weird is happening with my server. It seems whatever the crash reason is it always outputs the same debug.log. For example if server crashes because of precache limit:

FATAL ERROR (shutting down): Host_Error: PF_precache_model_I: Model 'sprites/smoke.spr' failed to precache because the item count is over the 512 limit. warning: Can't read pathname for load map: Input/output error.

It still outputs the same debug.log with trace starting from CCSBot::GetAttacker. Any idea why?

Arkshine commented 8 years ago

If you crash with Host_Error:, you can't have the crash dump of first message at the same time.

Now, about your crash dump, you have to try to debug: