Jump to content

How to read Crashlogs


Guest rusfighter

Recommended Posts

how about example of crashlog you have problem with? i can only show you example from one of our crashdumps:

nice -n 19 gdb $srv_dir/bin/mangos-worldd --core $f --batch --quiet -ex "info threads" -ex "thread apply all bt full" -ex "quit" &>  $log_file && rm $f

results in


warning: Can't read pathname for load map: Input/output error.
Core was generated by `/home/gcuser/gc_mangos/mangos_server/bin/mangos-worldd'.
Program terminated with signal 6, Aborted.
[New process 24998]
[New process 25003]
[New process 25002]
[New process 25001]
[New process 25000]
[New process 24999]
[New process 24756]
[New process 24760]
[New process 24759]
[New process 24758]
#0  0x00007f65e255ff55 in raise () from /lib/libc.so.6
 10 process 24758  0x00007f65e3035131 in nanosleep ()
  from /lib/libpthread.so.0
 9 process 24759  0x00007f65e3035131 in nanosleep ()
  from /lib/libpthread.so.0
 8 process 24760  0x00007f65e3035131 in nanosleep ()
  from /lib/libpthread.so.0
 7 process 24756  0x00007f65e302e99d in pthread_join ()
  from /lib/libpthread.so.0
 6 process 24999  0x00007f65e25cac91 in nanosleep () from /lib/libc.so.6
 5 process 25000  0x00007f65e25f2f82 in select () from /lib/libc.so.6
 4 process 25001  0x00007f65e3035131 in nanosleep ()
  from /lib/libpthread.so.0
 3 process 25002  0x00007f65e25f9cd8 in epoll_wait () from /lib/libc.so.6
 2 process 25003  0x00007f65e25f9cd8 in epoll_wait () from /lib/libc.so.6
* 1 process 24998  0x00007f65e255ff55 in raise () from /lib/libc.so.6
... a lot more text ...

the numbered list shows all running processes and what method they are currently in. * shows you where the crash occured. so in rest of dump only is interesting what happens in process 1 (24998)

So you scroll through file until you get to


Thread 1 (process 24998):
#0  0x00007f65e255ff55 in raise () from /lib/libc.so.6
No symbol table info available.
#1  0x00007f65e2562d90 in abort () from /lib/libc.so.6
No symbol table info available.
#2  0x00007f65e255907a in __assert_fail () from /lib/libc.so.6
No symbol table info available.
#3  0x00000000004fbcce in Map::getNGrid (this=<value optimized out>, 
   x=<value optimized out>, y=<value optimized out>)
   at ../../../src/game/Map.h:451
   st = {static SYMBUFSIZ = 4096, 
 buf_ = "/home/gcuser/gc_mangos/mangos_server/bin/mangos-worldd(_ZNK3Map9GetHeightEfffb+0x8f) [0x5fbaff]\\n/home/gcuser/gc_mangos/mangos_server/bin/mangos-worldd(_ZNK11WorldObject21UpdateGroundPositionZEffRf+0x4"..., buflen_ = 1754, 
 static UNSUPPORTED = 0x7f65e46075e0 "<stack traces unsupported platform>", 
 static UNABLE_TO_GET_TRACE = 0x7f65e4607610 "<unable to get trace>"}
   __FUNCTION__ = "getNGrid"
   __PRETTY_FUNCTION__ = "NGridType* Map::getNGrid(uint32, uint32) const"
#4  0x00000000005f9c4a in Map::EnsureGridCreated (this=0x60b4, 
   p=@0x7f65d92afae0) at ../../../src/game/Map.cpp:354
No locals.
#5  0x00000000005fbaff in Map::GetHeight (this=0x60b4, x=-nan(0x400000), 
   y=-nan(0x400000), z=110.864998, pUseVmaps=true)
   at ../../../src/game/Map.cpp:1639
   gmap = <value optimized out>
   mapHeight = <value optimized out>
   vmapHeight = <value optimized out>
#6  0x000000000061ef42 in WorldObject::UpdateGroundPositionZ (
   this=<value optimized out>, x=-nan(0x400000), y=-nan(0x400000), 
   z=@0x7f65d92afbdc) at ../../../src/game/Object.cpp:1467
   new_z = 9.14767638e-41
#7  0x000000000076d6cd in Unit::KnockBackFrom (this=0x7f65bf674d60, 
   target=<value optimized out>, horizontalSpeed=0, verticalSpeed=0)
   at ../../../src/game/Unit.cpp:14069
   fx = -nan(0x400000)
   fz = 110.864998
   fy2 = nan(0x400000)
   dis = <value optimized out>
   fy = -nan(0x400000)
   fx2 = nan(0x400000)
   fz2 = 0
   angle = <value optimized out>
#8  0x00000000006ffa9a in Spell::DoSpellHitOnUnit (this=0x7f65b64711f0, 
   unit=0x7f65bf674d60, effectMask=1) at ../../../src/game/Spell.cpp:1162
   effectNumber = 0
   realCaster = (class Unit *) 0x7f65bf6773f0
#9  0x000000000070013b in Spell::DoAllEffectOnTarget (this=0x7f65b64711f0, 
   target=0x7f65b64036e0) at ../../../src/game/Spell.cpp:961
   mask = 6
   unit = (class Unit *) 0x7f65bf674d60
   real_caster = (class Unit *) 0x7f65bf6773f0
   caster = (class Unit *) 0x7f65bf6773f0
   missInfo = SPELL_MISS_NONE
   procAttacker = 256
   procVictim = 512
   procEx = <value optimized out>
#10 0x000000000070ed6c in Spell::handle_delayed (this=0x7f65b64711f0, 
   t_offset=850) at ../../../src/game/Spell.cpp:2825
   next_time = 0
#11 0x000000000070fa5e in SpellEvent::Execute (this=0x7f65c02b4950, 
   e_time=121621, p_time=<value optimized out>)
   at ../../../src/game/Spell.cpp:6271
   n_offset = <value optimized out>
#12 0x00000000008484ef in EventProcessor::Update (this=0x7f65bf677500, 
   p_time=101) at ../../../src/framework/Utilities/EventProcessor.cpp:47
   Event = (BasicEvent *) 0x7f65c02b4950
#13 0x000000000076cc5c in Unit::Update (this=0x7f65bf6773f0, p_time=101)
   at ../../../src/game/Unit.cpp:319
No locals.
#14 0x0000000000538cdb in Creature::Update (this=0x7f65bf6773f0, diff=101)
   at ../../../src/game/Creature.cpp:468
No locals.
#15 0x00000000006092a6 in VisitorHelper<MaNGOS::ObjectUpdater, Creature> (
   v=@0x7f65d92aff90, c=<value optimized out>)
   at ../../../src/game/GridNotifiersImpl.h:48
No locals.
#16 0x000000000060839c in Map::Update (this=0x7f65ddc07a40, 
   t_diff=@0x7f65d92affec)
   at ../../../src/game/../framework/GameSystem/TypeContainerVisitor.h:53
   cell = {data = {Part = {grid_x = 24, grid_y = 36, cell_x = 3, 
     cell_y = 0, nocreate = 1, reserved = 16}, All = 553662744}}
   y = 288
   x = 195
   plr = <value optimized out>
   area = {right_offset = 2, left_offset = 1, upper_offset = 1, 
 lower_offset = 2}
   updater = {i_timeDiff = 101}
   grid_object_update = {i_visitor = @0x7f65d92aff90}
   world_object_update = {i_visitor = @0x7f65d92aff90}
   __PRETTY_FUNCTION__ = "virtual void Map::Update(const uint32&)"
#17 0x0000000000612967 in MapManager::Update (this=0x7f65ddbd3790, 
   diff=<value optimized out>) at ../../../src/game/MapManager.cpp:258
No locals.
#18 0x000000000078c5c4 in World::Update (this=0x7f65dc0193f0, diff=39)
   at ../../../src/game/World.cpp:1416
No locals.
#19 0x00000000004f1a51 in WorldRunnable::run (this=<value optimized out>)
   at ../../../src/mangosd/WorldRunnable.cpp:60
   diff = 39
   realCurrTime = 4154334358
   realPrevTime = <value optimized out>
   prevSleepTime = 37
#20 0x000000000082d75c in ACE_Based::Thread::ThreadTask (param=0x60b4)
   at ../../../src/shared/Threading.cpp:183
   _task = (class ACE_Based::Runnable *) 0x7f65de8becd0
#21 0x00007f65e302d73a in start_thread () from /lib/libpthread.so.0
No symbol table info available.
#22 0x00007f65e25f969d in clone () from /lib/libc.so.6
No symbol table info available.
#23 0x0000000000000000 in ?? ()
No symbol table info available.

This is a stacktrace. Shows you the calling three of current execution. The error occurs in item furthest down, here: raise(). This is just helper function though to raise a exception. First real mangos method found in three (going upwards) is

#3  0x00000000004fbcce in Map::getNGrid (this=<value optimized out>, 
   x=<value optimized out>, y=<value optimized out>)

Since all is optimized out it doesn't help much.

But more upwards we can see what methods called this one and by who they where called. Finally we get to

#5  0x00000000005fbaff in Map::GetHeight (this=0x60b4, x=-nan(0x400000), 
   y=-nan(0x400000), z=110.864998, pUseVmaps=true)
   at ../../../src/game/Map.cpp:1639

This looks weird, why should mangos try to getHeight with a not avaible x and y value? if we look further up we find

#7  0x000000000076d6cd in Unit::KnockBackFrom (this=0x7f65bf674d60, 
   target=<value optimized out>, horizontalSpeed=0, verticalSpeed=0)
   at ../../../src/game/Unit.cpp:14069
   fx = -nan(0x400000)
   fz = 110.864998
   fy2 = nan(0x400000)
   dis = <value optimized out>
   fy = -nan(0x400000)
   fx2 = nan(0x400000)
   fz2 = 0
   angle = <value optimized out>

And see here that in line 14069 of file unit.cpp the method further down callstack is called and local

variables are already NaN.

// line 14052 to 14074
float g = 19.23f;// seems that physic constant g(earth's gravity) in world of warcraft is about 2 times larger than real
       float dh = verticalSpeed*verticalSpeed / (2*g); // maximum parabola height
       float time = sqrtf(dh/(0.124976 * verticalSpeed)); //full move time in seconds // should be time = 2*Vert_speed/g, but..

       float dis = time * horizontalSpeed;

       float ox, oy, oz;
       GetPosition(ox, oy, oz);

       float fx = ox + dis * vcos;
       float fy = oy + dis * vsin;
       float fz = oz;

       float fx2, fy2, fz2; // getObjectHitPos overwrite last args in any result case
       if(VMAP::VMapFactory::createOrGetVMapManager()->getObjectHitPos(GetMapId(), ox,oy,oz+0.5f, fx,fy,oz+0.5f,fx2,fy2,fz2, -0.5f))
       {
           fx = fx2;
           fy = fy2;
           fz = fz2;
       }

then you just need to find what is actually wrong and then lastly you finally fix bug and everyone is happy:

http://github.com/gc/mangos/commit/a235c807651f65f377aa11e85fa5e974dcfb2bf6

hope that helps

Link to comment
Share on other sites

Thx for your reply , i still dont understand it exactly because i dont get the first code that you have i just get this

[New Thread 18977]
[New Thread 18976]
[New Thread 18975]
[New Thread 18974]
[New Thread 18973]
[New Thread 18972]
[New Thread 18971]
[New Thread 18964]
[New Thread 18968]
[New Thread 18967]
[New Thread 18966]
Core was generated by `/home/Luwow/server/bin/funserver -c ../etc/mangosd.conf'.
Program terminated with signal 11, Segmentation fault.
#0  std::tr1::_Hashtable<Player*, std::Pair<Player* const, UpdateData>, std::allocator<std::Pair<Player* const, UpdateData> >, std::_Select1st<std::Pair<Player* const, UpdateData> >, std::equal_to<Player*>, std::tr1::hash<Player*>, std::tr1::__detail::_Mod_range_hashing, std::tr1::__detail::_Default_ranged_hash, std::tr1::__detail::_Prime_rehash_policy, false, false, true>::_M_find_node (
   this=0xa9fed58, pl=0xa0567390, update_players=...)
   at /usr/include/c++/4.3/tr1_impl/hashtable:896
