Jump to content
  • DoT's crash the server...


    Xenithar
    • Status: devacknowledged
      Main Category: Core / Mangos Daemon
      Sub-Category: Core Crash
      Version: 0.20(currentmasterbranch) Milestone: 21 Priority: High
      Implemented Version: 0.20

    Killing a pet with a DoT brings down the server

    I looked through the bug reports but did not see this. This has been around for a while. Using a DoT on a pet (voidwalker, animal, whatever) is very likely to crash the server. This has been happening in R19 as well.
    [code]
    DealDamageEnd returned 18 damage
    AttackerStateUpdate: (NPC) 2 attacked 18039 (TypeId: 3) for 18 dmg, absorbed 0, blocked 0, resisted 0.
    PeriodicTick: Player Tamilee (Guid: 16) attacked Pet (Petnumber: 341 Guid: 12) for 40 dmg inflicted by 992
    DealDamageStart
    deal dmg:40 to health:12
    DealDamage Player Tamilee (Guid: 16) Killed Pet (Petnumber: 341 Guid: 12)
    PLAYER: RewardHonor
    DealDamageAttackStop
    creature 12 stopped attacking player 16
    player 16 stopped attacking creature 12
    SET JUST_DIED
    Aura 3 now is remove mode 4
    Aura 3 now is remove mode 4
    Aura 79 now is remove mode 5
    Aura 133 now is remove mode 5
    Aura 132 now is remove mode 5
    DealDamageEnd returned 40 damage

    Program received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 0xb20f3b70 (LWP 2938)]
    0x0d000105 in ?? ()
    (gdb) backtrace
    #0 0x0d000105 in ?? ()
    #1 0x088bdc88 in SpellAuraHolder::Update (this=0xd979490, diff=100)
    at /home/---/zero/src/server/src/game/SpellAuras.cpp:5445
    #2 0x0878efcf in SpellAuraHolder::UpdateHolder (this=0xd979490, diff=100)
    at /home/---/zero/src/server/src/game/SpellAuras.h:154
    #3 0x0877ae41 in Unit::_UpdateSpells (this=0xc33d1b0, time=100)
    at /home/---/zero/src/server/src/game/Unit.cpp:2983
    #4 0x08771cf2 in Unit::Update (this=0xc33d1b0, update_diff=100, p_time=100)
    at /home/---/zero/src/server/src/game/Unit.cpp:333
    #5 0x08639ad6 in Creature::Update (this=0xc33d1b0, update_diff=100, diff=100)
    at /home/---/zero/src/server/src/game/Creature.cpp:582
    #6 0x086e9f4a in Pet::Update (this=0xc33d1b0, update_diff=100, diff=100)
    at /home/---/zero/src/server/src/game/Pet.cpp:600
    #7 0x0882982a in WorldObject::UpdateHelper::Update (this=0xb20f1fc4,
    time_diff=100) at /home/---/zero/src/server/src/game/Object.h:473
    #8 0x08849470 in MaNGOS::ObjectUpdater::Visit (this=0xb20f31a0, m=...)
    at /home/---/zero/src/server/src/game/GridNotifiersImpl.h:54
    #9 0x08856a60 in VisitorHelper<:objectupdater creature> (v=..., c=...)
    at /home/---/zero/src/server/src/framework/GameSystem/TypeContainerVisitor.h:72
    #10 0x088565c6 in VisitorHelper<:objectupdater creature typelist typenull> > > (v=..., c=...)
    at /home/---/zero/src/server/src/framework/GameSystem/TypeContainerVisitor
    .h:85
    #11 0x08855f7c in VisitorHelper<:objectupdater player typelist typenull> > > > (v=..., c=...)
    at /home/---/zero/src/server/src/framework/GameSystem/TypeContainerVisitor.h:86
    #12 0x088551d5 in VisitorHelper<:objectupdater typelist typenull> > > > > (v=..., c=...)
    at /home/---/zero/src/server/src/framework/GameSystem/TypeContainerVisitor.h:98
    #13 0x08853f34 in TypeContainerVisitor<:objectupdater typemapcontainer typelist typenull> > > > > >::Visit (this=0xb20f3198, c=...)
    at /home/---/zero/src/server/src/framework/GameSystem/TypeContainerVisitor.h:127
    #14 0x08852093 in Grid > > >, TypeList > > > >::Visit<:objectupdater> (this=0xd9a8cc4, visitor=...)
    at /home/---/zero/src/server/src/framework/GameSystem/Grid.h:111
    #15 0x0884f77a in NGrid > > >, TypeList > > > >::Visit<:objectupdater typelist>a, TypeNull> > > > > (this=0xd99de78, x=@0xb20f20dc: 12, y=@0xb20f20d8: 7,
    visitor=...)
    at /home/---/zero/src/server/src/framework/GameSystem/NGrid.h:360
    #16 0x0884b6c8 in Map::Visit<:objectupdater typemapcontainer typelist typenull> > > > > >
    (this=0xb9acf98, cell=..., visitor=...)
    at /home/---/zero/src/server/src/game/Map.h:446
    #17 0x088429f0 in Map::Update (this=0xb9acf98, t_diff=@0xb20f323c: 100)
    at /home/---/zero/src/server/src/game/Map.cpp:521
    #18 0x08857f52 in MapManager::Update (this=0xb2fede8, diff=43)
    at /home/---/zero/src/server/src/game/MapManager.cpp:184
    #19 0x088e8401 in World::Update (this=0x8ce92b0, diff=43)
    at /home/---/zero/src/server/src/game/World.cpp:1498
    #20 0x0855402f in WorldRunnable::run (this=0xa4f2008)
    at /home/---/zero/src/server/src/mangosd/WorldRunnable.cpp:66
    #21 0x0897dca5 in ACE_Based::Thread::ThreadTask (param=0xa4f2008)
    at /home/---/zero/src/server/src/shared/Threading.cpp:197
    #22 0xb7f50171 in ACE_OS_Thread_Adapter::invoke() ()
    from /usr/lib/libACE-6.0.3.so
    #23 0xb7f121cf in ace_thread_adapter () from /usr/lib/libACE-6.0.3.so
    #24 0xb77d6c39 in start_thread ()
    from /lib/i386-linux-gnu/i686/cmov/libpthread.so.0
    #25 0xb7743a6e in clone () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
    [/code]
    This should be very high priority since it effectively breaks most casters. Heck, even a hunter's poison sting can cause this.


    User Feedback

    Recommended Comments

    Well, a mob just killed my fiance's pet. Here is the result.
    [code]
    PeriodicTick: Creature (Entry: 2350 Guid: 16517) attacked Pet (Petnumber: 310 Guid: 1) for 10 dmg inflicted by 3396
    DealDamageStart
    deal dmg:10 to health:2
    DealDamage Creature (Entry: 2350 Guid: 16517) Killed Pet (Petnumber: 310 Guid: 1)
    DealDamageAttackStop
    creature 1 stopped attacking creature 16122
    creature 16122 stopped attacking creature 1
    creature 16517 stopped attacking creature 1
    SET JUST_DIED
    Aura 3 now is remove mode 4
    Aura 22 now is remove mode 4
    Aura 79 now is remove mode 0
    AURA MOD DAMAGE type:1 negative:0
    Aura 133 now is remove mode 0
    Aura 132 now is remove mode 0
    DealDamageEnd returned 10 damage

    Program received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 0xb20f3b70 (LWP 8257)]
    0x064d1146 in ?? ()
    (gdb) backtrace
    #0 0x064d1146 in ?? ()
    #1 0x088be8e0 in Aura::UpdateAura (this=0xb77cd3f0, diff=100)
    at /home/---/zero/src/server/src/game/SpellAuras.h:455
    #2 0x088bdc88 in SpellAuraHolder::Update (this=0xc4c8860, diff=100)
    at /home/---/zero/src/server/src/game/SpellAuras.cpp:5445
    #3 0x0878efcf in SpellAuraHolder::UpdateHolder (this=0xc4c8860, diff=100)
    at /home/---/zero/src/server/src/game/SpellAuras.h:154
    #4 0x0877ae41 in Unit::_UpdateSpells (this=0xc470308, time=100)
    at /home/---/zero/src/server/src/game/Unit.cpp:2983
    #5 0x08771cf2 in Unit::Update (this=0xc470308, update_diff=100, p_time=100)
    at /home/---/zero/src/server/src/game/Unit.cpp:333
    #6 0x08639ad6 in Creature::Update (this=0xc470308, update_diff=100, diff=100)
    at /home/---/zero/src/server/src/game/Creature.cpp:582
    #7 0x086e9f4a in Pet::Update (this=0xc470308, update_diff=100, diff=100)
    at /home/---/zero/src/server/src/game/Pet.cpp:600
    #8 0x0882982a in WorldObject::UpdateHelper::Update (this=0xb20f1fc4,
    time_diff=100) at /home/---/zero/src/server/src/game/Object.h:473
    #9 0x08849470 in MaNGOS::ObjectUpdater::Visit (this=0xb20f31a0, m=...)
    at /home/---/zero/src/server/src/game/GridNotifiersImpl.h:54
    #10 0x08856a60 in VisitorHelper<:objectupdater creature> (v=..., c=...)
    at /home/---/zero/src/server/src/framework/GameSystem/TypeContainerVisitor.h:72
    #11 0x088565c6 in VisitorHelper<:objectupdater creature typelist>, TypeList > > (v=..., c=...)
    at /home/---/zero/src/server/src/framework/GameSystem/TypeContainerVisitor.h:85
    #12 0x08855f7c in VisitorHelper<:objectupdater player typelist typenull> > > > (v=..., c=...)
    at /home/---/zero/src/server/src/framework/GameSystem/TypeContainerVisitor.h:86
    #13 0x088551d5 in VisitorHelper<:objectupdater typelist typenull> > > > > (v=..., c=...)
    at /home/---/zero/src/server/src/framework/GameSystem/TypeContainerVisitor.h:98
    #14 0x08853f34 in TypeContainerVisitor<:objectupdater typemapcontainer typelist typenull> > > > > >::Visit (this=0xb20f3198, c=...)
    at /home/---/zero/src/server/src/framework/GameSystem/TypeContainerVisitor.h:127
    #15 0x08852093 in Grid > > >, TypeList > > > >::Visit<:objectupdater> (this=0xc31c8fc, visitor=...)
    at /home/---/zero/src/server/src/framework/GameSystem/Grid.h:111
    #16 0x0884f77a in NGrid > > >, TypeListre, TypeList > > > >::Visit<:objectupdater typelist typenull> > > > > (this=0xc3135d0, x=@0xb20f20dc: 10, y=@0xb20f20d8: 8,
    visitor=...)
    at /home/---/zero/src/server/src/framework/GameSystem/NGrid.h:360
    #17 0x0884b6c8 in Map::Visit<:objectupdater typemapcontainer typelist typenull> > > > > >
    (this=0xb9acfa8, cell=..., visitor=...)
    at /home/---/zero/src/server/src/game/Map.h:446
    #18 0x088429f0 in Map::Update (this=0xb9acfa8, t_diff=@0xb20f323c: 100)
    at /home/---/zero/src/server/src/game/Map.cpp:521
    #19 0x08857f52 in MapManager::Update (this=0xb2fec70, diff=48)
    at /home/---/zero/src/server/src/game/MapManager.cpp:184
    #20 0x088e8401 in World::Update (this=0x8ce92b0, diff=48)
    at /home/---/zero/src/server/src/game/World.cpp:1498
    #21 0x0855402f in WorldRunnable::run (this=0xa4f2ad8)
    at /home/---/zero/src/server/src/mangosd/WorldRunnable.cpp:66
    #22 0x0897dca5 in ACE_Based::Thread::ThreadTask (param=0xa4f2ad8)
    at /home/---/zero/src/server/src/shared/Threading.cpp:197
    #23 0xb7f50171 in ACE_OS_Thread_Adapter::invoke() ()
    from /usr/lib/libACE-6.0.3.so
    #24 0xb7f121cf in ace_thread_adapter () from /usr/lib/libACE-6.0.3.so
    #25 0xb77d6c39 in start_thread ()
    from /lib/i386-linux-gnu/i686/cmov/libpthread.so.0
    #26 0xb7743a6e in clone () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
    [/code]
    We need to clamp damage so it cannot take more health than an NPC/mob/whatever has.

    Link to comment
    Share on other sites

    This is an outdated bug so all the debug lines are out of sync now. I can only guess what the might have been the error and here it is.

     

    diff --git a/src/game/WorldHandlers/SpellAuras.cpp b/src/game/WorldHandlers/SpellAuras.cpp
    index fb14a6f..08095b0 100644
    --- a/src/game/WorldHandlers/SpellAuras.cpp
    +++ b/src/game/WorldHandlers/SpellAuras.cpp
    @@ -5533,6 +5533,10 @@ void SpellAuraHolder::Update(uint32 diff)
             }
         }
     
    +	// DoTs-crash-the-server-r509 - Maybe Fix.
    +	if (!m_target)
    +		return;
    +
         // Channeled aura required check distance from caster
         if (IsChanneledSpell(m_spellProto) && GetCasterGuid() != m_target->GetObjectGuid())
         {
    

    edit: Damage is should not be the issue as it clamped here:

    
        if (Creature* victim = pVictim->ToCreature())
        {
            if (!victim->IsPet() && !victim->HasLootRecipient())
                victim->SetLootRecipient(this);
    
            if (IsControlledByPlayer()) // more narrow: IsPet(), IsGuardian() ?
                victim->LowerPlayerDamageReq(health < damage ? health : damage);
        }

     

    Link to comment
    Share on other sites

    Try this fix:

    diff --git a/src/game/Object/Unit.cpp b/src/game/Object/Unit.cpp
    index 08ba7cd..408960e 100644
    --- a/src/game/Object/Unit.cpp
    +++ b/src/game/Object/Unit.cpp
    @@ -634,10 +634,11 @@ uint32 Unit::DealDamage(Unit* pVictim, uint32 damage, CleanDamage const* cleanDa
                 victim->SetLootRecipient(this);
     
             if (IsControlledByPlayer()) // more narrow: IsPet(), IsGuardian() ?
    -            victim->LowerPlayerDamageReq(health < damage ? health : damage);
    +            victim->LowerPlayerDamageReq(victim->GetHealth() < damage ? victim->GetHealth() : damage);
    +
         }
     
    -    if (health <= damage)
    +    if (pVictim->GetHealth() <= damage)
         {
             DEBUG_FILTER_LOG(LOG_FILTER_DAMAGE, "DealDamage %s Killed %s", GetGuidStr().c_str(), pVictim->GetGuidStr().c_str());
     
    

     

    Link to comment
    Share on other sites



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use