Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

thread sanitizer detects issues #290

Open
malytomas opened this issue Jul 18, 2023 · 4 comments
Open

thread sanitizer detects issues #290

malytomas opened this issue Jul 18, 2023 · 4 comments

Comments

@malytomas
Copy link
Contributor

malytomas commented Jul 18, 2023

I get warnings when running my tests with thread sanitizer. For example:

unlock of an unlocked mutex (click to expand)
WARNING: ThreadSanitizer: unlock of an unlocked mutex (or by a wrong thread) (pid=12631)
    #0 pthread_mutex_unlock <null> (cage-test-core+0x8a14a) (BuildId: 2d054e7f73ebe12d4026ff49ed29c1ae2bad58fa)
    #1 __gthread_mutex_unlock(pthread_mutex_t*) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/x86_64-linux-gnu/c++/12/bits/gthr-default.h:779:12 (libcage-core.so+0x15491b3) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #2 __gthread_recursive_mutex_unlock(pthread_mutex_t*) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/x86_64-linux-gnu/c++/12/bits/gthr-default.h:832:10 (libcage-core.so+0x1549165) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #3 std::recursive_timed_mutex::unlock() /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/mutex:321:7 (libcage-core.so+0x1554c25) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #4 SteamNetworkingSocketsLib::Lock<std::recursive_timed_mutex>::unlock() /home/runner/work/cage/cage/externals/gamenetworkingsockets/GameNetworkingSockets/src/steamnetworkingsockets/clientlib/steamnetworkingsockets_lowlevel.h:478:10 (libcage-core.so+0x1487756) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #5 SteamNetworkingSocketsLib::ScopeLock<SteamNetworkingSocketsLib::TableLock>::~ScopeLock() /home/runner/work/cage/cage/externals/gamenetworkingsockets/GameNetworkingSockets/src/steamnetworkingsockets/clientlib/steamnetworkingsockets_lowlevel.h:506:41 (libcage-core.so+0x1475cec) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