896        if (this->_M_compare(__k, __code, __p))
#0  std::tr1::_Hashtable<Player*, std::Pair<Player* const, UpdateData>, std::allocator<std::Pair<Player* const, UpdateData> >, std::_Select1st<std::Pair<Player* const, UpdateData> >, std::equal_to<Player*>, std::tr1::hash<Player*>, std::tr1::__detail::_Mod_range_hashing, std::tr1::__detail::_Default_ranged_hash, std::tr1::__detail::_Prime_rehash_policy, false, false, true>::_M_find_node (
   this=0xa9fed58, pl=0xa0567390, update_players=...)
   at /usr/include/c++/4.3/tr1_impl/hashtable:896
No locals.
#1  std::tr1::_Hashtable<Player*, std::Pair<Player* const, UpdateData>, std::allocator<std::Pair<Player* const, UpdateData> >, std::_Select1st<std::Pair<Player* const, UpdateData> >, std::equal_to<Player*>, std::tr1::hash<Player*>, std::tr1::__detail::_Mod_range_hashing, std::tr1::__detail::_Default_ranged_hash, std::tr1::__detail::_Prime_rehash_policy, false, false, true>::find (this=0xa9fed58, 
   pl=0xa0567390, update_players=...)
   at /usr/include/c++/4.3/tr1_impl/hashtable:764
