opentibiabr / canary

Canary Server 13.x for OpenTibia community.
https://docs.opentibiabr.com/
GNU General Public License v2.0
369 stars 604 forks source link

Help with crash #550

Closed Zapotoczny closed 1 year ago

Zapotoczny commented 1 year ago

Priority

Medium

Area

What happened?

2022-10-14 19:35:56 -  Thread 2 "tfs" received signal SIGFPE, Arithmetic exception.
2022-10-14 19:35:56 -  [Switching to Thread 0x7ffff6a06700 (LWP 3143)]
2022-10-14 19:35:56 -  0x000055555583ee3b in std::_Hashtable<Creature*, Creature*, std::allocator<Creature*>, std::__detail::_Identity, std::equal_to<Creature*>, std::hash<Creature*>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, true, true> >::operator=(std::_Hashtable<Creature*, Creature*, std::allocator<Creature*>, std::__detail::_Identity, std::equal_to<Creature*>, std::hash<Creature*>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, true, true> > const&) ()
2022-10-14 19:35:56 -  
2022-10-14 19:35:56 -  Thread 4 (Thread 0x7ffff57f2700 (LWP 3145)):
2022-10-14 19:35:56 -  #0  0x00007ffff7bc1ad3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x555556226ecc <g_databaseTasks+140>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
2022-10-14 19:35:56 -          __ret = -512
2022-10-14 19:35:56 -          oldtype = 0
2022-10-14 19:35:56 -          err = <optimized out>
2022-10-14 19:35:56 -          oldtype = <optimized out>
2022-10-14 19:35:56 -          err = <optimized out>
2022-10-14 19:35:56 -          __ret = <optimized out>
2022-10-14 19:35:56 -          resultvar = <optimized out>
2022-10-14 19:35:56 -          __arg4 = <optimized out>
2022-10-14 19:35:56 -          __arg3 = <optimized out>
2022-10-14 19:35:56 -          __arg2 = <optimized out>
2022-10-14 19:35:56 -          __arg1 = <optimized out>
2022-10-14 19:35:56 -          _a4 = <optimized out>
2022-10-14 19:35:56 -          _a3 = <optimized out>
2022-10-14 19:35:56 -          _a2 = <optimized out>
2022-10-14 19:35:56 -          _a1 = <optimized out>
2022-10-14 19:35:56 -  #1  __pthread_cond_wait_common (abstime=0x0, mutex=0x555556226e78 <g_databaseTasks+56>, cond=0x555556226ea0 <g_databaseTasks+96>) at pthread_cond_wait.c:502
2022-10-14 19:35:56 -          spin = 0
2022-10-14 19:35:56 -          buffer = {__routine = 0x7ffff7bc1770 <__condvar_cleanup_waiting>, __arg = 0x7ffff57f1d00, __canceltype = -138676142, __prev = 0x0}
2022-10-14 19:35:56 -          cbuffer = {wseq = 363, cond = 0x555556226ea0 <g_databaseTasks+96>, mutex = 0x555556226e78 <g_databaseTasks+56>, private = 0}
2022-10-14 19:35:56 -          rt = <optimized out>
2022-10-14 19:35:56 -          err = <optimized out>
2022-10-14 19:35:56 -          g = 1
2022-10-14 19:35:56 -          flags = <optimized out>
2022-10-14 19:35:56 -          g1_start = <optimized out>
2022-10-14 19:35:56 -          signals = <optimized out>
2022-10-14 19:35:56 -          result = 0
2022-10-14 19:35:56 -          wseq = <optimized out>
2022-10-14 19:35:56 -          seq = 181
2022-10-14 19:35:56 -          private = <optimized out>
2022-10-14 19:35:56 -          maxspin = <optimized out>
2022-10-14 19:35:56 -          err = <optimized out>
2022-10-14 19:35:56 -          result = <optimized out>
2022-10-14 19:35:56 -          wseq = <optimized out>
2022-10-14 19:35:56 -          g = <optimized out>
2022-10-14 19:35:56 -          seq = <optimized out>
2022-10-14 19:35:56 -          flags = <optimized out>
2022-10-14 19:35:56 -          private = <optimized out>
2022-10-14 19:35:56 -          signals = <optimized out>
2022-10-14 19:35:56 -          g1_start = <optimized out>
2022-10-14 19:35:56 -          spin = <optimized out>
2022-10-14 19:35:56 -          buffer = <optimized out>
2022-10-14 19:35:56 -          cbuffer = <optimized out>
2022-10-14 19:35:56 -          rt = <optimized out>
2022-10-14 19:35:56 -          s = <optimized out>
2022-10-14 19:35:56 -  #2  __pthread_cond_wait (cond=0x555556226ea0 <g_databaseTasks+96>, mutex=0x555556226e78 <g_databaseTasks+56>) at pthread_cond_wait.c:655
2022-10-14 19:35:56 -  No locals.
2022-10-14 19:35:56 -  #3  0x00007ffff73408bc in std::condition_variable::wait(std::unique_lock<std::mutex>&) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
2022-10-14 19:35:56 -  No symbol table info available.
2022-10-14 19:35:56 -  #4  0x00005555558518fb in DatabaseTasks::threadMain() ()
2022-10-14 19:35:56 -  No symbol table info available.
2022-10-14 19:35:56 -  #5  0x00007ffff73466df in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
2022-10-14 19:35:56 -  No symbol table info available.
2022-10-14 19:35:56 -  #6  0x00007ffff7bbb6db in start_thread (arg=0x7ffff57f2700) at pthread_create.c:463
2022-10-14 19:35:56 -          pd = 0x7ffff57f2700
2022-10-14 19:35:56 -          now = <optimized out>
2022-10-14 19:35:56 -          unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140737312139008, 3036223917881688298, 140737312137088, 0, 140737220043440, 140737331085568, -3036200827025751830, -3036205812136148758}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
2022-10-14 19:35:56 -          not_first_call = <optimized out>
2022-10-14 19:35:56 -  #7  0x00007ffff6da161f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
2022-10-14 19:35:56 -  No locals.
2022-10-14 19:35:56 -  
2022-10-14 19:35:56 -  Thread 3 (Thread 0x7ffff6205700 (LWP 3144)):
2022-10-14 19:35:56 -  #0  0x00007ffff7bc2065 in futex_abstimed_wait_cancelable (private=<optimized out>, abstime=0x7ffff6204e40, expected=0, futex_word=0x55555622720c <g_scheduler+108>) at ../sysdeps/unix/sysv/linux/futex-internal.h:205
2022-10-14 19:35:56 -          __ret = -516
2022-10-14 19:35:56 -          oldtype = 0
2022-10-14 19:35:56 -          err = <optimized out>
2022-10-14 19:35:56 -          oldtype = <optimized out>
2022-10-14 19:35:56 -          err = <optimized out>
2022-10-14 19:35:56 -          __ret = <optimized out>
2022-10-14 19:35:56 -          resultvar = <optimized out>
2022-10-14 19:35:56 -          __arg6 = <optimized out>
2022-10-14 19:35:56 -          __arg5 = <optimized out>
2022-10-14 19:35:56 -          __arg4 = <optimized out>
2022-10-14 19:35:56 -          __arg3 = <optimized out>
2022-10-14 19:35:56 -          __arg2 = <optimized out>
2022-10-14 19:35:56 -          __arg1 = <optimized out>
2022-10-14 19:35:56 -          _a6 = <optimized out>
2022-10-14 19:35:56 -          _a5 = <optimized out>
2022-10-14 19:35:56 -          _a4 = <optimized out>
2022-10-14 19:35:56 -          _a3 = <optimized out>
2022-10-14 19:35:56 -          _a2 = <optimized out>
2022-10-14 19:35:56 -          _a1 = <optimized out>
2022-10-14 19:35:56 -  #1  __pthread_cond_wait_common (abstime=0x7ffff6204e40, mutex=0x5555562271b8 <g_scheduler+24>, cond=0x5555562271e0 <g_scheduler+64>) at pthread_cond_wait.c:539
2022-10-14 19:35:56 -          spin = 0
2022-10-14 19:35:56 -          buffer = {__routine = 0x7ffff7bc1770 <__condvar_cleanup_waiting>, __arg = 0x7ffff6204dc0, __canceltype = 1445251904, __prev = 0x0}
2022-10-14 19:35:56 -          cbuffer = {wseq = 14475073, cond = 0x5555562271e0 <g_scheduler+64>, mutex = 0x5555562271b8 <g_scheduler+24>, private = 0}
2022-10-14 19:35:56 -          err = <optimized out>
2022-10-14 19:35:56 -          g = 1
2022-10-14 19:35:56 -          flags = <optimized out>
2022-10-14 19:35:56 -          g1_start = <optimized out>
2022-10-14 19:35:56 -          maxspin = 0
2022-10-14 19:35:56 -          signals = <optimized out>
2022-10-14 19:35:56 -          result = 0
2022-10-14 19:35:56 -          wseq = <optimized out>
2022-10-14 19:35:56 -          seq = 7237536
2022-10-14 19:35:56 -          private = <optimized out>
2022-10-14 19:35:56 -          maxspin = <optimized out>
2022-10-14 19:35:56 -          err = <optimized out>
2022-10-14 19:35:56 -          result = <optimized out>
2022-10-14 19:35:56 -          wseq = <optimized out>
2022-10-14 19:35:56 -          g = <optimized out>
2022-10-14 19:35:56 -          seq = <optimized out>
2022-10-14 19:35:56 -          flags = <optimized out>
2022-10-14 19:35:56 -          private = <optimized out>
2022-10-14 19:35:56 -          signals = <optimized out>
2022-10-14 19:35:56 -          g1_start = <optimized out>
2022-10-14 19:35:56 -          spin = <optimized out>
2022-10-14 19:35:56 -          buffer = <optimized out>
2022-10-14 19:35:56 -          cbuffer = <optimized out>
2022-10-14 19:35:56 -          rt = <optimized out>
2022-10-14 19:35:56 -          s = <optimized out>
2022-10-14 19:35:56 -  #2  __pthread_cond_timedwait (cond=0x5555562271e0 <g_scheduler+64>, mutex=0x5555562271b8 <g_scheduler+24>, abstime=0x7ffff6204e40) at pthread_cond_wait.c:667
2022-10-14 19:35:56 -  No locals.
2022-10-14 19:35:56 -  #3  0x00005555558d48a7 in Scheduler::threadMain() ()
2022-10-14 19:35:56 -  No symbol table info available.
2022-10-14 19:35:56 -  #4  0x00007ffff73466df in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
2022-10-14 19:35:56 -  No symbol table info available.
2022-10-14 19:35:56 -  #5  0x00007ffff7bbb6db in start_thread (arg=0x7ffff6205700) at pthread_create.c:463
2022-10-14 19:35:56 -          pd = 0x7ffff6205700
2022-10-14 19:35:56 -          now = <optimized out>
2022-10-14 19:35:56 -          unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140737322702592, 3036223917881688298, 140737322700672, 0, 93825005917552, 140737488345376, -3036207001578110742, -3036205812136148758}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
2022-10-14 19:35:56 -          not_first_call = <optimized out>
2022-10-14 19:35:57 -  #6  0x00007ffff6da161f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
2022-10-14 19:35:57 -  No locals.
2022-10-14 19:35:57 -  
2022-10-14 19:35:57 -  Thread 2 (Thread 0x7ffff6a06700 (LWP 3143)):
2022-10-14 19:35:57 -  #0  0x000055555583ee3b in std::_Hashtable<Creature*, Creature*, std::allocator<Creature*>, std::__detail::_Identity, std::equal_to<Creature*>, std::hash<Creature*>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, true, true> >::operator=(std::_Hashtable<Creature*, Creature*, std::allocator<Creature*>, std::__detail::_Identity, std::equal_to<Creature*>, std::hash<Creature*>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, true, true> > const&) ()
2022-10-14 19:35:57 -  No symbol table info available.
2022-10-14 19:35:57 -  #1  0x000055555573abd7 in Map::getSpectators(std::unordered_set<Creature*, std::hash<Creature*>, std::equal_to<Creature*>, std::allocator<Creature*> >&, Position const&, bool, bool, int, int, int, int) [clone .part.439] ()
2022-10-14 19:35:57 -  No symbol table info available.
2022-10-14 19:35:57 -  #2  0x000055555573b462 in Map::moveCreature(Creature&, Tile&, bool) ()
2022-10-14 19:35:57 -  No symbol table info available.
2022-10-14 19:35:57 -  #3  0x000055555584ebd4 in Game::internalMoveCreature(Creature&, Tile&, unsigned int) ()
2022-10-14 19:35:57 -  No symbol table info available.
2022-10-14 19:35:57 -  #4  0x00005555557703b1 in Monster::onCreatureWalk() ()
2022-10-14 19:35:57 -  No symbol table info available.
2022-10-14 19:35:57 -  #5  0x00005555558406a4 in Game::checkCreatureWalk(unsigned int) ()
2022-10-14 19:35:57 -  No symbol table info available.
2022-10-14 19:35:57 -  #6  0x00005555558d469f in Dispatcher::threadMain() ()
2022-10-14 19:35:57 -  No symbol table info available.
2022-10-14 19:35:57 -  #7  0x00007ffff73466df in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
2022-10-14 19:35:57 -  No symbol table info available.
2022-10-14 19:35:57 -  #8  0x00007ffff7bbb6db in start_thread (arg=0x7ffff6a06700) at pthread_create.c:463
2022-10-14 19:35:57 -          pd = 0x7ffff6a06700
2022-10-14 19:35:57 -          now = <optimized out>
2022-10-14 19:35:57 -          unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140737331095296, 3036223917881688298, 140737331093376, 0, 93825005914144, 140737488345376, -3036208100552867606, -3036205812136148758}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
2022-10-14 19:35:57 -          not_first_call = <optimized out>
2022-10-14 19:35:57 -  #9  0x00007ffff6da161f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
2022-10-14 19:35:57 -  No locals.
2022-10-14 19:35:57 -  
2022-10-14 19:35:57 -  Thread 1 (Thread 0x7ffff7fe1780 (LWP 3139)):
2022-10-14 19:35:57 -  #0  0x00007ffff6da1947 in epoll_wait (epfd=4, events=0x7fffffffd230, maxevents=128, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
2022-10-14 19:35:57 -          resultvar = 18446744073709551612
2022-10-14 19:35:57 -          sc_cancel_oldtype = 0
2022-10-14 19:35:57 -          sc_ret = <optimized out>
2022-10-14 19:35:57 -  #1  0x00005555557671b9 in boost::asio::detail::epoll_reactor::run(long, boost::asio::detail::op_queue<boost::asio::detail::scheduler_operation>&) [clone .lto_priv.2072] ()
2022-10-14 19:35:57 -  No symbol table info available.
2022-10-14 19:35:57 -  #2  0x0000555555883807 in boost::asio::detail::scheduler::run(boost::system::error_code&) [clone .constprop.169] ()
2022-10-14 19:35:57 -  No symbol table info available.
2022-10-14 19:35:57 -  #3  0x0000555555674ea5 in main ()

What OS are you seeing the problem on?

Linux

Code of Conduct

beats-dh commented 1 year ago

Thread 2 "tfs" received signal SIGFPE, tfs?

Zapotoczny commented 1 year ago

Thread 2 "tfs" received signal SIGFPE, tfs?

Its just a name of file...the launch script is designed for tfs and somehow I did not change it

beats-dh commented 1 year ago

Thread 2 "tfs" received signal SIGFPE, tfs?

Its just a name of file...the launch script is designed for tfs and somehow I did not change it

OK. Which OS version? Is the base up to date? Is vcpkg up to date?

Zapotoczny commented 1 year ago

version OS Ubuntu 20 vcpkg yes src im nor sure, I develop it a bit myself, but I try to add all the changes on a regular basis

beats-dh commented 1 year ago

version OS Ubuntu 20 vcpkg yes src im nor sure, I develop it a bit myself, but I try to add all the changes on a regular basis

Check the src to really make sure it's up to date with all commits!

travisani commented 1 year ago

How to reproduce this crash?

dudantas commented 1 year ago

@Zapotoczny you can test pr: https://github.com/opentibiabr/canary/pull/742/files?

murilo09 commented 1 year ago

User has not tested the fix (#742)