renamed thread id '140321156761152' to 'steam sockets'
    #6 SteamNetworkingSocketsLib::InternalGetConnectionByHandle(unsigned int, SteamNetworkingSocketsLib::ConnectionScopeLock&, char const*, bool) /home/runner/work/cage/cage/externals/gamenetworkingsockets/GameNetworkingSockets/src/steamnetworkingsockets/clientlib/csteamnetworkingsockets.cpp:347:2 (libcage-core.so+0x14757a2) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #7 SteamNetworkingSocketsLib::GetConnectionByHandle(unsigned int, SteamNetworkingSocketsLib::ConnectionScopeLock&) /home/runner/work/cage/cage/externals/gamenetworkingsockets/GameNetworkingSockets/src/steamnetworkingsockets/clientlib/csteamnetworkingsockets.cpp:355:9 (libcage-core.so+0x14754d8) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #8 SteamNetworkingSocketsLib::CSteamNetworkingUtils::SetConfigValue(ESteamNetworkingConfigValue, ESteamNetworkingConfigScope, long, ESteamNetworkingConfigDataType, void const*) /home/runner/work/cage/cage/externals/gamenetworkingsockets/GameNetworkingSockets/src/steamnetworkingsockets/clientlib/csteamnetworkingsockets.cpp:2171:41 (libcage-core.so+0x148448d) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #9 ISteamNetworkingUtils::SetConfigValueStruct(SteamNetworkingConfigValue_t const&, ESteamNetworkingConfigScope, long) /home/runner/work/cage/cage/externals/gamenetworkingsockets/GameNetworkingSockets/src/../include/steam/isteamnetworkingutils.h:471:9 (libcage-core.so+0x149223a) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #10 SteamNetworkingSocketsLib::CSteamNetworkConnectionBase::BInitConnection(long long, int, SteamNetworkingConfigValue_t const*, char (&) [1024]) /home/runner/work/cage/cage/externals/gamenetworkingsockets/GameNetworkingSockets/src/steamnetworkingsockets/clientlib/steamnetworkingsockets_connections.cpp:956:71 (libcage-core.so+0x14998a2) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #11 SteamNetworkingSocketsLib::CSteamNetworkConnectionUDP::BInitConnect(SteamNetworkingIPAddr const&, int, SteamNetworkingConfigValue_t const*, char (&) [1024]) /home/runner/work/cage/cage/externals/gamenetworkingsockets/GameNetworkingSockets/src/steamnetworkingsockets/clientlib/steamnetworkingsockets_udp.cpp:1171:37 (libcage-core.so+0x147c3ed) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #12 SteamNetworkingSocketsLib::CSteamNetworkingSockets::ConnectByIPAddress(SteamNetworkingIPAddr const&, int, SteamNetworkingConfigValue_t const*) /home/runner/work/cage/cage/externals/gamenetworkingsockets/GameNetworkingSockets/src/steamnetworkingsockets/clientlib/csteamnetworkingsockets.cpp:1117:15 (libcage-core.so+0x147bfc1) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #13 cage::(anonymous namespace)::GinnelConnectionImpl::GinnelConnectionImpl(cage::detail::StringBase<1019u> const&, unsigned short) /home/runner/work/cage/cage/sources/libcore/network/gamenetworkingsockets.cpp:120:23 (libcage-core.so+0x871eaf) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #14 cage::Holder<cage::(anonymous namespace)::GinnelConnectionImpl> cage::MemoryArena::createHolder<cage::(anonymous namespace)::GinnelConnectionImpl, cage::detail::StringBase<1019u>, unsigned short>(cage::detail::StringBase<1019u>, unsigned short)::Ctrl::Ctrl(cage::detail::StringBase<1019u>, unsigned short) /home/runner/work/cage/cage/sources/include/cage-core/core.h:1020:22 (libcage-core.so+0x871d0a) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #15 cage::(anonymous namespace)::GinnelConnectionImpl* cage::MemoryArena::createObject<cage::Holder<cage::(anonymous namespace)::GinnelConnectionImpl> cage::MemoryArena::createHolder<cage::(anonymous namespace)::GinnelConnectionImpl, cage::detail::StringBase<1019u>, unsigned short>(cage::detail::StringBase<1019u>, unsigned short)::Ctrl, cage::detail::StringBase<1019u>, unsigned short>(cage::detail::StringBase<1019u>, unsigned short) /home/runner/work/cage/cage/sources/include/cage-core/core.h:1006:50 (libcage-core.so+0x86ee1c) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #16 cage::Holder<cage::(anonymous namespace)::GinnelConnectionImpl> cage::MemoryArena::createHolder<cage::(anonymous namespace)::GinnelConnectionImpl, cage::detail::StringBase<1019u>, unsigned short>(cage::detail::StringBase<1019u>, unsigned short) /home/runner/work/cage/cage/sources/include/cage-core/core.h:1023:14 (libcage-core.so+0x86ee1c)
    #17 cage::Holder<cage::GinnelConnection> cage::MemoryArena::createImpl<cage::GinnelConnection, cage::(anonymous namespace)::GinnelConnectionImpl, cage::detail::StringBase<1019u>, unsigned short>(cage::detail::StringBase<1019u>, unsigned short) /home/runner/work/cage/cage/sources/include/cage-core/core.h:1032:11 (libcage-core.so+0x86ee1c)
    #18 cage::newGinnelConnection(cage::detail::StringBase<1019u> const&, unsigned short) /home/runner/work/cage/cage/sources/libcore/network/gamenetworkingsockets.cpp:327:25 (libcage-core.so+0x86ee1c)
    #19 (anonymous namespace)::ClientImpl::ClientImpl() /home/runner/work/cage/cage/sources/test-core/networkGinnel.cpp:89:10 (cage-test-core+0x74fa25) (BuildId: 2d054e7f73ebe12d4026ff49ed29c1ae2bad58fa)
    #20 (anonymous namespace)::ClientImpl::entry() /home/runner/work/cage/cage/sources/test-core/networkGinnel.cpp:125:15 (cage-test-core+0x74f629) (BuildId: 2d054e7f73ebe12d4026ff49ed29c1ae2bad58fa)
    #21 cage::Delegate<void ()>& cage::Delegate<void ()>::bind<&((anonymous namespace)::ClientImpl::entry())>()::'lambda'(void*)::operator()(void*) const /home/runner/work/cage/cage/sources/include/cage-core/core.h:762:45 (cage-test-core+0x751d1d) (BuildId: 2d054e7f73ebe12d4026ff49ed29c1ae2bad58fa)
    #22 cage::Delegate<void ()>& cage::Delegate<void ()>::bind<&((anonymous namespace)::ClientImpl::entry())>()::'lambda'(void*)::__invoke(void*) /home/runner/work/cage/cage/sources/include/cage-core/core.h:762:11 (cage-test-core+0x751cc5) (BuildId: 2d054e7f73ebe12d4026ff49ed29c1ae2bad58fa)
    #23 cage::Delegate<void ()>::operator()() const /home/runner/work/cage/cage/sources/include/cage-core/core.h:808:11 (libcage-core.so+0x2108d0) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #24 cage::(anonymous namespace)::threadFunctionImpl(void*) /home/runner/work/cage/cage/sources/libcore/concurrent/concurrent.cpp:648:5 (libcage-core.so+0x2108d0)

  Location is global 'SteamNetworkingSocketsLib::g_tables_lock' of size 56 at 0x7f9f1c3d6ee0 (libcage-core.so+0x2896ef0)

  Mutex M0 (0x7f9f1c3d6ef0) created at:
    #0 pthread_mutex_lock <null> (cage-test-core+0x89faa) (BuildId: 2d054e7f73ebe12d4026ff49ed29c1ae2bad58fa)
    #1 __gthread_mutex_lock(pthread_mutex_t*) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/x86_64-linux-gnu/c++/12/bits/gthr-default.h:749:12 (libcage-core.so+0x1549103) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #2 __gthread_recursive_mutex_lock(pthread_mutex_t*) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/x86_64-linux-gnu/c++/12/bits/gthr-default.h:811:10 (libcage-core.so+0x15490b5) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #3 std::recursive_timed_mutex::lock() /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/mutex:293:17 (libcage-core.so+0x1556355) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #4 SteamNetworkingSocketsLib::Lock<std::recursive_timed_mutex>::lock(char const*) /home/runner/work/cage/cage/externals/gamenetworkingsockets/GameNetworkingSockets/src/steamnetworkingsockets/clientlib/steamnetworkingsockets_lowlevel.h:472:10 (libcage-core.so+0x1488524) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #5 SteamNetworkingSocketsLib::ScopeLock<SteamNetworkingSocketsLib::TableLock>::ScopeLock(SteamNetworkingSocketsLib::TableLock&, char const*) /home/runner/work/cage/cage/externals/gamenetworkingsockets/GameNetworkingSockets/src/steamnetworkingsockets/clientlib/steamnetworkingsockets_lowlevel.h:505:90 (libcage-core.so+0x1475a21) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #6 SteamNetworkingSocketsLib::CSteamNetworkConnectionBase::BInitConnection(long long, int, SteamNetworkingConfigValue_t const*, char (&) [1024]) /home/runner/work/cage/cage/externals/gamenetworkingsockets/GameNetworkingSockets/src/steamnetworkingsockets/clientlib/steamnetworkingsockets_connections.cpp:901:18 (libcage-core.so+0x14995ca) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #7 SteamNetworkingSocketsLib::CSteamNetworkConnectionUDP::BInitConnect(SteamNetworkingIPAddr const&, int, SteamNetworkingConfigValue_t const*, char (&) [1024]) /home/runner/work/cage/cage/externals/gamenetworkingsockets/GameNetworkingSockets/src/steamnetworkingsockets/clientlib/steamnetworkingsockets_udp.cpp:1171:37 (libcage-core.so+0x147c3ed) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #8 SteamNetworkingSocketsLib::CSteamNetworkingSockets::ConnectByIPAddress(SteamNetworkingIPAddr const&, int, SteamNetworkingConfigValue_t const*) /home/runner/work/cage/cage/externals/gamenetworkingsockets/GameNetworkingSockets/src/steamnetworkingsockets/clientlib/csteamnetworkingsockets.cpp:1117:15 (libcage-core.so+0x147bfc1) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #9 cage::(anonymous namespace)::GinnelConnectionImpl::GinnelConnectionImpl(cage::detail::StringBase<1019u> const&, unsigned short) /home/runner/work/cage/cage/sources/libcore/network/gamenetworkingsockets.cpp:120:23 (libcage-core.so+0x871eaf) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #10 cage::Holder<cage::(anonymous namespace)::GinnelConnectionImpl> cage::MemoryArena::createHolder<cage::(anonymous namespace)::GinnelConnectionImpl, cage::detail::StringBase<1019u>, unsigned short>(cage::detail::StringBase<1019u>, unsigned short)::Ctrl::Ctrl(cage::detail::StringBase<1019u>, unsigned short) /home/runner/work/cage/cage/sources/include/cage-core/core.h:1020:22 (libcage-core.so+0x871d0a) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #11 cage::(anonymous namespace)::GinnelConnectionImpl* cage::MemoryArena::createObject<cage::Holder<cage::(anonymous namespace)::GinnelConnectionImpl> cage::MemoryArena::createHolder<cage::(anonymous namespace)::GinnelConnectionImpl, cage::detail::StringBase<1019u>, unsigned short>(cage::detail::StringBase<1019u>, unsigned short)::Ctrl, cage::detail::StringBase<1019u>, unsigned short>(cage::detail::StringBase<1019u>, unsigned short) /home/runner/work/cage/cage/sources/include/cage-core/core.h:1006:50 (libcage-core.so+0x86ee1c) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #12 cage::Holder<cage::(anonymous namespace)::GinnelConnectionImpl> cage::MemoryArena::createHolder<cage::(anonymous namespace)::GinnelConnectionImpl, cage::detail::StringBase<1019u>, unsigned short>(cage::detail::StringBase<1019u>, unsigned short) /home/runner/work/cage/cage/sources/include/cage-core/core.h:1023:14 (libcage-core.so+0x86ee1c)
    #13 cage::Holder<cage::GinnelConnection> cage::MemoryArena::createImpl<cage::GinnelConnection, cage::(anonymous namespace)::GinnelConnectionImpl, cage::detail::StringBase<1019u>, unsigned short>(cage::detail::StringBase<1019u>, unsigned short) /home/runner/work/cage/cage/sources/include/cage-core/core.h:1032:11 (libcage-core.so+0x86ee1c)
    #14 cage::newGinnelConnection(cage::detail::StringBase<1019u> const&, unsigned short) /home/runner/work/cage/cage/sources/libcore/network/gamenetworkingsockets.cpp:327:25 (libcage-core.so+0x86ee1c)
    #15 (anonymous namespace)::ClientImpl::ClientImpl() /home/runner/work/cage/cage/sources/test-core/networkGinnel.cpp:89:10 (cage-test-core+0x74fa25) (BuildId: 2d054e7f73ebe12d4026ff49ed29c1ae2bad58fa)
    #16 (anonymous namespace)::ClientImpl::entry() /home/runner/work/cage/cage/sources/test-core/networkGinnel.cpp:125:15 (cage-test-core+0x74f629) (BuildId: 2d054e7f73ebe12d4026ff49ed29c1ae2bad58fa)
    #17 cage::Delegate<void ()>& cage::Delegate<void ()>::bind<&((anonymous namespace)::ClientImpl::entry())>()::'lambda'(void*)::operator()(void*) const /home/runner/work/cage/cage/sources/include/cage-core/core.h:762:45 (cage-test-core+0x751d1d) (BuildId: 2d054e7f73ebe12d4026ff49ed29c1ae2bad58fa)
    #18 cage::Delegate<void ()>& cage::Delegate<void ()>::bind<&((anonymous namespace)::ClientImpl::entry())>()::'lambda'(void*)::__invoke(void*) /home/runner/work/cage/cage/sources/include/cage-core/core.h:762:11 (cage-test-core+0x751cc5) (BuildId: 2d054e7f73ebe12d4026ff49ed29c1ae2bad58fa)
    #19 cage::Delegate<void ()>::operator()() const /home/runner/work/cage/cage/sources/include/cage-core/core.h:808:11 (libcage-core.so+0x2108d0) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #20 cage::(anonymous namespace)::threadFunctionImpl(void*) /home/runner/work/cage/cage/sources/libcore/concurrent/concurrent.cpp:648:5 (libcage-core.so+0x2108d0)