No locals.
#2  Object::BuildUpdateDataForPlayer (this=0xa9fed58, pl=0xa0567390, 
   update_players=...) at ../../../src/game/Object.cpp:1059
       __PRETTY_FUNCTION__ = "void Object::BuildUpdateDataForPlayer(Player*, UpdateDataMapType&)"
#3  0x0825a6ab in void Map::Visit<WorldObjectChangeAccumulator, TypeMapContainer<TypeList<Player, TypeList<Creature, TypeList<Corpse, TypeNull> > > > >(Cell const&, TypeContainerVisitor<WorldObjectChangeAccumulator, TypeMapContainer<TypeList<Player, TypeList<Creature, TypeList<Corpse, TypeNull> > > > >&) ()
No symbol table info available.
#4  0x08257842 in Visit<WorldObjectChangeAccumulator, TypeMapContainer<TypeList<Player, TypeList<Creature, TypeList<Corpse, TypeNull> > > > > (this=0xa9fed58, 
   update_players=...) at ../../../src/game/CellImpl.h:210
No locals.
#5  WorldObject::BuildUpdateData (this=0xa9fed58, update_players=...)
   at ../../../src/game/Object.cpp:1957
       cell = {data = {Part = {grid_x = 6, grid_y = 32, cell_x = 7, 
             cell_y = 1, nocreate = 1, reserved = 31}, All = 1057257478}}
       notifier = {i_updateDatas = @0xa7bff120, i_object = @0xa9fed58}
       player_notifier = {i_visitor = @0xa7bff0a8}
       aMap = 0xad900018
