Closed Northn closed 1 month ago
I've noticed here some calls to httplib::detail::SocketStream::~SocketStream
and it's not clear how it appeared there, there's no any reference to it within queries component
The only thing I can tell is that at the moment before the server crash, it stuck for like a 20 seconds, and there could be some issues with dynamic ticks feature. It probably could get too high for a second if I'm correct
This should be fixed now in latest release
Describe the bug Server got randomly crashed when player disconnected. It looks like a some strange race condition
To Reproduce Have no idea
Expected behavior Server should not randomly crash when player is disconnected
Screenshots and/or logs (gdb) bt
0 0xf7a8aa60 in free () from /lib32/libc.so.6
1 0xf7dcdf2c in operator delete(void*) () from /lib32/libstdc++.so.6
2 0x56673beb in std::__new_allocator::deallocate (__p=0x1f <error: Cannot access memory at address 0x1f>,
3 std::allocator_traits<std::allocator >::deallocate (__p=0x1f <error: Cannot access memory at address 0x1f>,
4 std::_Vector_base<char, std::allocator >::_M_deallocate (
5 std::_Vector_base<char, std::allocator >::~_Vector_base (this=)
6 std::vector<char, std::allocator >::~vector (this=)
7 httplib::detail::SocketStream::~SocketStream (this=0xf78df854) at /host/openmp/lib/cpp-httplib/httplib.h:4723
8 0xf61fad33 in Query::buildPlayerInfoBuffer (this=0x58765ff8, except=0xf78df854)
9 0xf62196e4 in Query::buildPlayerDependentBuffers (this=0x58765ff8, except=0xf78df854)
10 RakNetLegacyNetwork::onPlayerDisconnect (this=, player=..., reason=)
11 0xf62196e4 in non-virtual thunk to RakNetLegacyNetwork::onPlayerDisconnect(IPlayer&, PeerDisconnectReason) ()
from components/LegacyNetwork.so
12 0x566a825e in Impl::DefaultEventDispatcher::dispatch<void, IPlayer&, PeerDisconnectReason, Player&, PeerDisconnectReason&> (
13 PlayerPool::clearPlayer (this=, player=..., reason=)
--Type for more, q to quit, c to continue without paging--
at /host/openmp/Server/Source/player_pool.hpp:1791
14 0x566968f9 in PlayerPool::onPeerDisconnect (this=, peer=..., reason=) at /host/openmp/Server/Source/player_pool.hpp:1816
15 0x56697318 in non-virtual thunk to PlayerPool::onPeerDisconnect(IPlayer&, PeerDisconnectReason) () at /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/iostream:74
16 0xf6202f01 in Impl::DefaultEventDispatcher::dispatch<void, IPlayer&, PeerDisconnectReason, IPlayer&, PeerDisconnectReason&> (
17 RakNetLegacyNetwork::OnRakNetDisconnect (this=, reason=PeerDisconnectReason_Quit, rid=) at /host/openmp/Server/Components/LegacyNetwork/legacy_network_impl.cpp:520
18 RakNetLegacyNetwork::onTick (this=, elapsed=..., now=...) at /host/openmp/Server/Components/LegacyNetwork/legacy_network_impl.cpp:912
19 0xf620304b in non-virtual thunk to RakNetLegacyNetwork::onTick(std::chrono::duration<long long, std::ratio<1ll, 1000000ll> >, std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long long, std::ratio<1ll, 1000000000ll> > >) () at /host/openmp/Server/Components/LegacyNetwork/legacy_network_impl.cpp:919
20 0x56678a40 in Impl::DefaultEventDispatcher::dispatch<void, std::chrono::duration<long long, std::ratio<1ll, 1000000ll> >, std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long long, std::ratio<1ll, 1000000000ll> > >, std::chrono::duration<long long, std::ratio<1ll, 1000000ll> > const&, std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long long, std::ratio<1ll, 1000000000ll> > > const&> (this=,
21 Core::run (this=) at /host/openmp/Server/Source/core_impl.hpp:1413
22 0x566729ee in main (argc=, argv=) at /host/openmp/Server/Source/server.cpp:153
Commit hash in master 833af233c2e297524f1cd4177ee5d9f306403a67