SUMMARY: ThreadSanitizer: unlock of an unlocked mutex (or by a wrong thread) (/home/runner/work/cage/cage/build/result/debug/cage-test-core+0x8a14a) (BuildId: 2d054e7f73ebe12d4026ff49ed29c1ae2bad58fa) in __interceptor_pthread_mutex_unlock
data race (click to expand)
WARNING: ThreadSanitizer: data race (pid=12631)
  Read of size 8 at 0x7b70000406d0 by thread T163 (mutexes: write M0):
    #0 std::vector<SteamNetworkingSocketsLib::CSteamNetworkingSockets::QueuedCallback, std::allocator<SteamNetworkingSocketsLib::CSteamNetworkingSockets::QueuedCallback> >::size() const /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_vector.h:988:40 (libcage-core.so+0x155206d) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #1 int len<std::vector<SteamNetworkingSocketsLib::CSteamNetworkingSockets::QueuedCallback, std::allocator<SteamNetworkingSocketsLib::CSteamNetworkingSockets::QueuedCallback> > >(std::vector<SteamNetworkingSocketsLib::CSteamNetworkingSockets::QueuedCallback, std::allocator<SteamNetworkingSocketsLib::CSteamNetworkingSockets::QueuedCallback> > const&) /home/runner/work/cage/cage/externals/gamenetworkingsockets/GameNetworkingSockets/src/tier0/../steamnetworkingsockets/clientlib/../steamnetworkingsockets_internal.h:1182:18 (libcage-core.so+0x14835c5) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #2 SteamNetworkingSocketsLib::CSteamNetworkingSockets::InternalQueueCallback(int, int, void const*, void*) /home/runner/work/cage/cage/externals/gamenetworkingsockets/GameNetworkingSockets/src/steamnetworkingsockets/clientlib/csteamnetworkingsockets.cpp:1708:2 (libcage-core.so+0x14834d6) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #3 void SteamNetworkingSocketsLib::CSteamNetworkingSockets::QueueCallback<SteamNetConnectionStatusChangedCallback_t>(SteamNetConnectionStatusChangedCallback_t const&, void*) /home/runner/work/cage/cage/externals/gamenetworkingsockets/GameNetworkingSockets/src/tier0/../steamnetworkingsockets/clientlib/csteamnetworkingsockets.h:79:3 (libcage-core.so+0x14a6850) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #4 SteamNetworkingSocketsLib::CSteamNetworkConnectionBase::PostConnectionStateChangedCallback(ESteamNetworkingConnectionState, ESteamNetworkingConnectionState) /home/runner/work/cage/cage/externals/gamenetworkingsockets/GameNetworkingSockets/src/steamnetworkingsockets/clientlib/steamnetworkingsockets_connections.cpp:2814:39 (libcage-core.so+0x14a5722) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #5 SteamNetworkingSocketsLib::CSteamNetworkConnectionBase::SetState(ESteamNetworkingConnectionState, long long) /home/runner/work/cage/cage/externals/gamenetworkingsockets/GameNetworkingSockets/src/steamnetworkingsockets/clientlib/steamnetworkingsockets_connections.cpp:2532:5 (libcage-core.so+0x149852e) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #6 SteamNetworkingSocketsLib::CSteamNetworkConnectionBase::BConnectionState_Connecting(long long, char (&) [1024]) /home/runner/work/cage/cage/externals/gamenetworkingsockets/GameNetworkingSockets/src/steamnetworkingsockets/clientlib/steamnetworkingsockets_connections.cpp:3215:2 (libcage-core.so+0x14a6bfb) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #7 SteamNetworkingSocketsLib::CSteamNetworkConnectionUDP::BInitConnect(SteamNetworkingIPAddr const&, int, SteamNetworkingConfigValue_t const*, char (&) [1024]) /home/runner/work/cage/cage/externals/gamenetworkingsockets/GameNetworkingSockets/src/steamnetworkingsockets/clientlib/steamnetworkingsockets_udp.cpp:1178:9 (libcage-core.so+0x147c430) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #8 SteamNetworkingSocketsLib::CSteamNetworkingSockets::ConnectByIPAddress(SteamNetworkingIPAddr const&, int, SteamNetworkingConfigValue_t const*) /home/runner/work/cage/cage/externals/gamenetworkingsockets/GameNetworkingSockets/src/steamnetworkingsockets/clientlib/csteamnetworkingsockets.cpp:1117:15 (libcage-core.so+0x147bfc1) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #9 cage::(anonymous namespace)::GinnelConnectionImpl::GinnelConnectionImpl(cage::detail::StringBase<1019u> const&, unsigned short) /home/runner/work/cage/cage/sources/libcore/network/gamenetworkingsockets.cpp:120:23 (libcage-core.so+0x871eaf) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #10 cage::Holder<cage::(anonymous namespace)::GinnelConnectionImpl> cage::MemoryArena::createHolder<cage::(anonymous namespace)::GinnelConnectionImpl, cage::detail::StringBase<1019u>, unsigned short>(cage::detail::StringBase<1019u>, unsigned short)::Ctrl::Ctrl(cage::detail::StringBase<1019u>, unsigned short) /home/runner/work/cage/cage/sources/include/cage-core/core.h:1020:22 (libcage-core.so+0x871d0a) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #11 cage::(anonymous namespace)::GinnelConnectionImpl* cage::MemoryArena::createObject<cage::Holder<cage::(anonymous namespace)::GinnelConnectionImpl> cage::MemoryArena::createHolder<cage::(anonymous namespace)::GinnelConnectionImpl, cage::detail::StringBase<1019u>, unsigned short>(cage::detail::StringBase<1019u>, unsigned short)::Ctrl, cage::detail::StringBase<1019u>, unsigned short>(cage::detail::StringBase<1019u>, unsigned short) /home/runner/work/cage/cage/sources/include/cage-core/core.h:1006:50 (libcage-core.so+0x86ee1c) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #12 cage::Holder<cage::(anonymous namespace)::GinnelConnectionImpl> cage::MemoryArena::createHolder<cage::(anonymous namespace)::GinnelConnectionImpl, cage::detail::StringBase<1019u>, unsigned short>(cage::detail::StringBase<1019u>, unsigned short) /home/runner/work/cage/cage/sources/include/cage-core/core.h:1023:14 (libcage-core.so+0x86ee1c)
    #13 cage::Holder<cage::GinnelConnection> cage::MemoryArena::createImpl<cage::GinnelConnection, cage::(anonymous namespace)::GinnelConnectionImpl, cage::detail::StringBase<1019u>, unsigned short>(cage::detail::StringBase<1019u>, unsigned short) /home/runner/work/cage/cage/sources/include/cage-core/core.h:1032:11 (libcage-core.so+0x86ee1c)
    #14 cage::newGinnelConnection(cage::detail::StringBase<1019u> const&, unsigned short) /home/runner/work/cage/cage/sources/libcore/network/gamenetworkingsockets.cpp:327:25 (libcage-core.so+0x86ee1c)
    #15 (anonymous namespace)::ClientImpl::ClientImpl() /home/runner/work/cage/cage/sources/test-core/networkGinnel.cpp:89:10 (cage-test-core+0x74fa25) (BuildId: 2d054e7f73ebe12d4026ff49ed29c1ae2bad58fa)
    #16 (anonymous namespace)::ClientImpl::entry() /home/runner/work/cage/cage/sources/test-core/networkGinnel.cpp:125:15 (cage-test-core+0x74f629) (BuildId: 2d054e7f73ebe12d4026ff49ed29c1ae2bad58fa)
    #17 cage::Delegate<void ()>& cage::Delegate<void ()>::bind<&((anonymous namespace)::ClientImpl::entry())>()::'lambda'(void*)::operator()(void*) const /home/runner/work/cage/cage/sources/include/cage-core/core.h:762:45 (cage-test-core+0x751d1d) (BuildId: 2d054e7f73ebe12d4026ff49ed29c1ae2bad58fa)
    #18 cage::Delegate<void ()>& cage::Delegate<void ()>::bind<&((anonymous namespace)::ClientImpl::entry())>()::'lambda'(void*)::__invoke(void*) /home/runner/work/cage/cage/sources/include/cage-core/core.h:762:11 (cage-test-core+0x751cc5) (BuildId: 2d054e7f73ebe12d4026ff49ed29c1ae2bad58fa)
    #19 cage::Delegate<void ()>::operator()() const /home/runner/work/cage/cage/sources/include/cage-core/core.h:808:11 (libcage-core.so+0x2108d0) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #20 cage::(anonymous namespace)::threadFunctionImpl(void*) /home/runner/work/cage/cage/sources/libcore/concurrent/concurrent.cpp:648:5 (libcage-core.so+0x2108d0)

  Previous write of size 8 at 0x7b70000406d0 by thread T161 (mutexes: write M1):
    #0 std::_Vector_base<SteamNetworkingSocketsLib::CSteamNetworkingSockets::QueuedCallback, std::allocator<SteamNetworkingSocketsLib::CSteamNetworkingSockets::QueuedCallback> >::_Vector_impl_data::_M_copy_data(std::_Vector_base<SteamNetworkingSocketsLib::CSteamNetworkingSockets::QueuedCallback, std::allocator<SteamNetworkingSocketsLib::CSteamNetworkingSockets::QueuedCallback> >::_Vector_impl_data const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_vector.h:116:14 (libcage-core.so+0x151a616) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #1 std::_Vector_base<SteamNetworkingSocketsLib::CSteamNetworkingSockets::QueuedCallback, std::allocator<SteamNetworkingSocketsLib::CSteamNetworkingSockets::QueuedCallback> >::_Vector_impl_data::_M_swap_data(std::_Vector_base<SteamNetworkingSocketsLib::CSteamNetworkingSockets::QueuedCallback, std::allocator<SteamNetworkingSocketsLib::CSteamNetworkingSockets::QueuedCallback> >::_Vector_impl_data&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_vector.h:129:8 (libcage-core.so+0x151a4a1) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #2 std::vector<SteamNetworkingSocketsLib::CSteamNetworkingSockets::QueuedCallback, std::allocator<SteamNetworkingSocketsLib::CSteamNetworkingSockets::QueuedCallback> >::swap(std::vector<SteamNetworkingSocketsLib::CSteamNetworkingSockets::QueuedCallback, std::allocator<SteamNetworkingSocketsLib::CSteamNetworkingSockets::QueuedCallback> >&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_vector.h:1587:16 (libcage-core.so+0x14831d2) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #3 SteamNetworkingSocketsLib::CSteamNetworkingSockets::RunCallbacks() /home/runner/work/cage/cage/externals/gamenetworkingsockets/GameNetworkingSockets/src/steamnetworkingsockets/clientlib/csteamnetworkingsockets.cpp:1658:11 (libcage-core.so+0x1482fe5) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #4 cage::(anonymous namespace)::GinnelServerImpl::accept() /home/runner/work/cage/cage/sources/libcore/network/gamenetworkingsockets.cpp:220:16 (libcage-core.so+0x86e652) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #5 cage::GinnelServer::accept() /home/runner/work/cage/cage/sources/libcore/network/gamenetworkingsockets.cpp:321:16 (libcage-core.so+0x86e59d) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #6 (anonymous namespace)::ServerImpl::service() /home/runner/work/cage/cage/sources/test-core/networkGinnel.cpp:28:19 (cage-test-core+0x74ec45) (BuildId: 2d054e7f73ebe12d4026ff49ed29c1ae2bad58fa)
    #7 (anonymous namespace)::ServerImpl::entry() /home/runner/work/cage/cage/sources/test-core/networkGinnel.cpp:66:15 (cage-test-core+0x74e9ac) (BuildId: 2d054e7f73ebe12d4026ff49ed29c1ae2bad58fa)
    #8 cage::Delegate<void ()>& cage::Delegate<void ()>::bind<&((anonymous namespace)::ServerImpl::entry())>()::'lambda'(void*)::operator()(void*) const /home/runner/work/cage/cage/sources/include/cage-core/core.h:762:45 (cage-test-core+0x74f5ed) (BuildId: 2d054e7f73ebe12d4026ff49ed29c1ae2bad58fa)
    #9 cage::Delegate<void ()>& cage::Delegate<void ()>::bind<&((anonymous namespace)::ServerImpl::entry())>()::'lambda'(void*)::__invoke(void*) /home/runner/work/cage/cage/sources/include/cage-core/core.h:762:11 (cage-test-core+0x74f595) (BuildId: 2d054e7f73ebe12d4026ff49ed29c1ae2bad58fa)
    #10 cage::Delegate<void ()>::operator()() const /home/runner/work/cage/cage/sources/include/cage-core/core.h:808:11 (libcage-core.so+0x2108d0) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #11 cage::(anonymous namespace)::threadFunctionImpl(void*) /home/runner/work/cage/cage/sources/libcore/concurrent/concurrent.cpp:648:5 (libcage-core.so+0x2108d0)

  Location is heap block of size 1824 at 0x7b7000040000 allocated by thread T161:
    #0 operator new(unsigned long) <null> (cage-test-core+0xec3d6) (BuildId: 2d054e7f73ebe12d4026ff49ed29c1ae2bad58fa)
    #1 GameNetworkingSockets_Init /home/runner/work/cage/cage/externals/gamenetworkingsockets/GameNetworkingSockets/src/steamnetworkingsockets/clientlib/csteamnetworkingsockets.cpp:2448:53 (libcage-core.so+0x1486f5b) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #2 cage::(anonymous namespace)::initialize()::$_0::operator()() const /home/runner/work/cage/cage/sources/libcore/network/gamenetworkingsockets.cpp:24:10 (libcage-core.so+0x8717a4) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #3 cage::(anonymous namespace)::initialize() /home/runner/work/cage/cage/sources/libcore/network/gamenetworkingsockets.cpp:20:23 (libcage-core.so+0x86f02d) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #4 cage::newGinnelServer(unsigned short) /home/runner/work/cage/cage/sources/libcore/network/gamenetworkingsockets.cpp:332:3 (libcage-core.so+0x86f0dc) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #5 (anonymous namespace)::ServerImpl::ServerImpl() /home/runner/work/cage/cage/sources/test-core/networkGinnel.cpp:19:30 (cage-test-core+0x74ea95) (BuildId: 2d054e7f73ebe12d4026ff49ed29c1ae2bad58fa)
    #6 (anonymous namespace)::ServerImpl::entry() /home/runner/work/cage/cage/sources/test-core/networkGinnel.cpp:65:15 (cage-test-core+0x74e999) (BuildId: 2d054e7f73ebe12d4026ff49ed29c1ae2bad58fa)
    #7 cage::Delegate<void ()>& cage::Delegate<void ()>::bind<&((anonymous namespace)::ServerImpl::entry())>()::'lambda'(void*)::operator()(void*) const /home/runner/work/cage/cage/sources/include/cage-core/core.h:762:45 (cage-test-core+0x74f5ed) (BuildId: 2d054e7f73ebe12d4026ff49ed29c1ae2bad58fa)
    #8 cage::Delegate<void ()>& cage::Delegate<void ()>::bind<&((anonymous namespace)::ServerImpl::entry())>()::'lambda'(void*)::__invoke(void*) /home/runner/work/cage/cage/sources/include/cage-core/core.h:762:11 (cage-test-core+0x74f595) (BuildId: 2d054e7f73ebe12d4026ff49ed29c1ae2bad58fa)
    #9 cage::Delegate<void ()>::operator()() const /home/runner/work/cage/cage/sources/include/cage-core/core.h:808:11 (libcage-core.so+0x2108d0) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #10 cage::(anonymous namespace)::threadFunctionImpl(void*) /home/runner/work/cage/cage/sources/libcore/concurrent/concurrent.cpp:648:5 (libcage-core.so+0x2108d0)

  Mutex M0 (0x7f9f1c3d77b8) created at:
    #0 pthread_mutex_lock <null> (cage-test-core+0x89faa) (BuildId: 2d054e7f73ebe12d4026ff49ed29c1ae2bad58fa)
    #1 __gthread_mutex_lock(pthread_mutex_t*) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/x86_64-linux-gnu/c++/12/bits/gthr-default.h:749:12 (libcage-core.so+0x1549103) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #2 __gthread_recursive_mutex_lock(pthread_mutex_t*) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/x86_64-linux-gnu/c++/12/bits/gthr-default.h:811:10 (libcage-core.so+0x15490b5) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #3 std::recursive_timed_mutex::lock() /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/mutex:293:17 (libcage-core.so+0x1556355) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #4 SteamNetworkingSocketsLib::Lock<std::recursive_timed_mutex>::lock(char const*) /home/runner/work/cage/cage/externals/gamenetworkingsockets/GameNetworkingSockets/src/steamnetworkingsockets/clientlib/steamnetworkingsockets_lowlevel.h:472:10 (libcage-core.so+0x1488524) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #5 SteamNetworkingSocketsLib::SteamNetworkingGlobalLock::Lock(char const*) /home/runner/work/cage/cage/externals/gamenetworkingsockets/GameNetworkingSockets/src/steamnetworkingsockets/clientlib/steamnetworkingsockets_lowlevel.cpp:390:20 (libcage-core.so+0x158453c) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #6 SteamNetworkingSocketsLib::SteamNetworkingGlobalLock::SteamNetworkingGlobalLock(char const*) /home/runner/work/cage/cage/externals/gamenetworkingsockets/GameNetworkingSockets/src/steamnetworkingsockets/clientlib/steamnetworkingsockets_lowlevel.h:581:69 (libcage-core.so+0x14791c1) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #7 GameNetworkingSockets_Init /home/runner/work/cage/cage/externals/gamenetworkingsockets/GameNetworkingSockets/src/steamnetworkingsockets/clientlib/csteamnetworkingsockets.cpp:2438:28 (libcage-core.so+0x1486f05) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #8 cage::(anonymous namespace)::initialize()::$_0::operator()() const /home/runner/work/cage/cage/sources/libcore/network/gamenetworkingsockets.cpp:24:10 (libcage-core.so+0x8717a4) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #9 cage::(anonymous namespace)::initialize() /home/runner/work/cage/cage/sources/libcore/network/gamenetworkingsockets.cpp:20:23 (libcage-core.so+0x86f02d) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #10 cage::newGinnelServer(unsigned short) /home/runner/work/cage/cage/sources/libcore/network/gamenetworkingsockets.cpp:332:3 (libcage-core.so+0x86f0dc) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #11 (anonymous namespace)::ServerImpl::ServerImpl() /home/runner/work/cage/cage/sources/test-core/networkGinnel.cpp:19:30 (cage-test-core+0x74ea95) (BuildId: 2d054e7f73ebe12d4026ff49ed29c1ae2bad58fa)
    #12 (anonymous namespace)::ServerImpl::entry() /home/runner/work/cage/cage/sources/test-core/networkGinnel.cpp:65:15 (cage-test-core+0x74e999) (BuildId: 2d054e7f73ebe12d4026ff49ed29c1ae2bad58fa)
    #13 cage::Delegate<void ()>& cage::Delegate<void ()>::bind<&((anonymous namespace)::ServerImpl::entry())>()::'lambda'(void*)::operator()(void*) const /home/runner/work/cage/cage/sources/include/cage-core/core.h:762:45 (cage-test-core+0x74f5ed) (BuildId: 2d054e7f73ebe12d4026ff49ed29c1ae2bad58fa)
    #14 cage::Delegate<void ()>& cage::Delegate<void ()>::bind<&((anonymous namespace)::ServerImpl::entry())>()::'lambda'(void*)::__invoke(void*) /home/runner/work/cage/cage/sources/include/cage-core/core.h:762:11 (cage-test-core+0x74f595) (BuildId: 2d054e7f73ebe12d4026ff49ed29c1ae2bad58fa)
    #15 cage::Delegate<void ()>::operator()() const /home/runner/work/cage/cage/sources/include/cage-core/core.h:808:11 (libcage-core.so+0x2108d0) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #16 cage::(anonymous namespace)::threadFunctionImpl(void*) /home/runner/work/cage/cage/sources/libcore/concurrent/concurrent.cpp:648:5 (libcage-core.so+0x2108d0)

  Mutex M1 (0x7b70000406f0) created at:
    #0 pthread_mutex_lock <null> (cage-test-core+0x89faa) (BuildId: 2d054e7f73ebe12d4026ff49ed29c1ae2bad58fa)
    #1 __gthread_mutex_lock(pthread_mutex_t*) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/x86_64-linux-gnu/c++/12/bits/gthr-default.h:749:12 (libcage-core.so+0x21c8c3) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #2 std::mutex::lock() /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/std_mutex.h:100:17 (libcage-core.so+0x223e95) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #3 SteamNetworkingSocketsLib::Lock<std::mutex>::lock(char const*) /home/runner/work/cage/cage/externals/gamenetworkingsockets/GameNetworkingSockets/src/steamnetworkingsockets/clientlib/steamnetworkingsockets_lowlevel.h:472:10 (libcage-core.so+0x1473bc4) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #4 SteamNetworkingSocketsLib::CSteamNetworkingSockets::RunCallbacks() /home/runner/work/cage/cage/externals/gamenetworkingsockets/GameNetworkingSockets/src/steamnetworkingsockets/clientlib/csteamnetworkingsockets.cpp:1657:26 (libcage-core.so+0x1482fd1) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #5 cage::(anonymous namespace)::GinnelServerImpl::accept() /home/runner/work/cage/cage/sources/libcore/network/gamenetworkingsockets.cpp:220:16 (libcage-core.so+0x86e652) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #6 cage::GinnelServer::accept() /home/runner/work/cage/cage/sources/libcore/network/gamenetworkingsockets.cpp:321:16 (libcage-core.so+0x86e59d) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #7 (anonymous namespace)::ServerImpl::service() /home/runner/work/cage/cage/sources/test-core/networkGinnel.cpp:28:19 (cage-test-core+0x74ec45) (BuildId: 2d054e7f73ebe12d4026ff49ed29c1ae2bad58fa)
    #8 (anonymous namespace)::ServerImpl::entry() /home/runner/work/cage/cage/sources/test-core/networkGinnel.cpp:66:15 (cage-test-core+0x74e9ac) (BuildId: 2d054e7f73ebe12d4026ff49ed29c1ae2bad58fa)
    #9 cage::Delegate<void ()>& cage::Delegate<void ()>::bind<&((anonymous namespace)::ServerImpl::entry())>()::'lambda'(void*)::operator()(void*) const /home/runner/work/cage/cage/sources/include/cage-core/core.h:762:45 (cage-test-core+0x74f5ed) (BuildId: 2d054e7f73ebe12d4026ff49ed29c1ae2bad58fa)
    #10 cage::Delegate<void ()>& cage::Delegate<void ()>::bind<&((anonymous namespace)::ServerImpl::entry())>()::'lambda'(void*)::__invoke(void*) /home/runner/work/cage/cage/sources/include/cage-core/core.h:762:11 (cage-test-core+0x74f595) (BuildId: 2d054e7f73ebe12d4026ff49ed29c1ae2bad58fa)
    #11 cage::Delegate<void ()>::operator()() const /home/runner/work/cage/cage/sources/include/cage-core/core.h:808:11 (libcage-core.so+0x2108d0) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #12 cage::(anonymous namespace)::threadFunctionImpl(void*) /home/runner/work/cage/cage/sources/libcore/concurrent/concurrent.cpp:648:5 (libcage-core.so+0x2108d0)

  Thread T163 'client 1' (tid=12985, running) created by main thread at:
    #0 pthread_create <null> (cage-test-core+0x6c41d) (BuildId: 2d054e7f73ebe12d4026ff49ed29c1ae2bad58fa)
    #1 cage::(anonymous namespace)::ThreadImpl::ThreadImpl(cage::Delegate<void ()>, cage::detail::StringBase<1019u> const&) /home/runner/work/cage/cage/sources/libcore/concurrent/concurrent.cpp:523:9 (libcage-core.so+0x2105a0) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #2 cage::Holder<cage::(anonymous namespace)::ThreadImpl> cage::MemoryArena::createHolder<cage::(anonymous namespace)::ThreadImpl, cage::Delegate<void ()>, cage::detail::StringBase<1019u> >(cage::Delegate<void ()>, cage::detail::StringBase<1019u>)::Ctrl::Ctrl(cage::Delegate<void ()>, cage::detail::StringBase<1019u>) /home/runner/work/cage/cage/sources/include/cage-core/core.h:1020:22 (libcage-core.so+0x2101c7) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #3 cage::(anonymous namespace)::ThreadImpl* cage::MemoryArena::createObject<cage::Holder<cage::(anonymous namespace)::ThreadImpl> cage::MemoryArena::createHolder<cage::(anonymous namespace)::ThreadImpl, cage::Delegate<void ()>, cage::detail::StringBase<1019u> >(cage::Delegate<void ()>, cage::detail::StringBase<1019u>)::Ctrl, cage::Delegate<void ()>, cage::detail::StringBase<1019u> >(cage::Delegate<void ()>, cage::detail::StringBase<1019u>) /home/runner/work/cage/cage/sources/include/cage-core/core.h:1006:50 (libcage-core.so+0x20bea8) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #4 cage::Holder<cage::(anonymous namespace)::ThreadImpl> cage::MemoryArena::createHolder<cage::(anonymous namespace)::ThreadImpl, cage::Delegate<void ()>, cage::detail::StringBase<1019u> >(cage::Delegate<void ()>, cage::detail::StringBase<1019u>) /home/runner/work/cage/cage/sources/include/cage-core/core.h:1023:14 (libcage-core.so+0x20bea8)
    #5 cage::Holder<cage::Thread> cage::MemoryArena::createImpl<cage::Thread, cage::(anonymous namespace)::ThreadImpl, cage::Delegate<void ()>, cage::detail::StringBase<1019u> >(cage::Delegate<void ()>, cage::detail::StringBase<1019u>) /home/runner/work/cage/cage/sources/include/cage-core/core.h:1032:11 (libcage-core.so+0x20bea8)
    #6 cage::newThread(cage::Delegate<void ()>, cage::detail::StringBase<1019u> const&) /home/runner/work/cage/cage/sources/libcore/concurrent/concurrent.cpp:617:25 (libcage-core.so+0x20bea8)
    #7 testNetworkGinnel() /home/runner/work/cage/cage/sources/test-core/networkGinnel.cpp:140:7 (cage-test-core+0x74e5ce) (BuildId: 2d054e7f73ebe12d4026ff49ed29c1ae2bad58fa)
    #8 main /home/runner/work/cage/cage/sources/test-core/main.cpp:145:2 (cage-test-core+0x5253fb) (BuildId: 2d054e7f73ebe12d4026ff49ed29c1ae2bad58fa)

  Thread T161 'server' (tid=12983, running) created by main thread at:
    #0 pthread_create <null> (cage-test-core+0x6c41d) (BuildId: 2d054e7f73ebe12d4026ff49ed29c1ae2bad58fa)
    #1 cage::(anonymous namespace)::ThreadImpl::ThreadImpl(cage::Delegate<void ()>, cage::detail::StringBase<1019u> const&) /home/runner/work/cage/cage/sources/libcore/concurrent/concurrent.cpp:523:9 (libcage-core.so+0x2105a0) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #2 cage::Holder<cage::(anonymous namespace)::ThreadImpl> cage::MemoryArena::createHolder<cage::(anonymous namespace)::ThreadImpl, cage::Delegate<void ()>, cage::detail::StringBase<1019u> >(cage::Delegate<void ()>, cage::detail::StringBase<1019u>)::Ctrl::Ctrl(cage::Delegate<void ()>, cage::detail::StringBase<1019u>) /home/runner/work/cage/cage/sources/include/cage-core/core.h:1020:22 (libcage-core.so+0x2101c7) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #3 cage::(anonymous namespace)::ThreadImpl* cage::MemoryArena::createObject<cage::Holder<cage::(anonymous namespace)::ThreadImpl> cage::MemoryArena::createHolder<cage::(anonymous namespace)::ThreadImpl, cage::Delegate<void ()>, cage::detail::StringBase<1019u> >(cage::Delegate<void ()>, cage::detail::StringBase<1019u>)::Ctrl, cage::Delegate<void ()>, cage::detail::StringBase<1019u> >(cage::Delegate<void ()>, cage::detail::StringBase<1019u>) /home/runner/work/cage/cage/sources/include/cage-core/core.h:1006:50 (libcage-core.so+0x20bea8) (BuildId: 07bedf7459873544c88c4364bc1a4e91d40f8d76)
    #4 cage::Holder<cage::(anonymous namespace)::ThreadImpl> cage::MemoryArena::createHolder<cage::(anonymous namespace)::ThreadImpl, cage::Delegate<void ()>, cage::detail::StringBase<1019u> >(cage::Delegate<void ()>, cage::detail::StringBase<1019u>) /home/runner/work/cage/cage/sources/include/cage-core/core.h:1023:14 (libcage-core.so+0x20bea8)
    #5 cage::Holder<cage::Thread> cage::MemoryArena::createImpl<cage::Thread, cage::(anonymous namespace)::ThreadImpl, cage::Delegate<void ()>, cage::detail::StringBase<1019u> >(cage::Delegate<void ()>, cage::detail::StringBase<1019u>) /home/runner/work/cage/cage/sources/include/cage-core/core.h:1032:11 (libcage-core.so+0x20bea8)
    #6 cage::newThread(cage::Delegate<void ()>, cage::detail::StringBase<1019u> const&) /home/runner/work/cage/cage/sources/libcore/concurrent/concurrent.cpp:617:25 (libcage-core.so+0x20bea8)
    #7 testNetworkGinnel() /home/runner/work/cage/cage/sources/test-core/networkGinnel.cpp:135:26 (cage-test-core+0x74e1c3) (BuildId: 2d054e7f73ebe12d4026ff49ed29c1ae2bad58fa)
    #8 main /home/runner/work/cage/cage/sources/test-core/main.cpp:145:2 (cage-test-core+0x5253fb) (BuildId: 2d054e7f73ebe12d4026ff49ed29c1ae2bad58fa)