#6  0x08229912 in Map::SendObjectUpdates (this=0xad900018)
   at ../../../src/game/Map.cpp:3568
       update_players = {<std::tr1::__unordered_map<Player*, UpdateData, std::tr1::hash<Player*>, std::equal_to<Player*>, std::allocator<std::Pair<Player* const, UpdateData> >, false>> = {<std::tr1::_Hashtable<Player*, std::Pair<Player* const, UpdateData>, std::allocator<std::Pair<Player* const, UpdateData> >, std::_Select1st<std::Pair<Player* const, UpdateData> >, std::equal_to<Player*>, std::tr1::hash<Player*>, std::tr1::__detail::_Mod_range_hashing, std::tr1::__detail::_Default_ranged_hash, std::tr1::__detail::_Prime_rehash_policy, false, false, true>> = {<std::tr1::__detail::_Rehash_base<std::tr1::__detail::_Prime_rehash_policy, std::tr1::_Hashtable<Player*, std::Pair<Player* const, UpdateData>, std::allocator<std::Pair<Player* const, UpdateData> >, std::_Select1st<std::Pair<Player* const, UpdateData> >, std::equal_to<Player*>, std::tr1::hash<Player*>, std::tr1::__detail::_Mod_range_hashing, std::tr1::__detail::_Default_ranged_hash, std::tr1::__detail::_Prime_rehash_policy, false, false, true> >> = {<No data fields>}, <std::tr1::__detail::_Hash_code_base<Player*, std::Pair<Player* const, UpdateData>, std::_Select1st<std::Pair<Player* const, UpdateData> >, std::equal_to<Player*>, std::tr1::hash<Player*>, std::tr1::__detail::_Mod_range_hashing, std::tr1::__detail::_Default_ranged_hash, false>> = {
               _M_extract = {<std::unary_function<std::Pair<Player* const, UpdateData>, Player* const>> = {<No data fields>}, <No data fields>}, 
               _M_eq = {<std::binary_function<Player*, Player*, bool>> = {<No data fields>}, <No data fields>}, 
               _M_h1 = {<std::unary_function<Player*, unsigned int>> = {<No data fields>}, <No data fields>}, 
               _M_h2 = {<No data fields>}}, <std::tr1::__detail::_Map_base<Player*, std::Pair<Player* const, UpdateData>, std::_Select1st<std::Pair<Player* const, UpdateData> >, true, std::tr1::_Hashtable<Player*, std::Pair<Player* const, UpdateData>, std::allocator<std::Pair<Player* const, UpdateData> >, std::_Select1st<std::Pair<Player* const, UpdateData> >, std::equal_to<Player*>, std::tr1::hash<Player*>, std::tr1::__detail::_Mod_range_hashing, std::tr1::__detail::_Default_ranged_hash, std::tr1::__detail::_Prime_rehash_policy, false, false, true> >> = {<No data fields>}, 
             _M_node_allocator = {<__gnu_cxx::new_allocator<std::tr1::__detail::_Hash_node<std::Pair<Player* const, UpdateData>, false> >> = {<No data fields>}, <No data fields>}, _M_buckets = 0xa0598e68, _M_bucket_count = 11, 
             _M_element_count = 1, _M_rehash_policy = {
               _M_max_load_factor = 1, _M_growth_factor = 2, 
               _M_next_resize = 11}}, <No data fields>}, <No data fields>}
       packet = {<ByteBuffer> = {static DEFAULT_SIZE = 4096, _rpos = 2, 
           _wpos = 1065353216, 
           _storage = {<std::_Vector_base<unsigned char, std::allocator<unsigned char> >> = {
               _M_impl = {<std::allocator<unsigned char>> = {<__gnu_cxx::new_allocator<unsigned char>> = {<No data fields>}, <No data fields>}, 
                 _M_start = 0x2 <Address 0x2 out of bounds>, 
                 _M_finish = 0x37f0c7f <Address 0x37f0c7f out of bounds>, 
                 _M_end_of_storage = 0xad900018 "\\b\\206K\\b¸o\\215\\n"}}, <No data fields>}}, m_opcode = 7}
#7  0x08235703 in Map::Update (this=0xad900018, t_diff=@0xa0ebbbd0)
   at ../../../src/game/Map.cpp:698
       updater = {i_timeDiff = 101}
       grid_object_update = {i_visitor = @0xa7bff2bc}
       world_object_update = {i_visitor = @0xa7bff2bc}
       __PRETTY_FUNCTION__ = "virtual void Map::Update(const uint32&)"
#8  0x0824352c in MapUpdateRequest::call (this=0xa0ebbbc0)
   at ../../../src/game/MapUpdater.cpp:47
No locals.
#9  0x084514b8 in DelayExecutor::svc (this=0xadc01108)
   at ../../../src/shared/DelayExecutor.cpp:60
       rq = 0xa0ebbbc0
#10 0xb7eb0952 in ACE_Task_Base::svc_run (args=0xadc01108)
   at ../../ace/Task.cpp:275
       svc_status = <value optimized out>
#11 0xb7eb1e1d in ACE_Thread_Adapter::invoke_i (this=0xae17c608)
   at ../../ace/Thread_Adapter.cpp:149
       hook = 0x4548a1c3
       func = 0xb7eb0900 <ACE_Task_Base::svc_run(void*)>
       arg = 0xadc01108
       status = 0xe937ede
#12 0xb7eb1e96 in ACE_Thread_Adapter::invoke (this=0xae17c608)
   at ../../ace/Thread_Adapter.cpp:98
       exit_hook_instance = 0x8f93070
       exit_hook_maybe = {instance_ = 0x0}
       exit_hook_ptr = <value optimized out>
#13 0xb7e0f0d1 in ace_thread_adapter (args=0xae17c608)
   at ../../ace/Base_Thread_Adapter.cpp:124
       status = 0xe937ede
#14 0xb78504c0 in start_thread () from /lib/i686/cmov/libpthread.so.0
No symbol table info available.
#15 0xb76ad6de in clone () from /lib/i686/cmov/libc.so.6
No symbol table info available.

Link to comment
Share on other sites

  • 2 weeks later...

well you might want to look at

#2  Object::BuildUpdateDataForPlayer (this=0xa9fed58, pl=0xa0567390,
   update_players=...) at ../../../src/game/Object.cpp:1059

Tbh. i dont know enough about c++ what segmentation fault in context of

Program terminated with signal 11, Segmentation fault.
#0  std::tr1::_Hashtable<Player*, std::Pair<Player* const, UpdateData>, std::allocator<std::Pair<Player* const, UpdateData> >, std::_Select1st<std::Pair<Player* const, UpdateData> >, std::equal_to<Player*>, std::tr1::hash<Player*>, std::tr1::__detail::_Mod_range_hashing, std::tr1::__detail::_Default_ranged_hash, std::tr1::__detail::_Prime_rehash_policy, false, false, true>::_M_find_node (
   this=0xa9fed58, pl=0xa0567390, update_players=...)
   at /usr/include/c++/4.3/tr1_impl/hashtable:896

But irrc segmentation fault means you try to access memory that you are not allowed to access.

Link to comment
Share on other sites

×
×
  • 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