SUMMARY: ThreadSanitizer: data race /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_vector.h:988:40 in std::vector<SteamNetworkingSocketsLib::CSteamNetworkingSockets::QueuedCallback, std::allocator<SteamNetworkingSocketsLib::CSteamNetworkingSockets::QueuedCallback> >::size() const

And many more...

I assume that all steam functions are thread-safe? I could not find spacific details on that in the documentation, other than a small note that callbacks are thread-safe.

I am compiling the code with clang++ version 14 with -fsanitize=thread running on ubuntu 22.

Please let me know if you need any more information.

@zpostfacto
Copy link
Contributor

Thanks I will look into this. In general, yes you should be able to make API calls from multiple threads at the same time. (With the possible exception of "big" ones like init and kill.) Callbacks are "threadsafe", but they are queued, so there are just inherent race conditions you just have to be aware of.

@zpostfacto
Copy link
Contributor

I don't really see how the unlock of an unlocked mutex one is possible, tbh. The code is pretty simple. I don't suppose you can share more info? Or perhaps send me a PR with a config to enable thread sanitizer that works on ubuntu?

@malytomas
Copy link
Contributor Author

I have made a PR where sanitizer is used in the github actions. It shows there are issues, but it might be different from the issues previously found. I suppose this is as good starting point as any other.
I hope this will help fixing some of the issues. After that, I will see if it fixes all the issues for me as well ;)

@zpostfacto
Copy link
Contributor

Thanks! Hopefully I will get a sec to try this out soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants