Only picked the first few races.
==================
WARNING: ThreadSanitizer: data race (pid=123555)
Read of size 8 at 0x55b92e309330 by thread T17:
#0 std::vector<unsigned int, std::allocator<unsigned int> >::size() const /usr/include/c++/10.1.0/bits/stl_vector.h:919 (gamescope+0x42576)
#1 page_flip_handler ../src/drm.cpp:238 (gamescope+0x3e226)
#2 drmHandleEvent <null> (libdrm.so.2+0x6874)
#3 void std::__invoke_impl<void, void (*)()>(std::__invoke_other, void (*&&)()) /usr/include/c++/10.1.0/bits/invoke.h:60 (gamescope+0x38408)
#4 std::__invoke_result<void (*)()>::type std::__invoke<void (*)()>(void (*&&)()) /usr/include/c++/10.1.0/bits/invoke.h:95 (gamescope+0x3835f)
#5 void std::thread::_Invoker<std::tuple<void (*)()> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) /usr/include/c++/10.1.0/thread:264 (gamescope+0x382c4)
#6 std::thread::_Invoker<std::tuple<void (*)()> >::operator()() /usr/include/c++/10.1.0/thread:271 (gamescope+0x3826e)
#7 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)()> > >::_M_run() /usr/include/c++/10.1.0/thread:215 (gamescope+0x380ae)
#8 execute_native_thread_routine /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80 (libstdc++.so.6+0xcfb73)
Previous write of size 8 at 0x55b92e309330 by thread T18:
#0 void std::vector<unsigned int, std::allocator<unsigned int> >::_M_realloc_insert<unsigned int const&>(__gnu_cxx::__normal_iterator<unsigned int*, std::vector<unsigned int, std::allocator<unsigned int> > >, unsigned int const&) /usr/include/c++/10.1.0/bits/vector.tcc:503 (games
cope+0x437c6)
#1 std::vector<unsigned int, std::allocator<unsigned int> >::push_back(unsigned int const&) /usr/include/c++/10.1.0/bits/stl_vector.h:1198 (gamescope+0x42a3c)
#2 drm_can_avoid_composite ../src/drm.cpp:833 (gamescope+0x4188f)
#3 paint_all ../src/steamcompmgr.cpp:1118 (gamescope+0x1f812)
#4 steamcompmgr_main ../src/steamcompmgr.cpp:2622 (gamescope+0x26523)
#5 steamCompMgrThreadRun() ../src/main.cpp:125 (gamescope+0x3888c)
#6 void std::__invoke_impl<void, void (*)()>(std::__invoke_other, void (*&&)()) /usr/include/c++/10.1.0/bits/invoke.h:60 (gamescope+0x38408)
#7 std::__invoke_result<void (*)()>::type std::__invoke<void (*)()>(void (*&&)()) /usr/include/c++/10.1.0/bits/invoke.h:95 (gamescope+0x3835f)
#8 void std::thread::_Invoker<std::tuple<void (*)()> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) /usr/include/c++/10.1.0/thread:264 (gamescope+0x382c4)
#9 std::thread::_Invoker<std::tuple<void (*)()> >::operator()() /usr/include/c++/10.1.0/thread:271 (gamescope+0x3826e)
#10 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)()> > >::_M_run() /usr/include/c++/10.1.0/thread:215 (gamescope+0x380ae)
#11 execute_native_thread_routine /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80 (libstdc++.so.6+0xcfb73)
Location is global 'g_DRM' of size 352 at 0x55b92e3092a0 (gamescope+0x00000010e330)
Thread T17 (tid=123590, running) created by main thread at:
#0 pthread_create /build/gcc/src/gcc/libsanitizer/tsan/tsan_interceptors_posix.cpp:962 (libtsan.so.0+0x5efab)
#1 __gthread_create /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/gthr-default.h:663 (libstdc++.so.6+0xcfe49)
#2 std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:135 (libstdc++.so.6+0xcfe49)
#3 init_drm ../src/drm.cpp:446 (gamescope+0x3f912)
#4 initOutput ../src/main.cpp:171 (gamescope+0x38b0d)
#5 main ../src/main.cpp:114 (gamescope+0x387e0)
Thread T18 (tid=123624, running) created by main thread at:
#0 pthread_create /build/gcc/src/gcc/libsanitizer/tsan/tsan_interceptors_posix.cpp:962 (libtsan.so.0+0x5efab)
#1 __gthread_create /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/gthr-default.h:663 (libstdc++.so.6+0xcfe49)
#2 std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:135 (libstdc++.so.6+0xcfe49)
#3 startSteamCompMgr ../src/main.cpp:130 (gamescope+0x388e3)
#4 xwayland_ready ../src/wlserver.c:105 (gamescope+0x3b614)
#5 wlr_signal_emit_safe ../subprojects/wlroots/util/signal.c:29 (gamescope+0xa8096)
#6 xserver_handle_ready ../subprojects/wlroots/xwayland/xwayland.c:250 (gamescope+0xa912d)
#7 <null> <null> (libwayland-server.so.0+0xa434)
#8 main ../src/main.cpp:120 (gamescope+0x38821)
SUMMARY: ThreadSanitizer: data race /usr/include/c++/10.1.0/bits/stl_vector.h:919 in std::vector<unsigned int, std::allocator<unsigned int> >::size() const
==================
==================
WARNING: ThreadSanitizer: data race (pid=123555)
Read of size 8 at 0x55b92e309328 by thread T17:
#0 std::vector<unsigned int, std::allocator<unsigned int> >::size() const /usr/include/c++/10.1.0/bits/stl_vector.h:919 (gamescope+0x4258a)
#1 page_flip_handler ../src/drm.cpp:238 (gamescope+0x3e226)
#2 drmHandleEvent <null> (libdrm.so.2+0x6874)
#3 void std::__invoke_impl<void, void (*)()>(std::__invoke_other, void (*&&)()) /usr/include/c++/10.1.0/bits/invoke.h:60 (gamescope+0x38408)
#4 std::__invoke_result<void (*)()>::type std::__invoke<void (*)()>(void (*&&)()) /usr/include/c++/10.1.0/bits/invoke.h:95 (gamescope+0x3835f)
#5 void std::thread::_Invoker<std::tuple<void (*)()> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) /usr/include/c++/10.1.0/thread:264 (gamescope+0x382c4)
#6 std::thread::_Invoker<std::tuple<void (*)()> >::operator()() /usr/include/c++/10.1.0/thread:271 (gamescope+0x3826e)
#7 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)()> > >::_M_run() /usr/include/c++/10.1.0/thread:215 (gamescope+0x380ae)
#8 execute_native_thread_routine /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80 (libstdc++.so.6+0xcfb73)
Previous write of size 8 at 0x55b92e309328 by thread T18:
#0 void std::vector<unsigned int, std::allocator<unsigned int> >::_M_realloc_insert<unsigned int const&>(__gnu_cxx::__normal_iterator<unsigned int*, std::vector<unsigned int, std::allocator<unsigned int> > >, unsigned int const&) /usr/include/c++/10.1.0/bits/vector.tcc:502 (gamescope+0x437ab)
#1 std::vector<unsigned int, std::allocator<unsigned int> >::push_back(unsigned int const&) /usr/include/c++/10.1.0/bits/stl_vector.h:1198 (gamescope+0x42a3c)
#2 drm_can_avoid_composite ../src/drm.cpp:833 (gamescope+0x4188f)
#3 paint_all ../src/steamcompmgr.cpp:1118 (gamescope+0x1f812)
#4 steamcompmgr_main ../src/steamcompmgr.cpp:2622 (gamescope+0x26523)
#5 steamCompMgrThreadRun() ../src/main.cpp:125 (gamescope+0x3888c)
#6 void std::__invoke_impl<void, void (*)()>(std::__invoke_other, void (*&&)()) /usr/include/c++/10.1.0/bits/invoke.h:60 (gamescope+0x38408)
#7 std::__invoke_result<void (*)()>::type std::__invoke<void (*)()>(void (*&&)()) /usr/include/c++/10.1.0/bits/invoke.h:95 (gamescope+0x3835f)
#8 void std::thread::_Invoker<std::tuple<void (*)()> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) /usr/include/c++/10.1.0/thread:264 (gamescope+0x382c4)
#9 std::thread::_Invoker<std::tuple<void (*)()> >::operator()() /usr/include/c++/10.1.0/thread:271 (gamescope+0x3826e)
#10 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)()> > >::_M_run() /usr/include/c++/10.1.0/thread:215 (gamescope+0x380ae)
#11 execute_native_thread_routine /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80 (libstdc++.so.6+0xcfb73)
Location is global 'g_DRM' of size 352 at 0x55b92e3092a0 (gamescope+0x00000010e328)
Thread T17 (tid=123590, running) created by main thread at:
#0 pthread_create /build/gcc/src/gcc/libsanitizer/tsan/tsan_interceptors_posix.cpp:962 (libtsan.so.0+0x5efab)
#1 __gthread_create /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/gthr-default.h:663 (libstdc++.so.6+0xcfe49)
#2 std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:135 (libstdc++.so.6+0xcfe49)
#3 init_drm ../src/drm.cpp:446 (gamescope+0x3f912)
#4 initOutput ../src/main.cpp:171 (gamescope+0x38b0d)
#5 main ../src/main.cpp:114 (gamescope+0x387e0)
Thread T18 (tid=123624, running) created by main thread at:
#0 pthread_create /build/gcc/src/gcc/libsanitizer/tsan/tsan_interceptors_posix.cpp:962 (libtsan.so.0+0x5efab)
#1 __gthread_create /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/gthr-default.h:663 (libstdc++.so.6+0xcfe49)
#2 std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:135 (libstdc++.so.6+0xcfe49)
#3 startSteamCompMgr ../src/main.cpp:130 (gamescope+0x388e3)
#4 xwayland_ready ../src/wlserver.c:105 (gamescope+0x3b614)
#5 wlr_signal_emit_safe ../subprojects/wlroots/util/signal.c:29 (gamescope+0xa8096)
#6 xserver_handle_ready ../subprojects/wlroots/xwayland/xwayland.c:250 (gamescope+0xa912d)
#7 <null> <null> (libwayland-server.so.0+0xa434)
#8 main ../src/main.cpp:120 (gamescope+0x38821)
SUMMARY: ThreadSanitizer: data race /usr/include/c++/10.1.0/bits/stl_vector.h:919 in std::vector<unsigned int, std::allocator<unsigned int> >::size() const
==================
==================
WARNING: ThreadSanitizer: data race (pid=123555)
Read of size 4 at 0x7b0400039d30 by thread T17:
#0 void __gnu_cxx::new_allocator<unsigned int>::construct<unsigned int, unsigned int const&>(unsigned int*, unsigned int const&) /usr/include/c++/10.1.0/ext/new_allocator.h:150 (gamescope+0x44131)
#1 void std::allocator_traits<std::allocator<unsigned int> >::construct<unsigned int, unsigned int const&>(std::allocator<unsigned int>&, unsigned int*, unsigned int const&) /usr/include/c++/10.1.0/bits/alloc_traits.h:512 (gamescope+0x4344c)
#2 void std::vector<unsigned int, std::allocator<unsigned int> >::_M_realloc_insert<unsigned int const&>(__gnu_cxx::__normal_iterator<unsigned int*, std::vector<unsigned int, std::allocator<unsigned int> > >, unsigned int const&) /usr/include/c++/10.1.0/bits/vector.tcc:449 (gamescope+0x43617)
#3 std::vector<unsigned int, std::allocator<unsigned int> >::push_back(unsigned int const&) /usr/include/c++/10.1.0/bits/stl_vector.h:1198 (gamescope+0x42a3c)
#4 page_flip_handler ../src/drm.cpp:240 (gamescope+0x3e251)
#5 drmHandleEvent <null> (libdrm.so.2+0x6874)
#6 void std::__invoke_impl<void, void (*)()>(std::__invoke_other, void (*&&)()) /usr/include/c++/10.1.0/bits/invoke.h:60 (gamescope+0x38408)
#7 std::__invoke_result<void (*)()>::type std::__invoke<void (*)()>(void (*&&)()) /usr/include/c++/10.1.0/bits/invoke.h:95 (gamescope+0x3835f)
#8 void std::thread::_Invoker<std::tuple<void (*)()> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) /usr/include/c++/10.1.0/thread:264 (gamescope+0x382c4)
#9 std::thread::_Invoker<std::tuple<void (*)()> >::operator()() /usr/include/c++/10.1.0/thread:271 (gamescope+0x3826e)
#10 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)()> > >::_M_run() /usr/include/c++/10.1.0/thread:215 (gamescope+0x380ae)
#11 execute_native_thread_routine /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80 (libstdc++.so.6+0xcfb73)
Previous write of size 8 at 0x7b0400039d30 by thread T18:
#0 operator new(unsigned long) /build/gcc/src/gcc/libsanitizer/tsan/tsan_new_delete.cpp:64 (libtsan.so.0+0x8d1c4)
#1 __gnu_cxx::new_allocator<unsigned int>::allocate(unsigned long, void const*) <null> (gamescope+0x45800)
#2 std::allocator_traits<std::allocator<unsigned int> >::allocate(std::allocator<unsigned int>&, unsigned long) /usr/include/c++/10.1.0/bits/alloc_traits.h:460 (gamescope+0x44e2d)
#3 std::_Vector_base<unsigned int, std::allocator<unsigned int> >::_M_allocate(unsigned long) /usr/include/c++/10.1.0/bits/stl_vector.h:346 (gamescope+0x4434a)
#4 void std::vector<unsigned int, std::allocator<unsigned int> >::_M_realloc_insert<unsigned int const&>(__gnu_cxx::__normal_iterator<unsigned int*, std::vector<unsigned int, std::allocator<unsigned int> > >, unsigned int const&) /usr/include/c++/10.1.0/bits/vector.tcc:440 (gamescope+0x435da)
#5 std::vector<unsigned int, std::allocator<unsigned int> >::push_back(unsigned int const&) /usr/include/c++/10.1.0/bits/stl_vector.h:1198 (gamescope+0x42a3c)
#6 drm_can_avoid_composite ../src/drm.cpp:833 (gamescope+0x4188f)
#7 paint_all ../src/steamcompmgr.cpp:1118 (gamescope+0x1f812)
#8 steamcompmgr_main ../src/steamcompmgr.cpp:2622 (gamescope+0x26523)
#9 steamCompMgrThreadRun() ../src/main.cpp:125 (gamescope+0x3888c)
#10 void std::__invoke_impl<void, void (*)()>(std::__invoke_other, void (*&&)()) /usr/include/c++/10.1.0/bits/invoke.h:60 (gamescope+0x38408)
#11 std::__invoke_result<void (*)()>::type std::__invoke<void (*)()>(void (*&&)()) /usr/include/c++/10.1.0/bits/invoke.h:95 (gamescope+0x3835f)
#12 void std::thread::_Invoker<std::tuple<void (*)()> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) /usr/include/c++/10.1.0/thread:264 (gamescope+0x382c4)
#13 std::thread::_Invoker<std::tuple<void (*)()> >::operator()() /usr/include/c++/10.1.0/thread:271 (gamescope+0x3826e)
#14 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)()> > >::_M_run() /usr/include/c++/10.1.0/thread:215 (gamescope+0x380ae)
#15 execute_native_thread_routine /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80 (libstdc++.so.6+0xcfb73)
Location is heap block of size 4 at 0x7b0400039d30 allocated by thread T18:
#0 operator new(unsigned long) /build/gcc/src/gcc/libsanitizer/tsan/tsan_new_delete.cpp:64 (libtsan.so.0+0x8d1c4)
#1 __gnu_cxx::new_allocator<unsigned int>::allocate(unsigned long, void const*) <null> (gamescope+0x45800)
#2 std::allocator_traits<std::allocator<unsigned int> >::allocate(std::allocator<unsigned int>&, unsigned long) /usr/include/c++/10.1.0/bits/alloc_traits.h:460 (gamescope+0x44e2d)
#3 std::_Vector_base<unsigned int, std::allocator<unsigned int> >::_M_allocate(unsigned long) /usr/include/c++/10.1.0/bits/stl_vector.h:346 (gamescope+0x4434a)
#4 void std::vector<unsigned int, std::allocator<unsigned int> >::_M_realloc_insert<unsigned int const&>(__gnu_cxx::__normal_iterator<unsigned int*, std::vector<unsigned int, std::allocator<unsigned int> > >, unsigned int const&) /usr/include/c++/10.1.0/bits/vector.tcc:440 (gamescope+0x435da)
#5 std::vector<unsigned int, std::allocator<unsigned int> >::push_back(unsigned int const&) /usr/include/c++/10.1.0/bits/stl_vector.h:1198 (gamescope+0x42a3c)
#6 drm_can_avoid_composite ../src/drm.cpp:833 (gamescope+0x4188f)
#7 paint_all ../src/steamcompmgr.cpp:1118 (gamescope+0x1f812)
#8 steamcompmgr_main ../src/steamcompmgr.cpp:2622 (gamescope+0x26523)
#9 steamCompMgrThreadRun() ../src/main.cpp:125 (gamescope+0x3888c)
#10 void std::__invoke_impl<void, void (*)()>(std::__invoke_other, void (*&&)()) /usr/include/c++/10.1.0/bits/invoke.h:60 (gamescope+0x38408)
#11 std::__invoke_result<void (*)()>::type std::__invoke<void (*)()>(void (*&&)()) /usr/include/c++/10.1.0/bits/invoke.h:95 (gamescope+0x3835f)
#12 void std::thread::_Invoker<std::tuple<void (*)()> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) /usr/include/c++/10.1.0/thread:264 (gamescope+0x382c4)
#13 std::thread::_Invoker<std::tuple<void (*)()> >::operator()() /usr/include/c++/10.1.0/thread:271 (gamescope+0x3826e)
#14 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)()> > >::_M_run() /usr/include/c++/10.1.0/thread:215 (gamescope+0x380ae)
#15 execute_native_thread_routine /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80 (libstdc++.so.6+0xcfb73)
Thread T17 (tid=123590, running) created by main thread at:
#0 pthread_create /build/gcc/src/gcc/libsanitizer/tsan/tsan_interceptors_posix.cpp:962 (libtsan.so.0+0x5efab)
#1 __gthread_create /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/gthr-default.h:663 (libstdc++.so.6+0xcfe49)
#2 std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:135 (libstdc++.so.6+0xcfe49)
#3 init_drm ../src/drm.cpp:446 (gamescope+0x3f912)
#4 initOutput ../src/main.cpp:171 (gamescope+0x38b0d)
#5 main ../src/main.cpp:114 (gamescope+0x387e0)
Thread T18 (tid=123624, running) created by main thread at:
#0 pthread_create /build/gcc/src/gcc/libsanitizer/tsan/tsan_interceptors_posix.cpp:962 (libtsan.so.0+0x5efab)
#1 __gthread_create /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/gthr-default.h:663 (libstdc++.so.6+0xcfe49)
#2 std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:135 (libstdc++.so.6+0xcfe49)
#3 startSteamCompMgr ../src/main.cpp:130 (gamescope+0x388e3)
#4 xwayland_ready ../src/wlserver.c:105 (gamescope+0x3b614)
#5 wlr_signal_emit_safe ../subprojects/wlroots/util/signal.c:29 (gamescope+0xa8096)
#6 xserver_handle_ready ../subprojects/wlroots/xwayland/xwayland.c:250 (gamescope+0xa912d)
#7 <null> <null> (libwayland-server.so.0+0xa434)
#8 main ../src/main.cpp:120 (gamescope+0x38821)
SUMMARY: ThreadSanitizer: data race /usr/include/c++/10.1.0/ext/new_allocator.h:150 in void __gnu_cxx::new_allocator<unsigned int>::construct<unsigned int, unsigned int const&>(unsigned int*, unsigned int const&)
==================
==================
WARNING: ThreadSanitizer: unlock of an unlocked mutex (or by a wrong thread) (pid=123555)
#0 pthread_mutex_unlock /build/gcc/src/gcc/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:4162 (libtsan.so.0+0x3a68e)
#1 __gthread_mutex_unlock /usr/include/c++/10.1.0/x86_64-pc-linux-gnu/bits/gthr-default.h:779 (gamescope+0x26ec8)
#2 std::mutex::unlock() /usr/include/c++/10.1.0/bits/std_mutex.h:118 (gamescope+0x27085)
#3 page_flip_handler ../src/drm.cpp:245 (gamescope+0x3e26f)
#4 drmHandleEvent <null> (libdrm.so.2+0x6874)
#5 void std::__invoke_impl<void, void (*)()>(std::__invoke_other, void (*&&)()) /usr/include/c++/10.1.0/bits/invoke.h:60 (gamescope+0x38408)
#6 std::__invoke_result<void (*)()>::type std::__invoke<void (*)()>(void (*&&)()) /usr/include/c++/10.1.0/bits/invoke.h:95 (gamescope+0x3835f)
#7 void std::thread::_Invoker<std::tuple<void (*)()> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) /usr/include/c++/10.1.0/thread:264 (gamescope+0x382c4)
#8 std::thread::_Invoker<std::tuple<void (*)()> >::operator()() /usr/include/c++/10.1.0/thread:271 (gamescope+0x3826e)
#9 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)()> > >::_M_run() /usr/include/c++/10.1.0/thread:215 (gamescope+0x380ae)
#10 execute_native_thread_routine /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80 (libstdc++.so.6+0xcfb73)
Location is global 'g_DRM' of size 352 at 0x55b92e3092a0 (gamescope+0x00000010e3d0)
Mutex M64270548522275792 is already destroyed.
SUMMARY: ThreadSanitizer: unlock of an unlocked mutex (or by a wrong thread) /usr/include/c++/10.1.0/x86_64-pc-linux-gnu/bits/gthr-default.h:779 in __gthread_mutex_unlock
==================
==================
WARNING: ThreadSanitizer: data race (pid=123555)
Read of size 8 at 0x7b1c00090200 by thread T17:
#0 std::_Hashtable<unsigned int, std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, std::allocator<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > > >, std::__detail::_Select1st, std::equal_to<unsigned int>, std::hash<unsigned int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_find_before_node(unsigned long, unsigned int const&, unsigned long) const /usr/include/c++/10.1.0/bits/hashtable.h:1573 (gamescope+0x44745)
#1 std::_Hashtable<unsigned int, std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, std::allocator<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > > >, std::__detail::_Select1st, std::equal_to<unsigned int>, std::hash<unsigned int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_find_node(unsigned long, unsigned int const&, unsigned long) const /usr/include/c++/10.1.0/bits/hashtable.h:693 (gamescope+0x43b80)
#2 std::__detail::_Map_base<unsigned int, std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, std::allocator<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > > >, std::__detail::_Select1st, std::equal_to<unsigned int>, std::hash<unsigned int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true>, true>::operator[](unsigned int const&) /usr/include/c++/10.1.0/bits/hashtable_policy.h:709 (gamescope+0x42fd7)
#3 std::unordered_map<unsigned int, std::pair<bool, std::atomic<unsigned int> >, std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > > > >::operator[](unsigned int const&) /usr/include/c++/10.1.0/bits/unordered_map.h:984 (gamescope+0x42627)
#4 page_flip_handler ../src/drm.cpp:210 (gamescope+0x3e045)
#5 drmHandleEvent <null> (libdrm.so.2+0x6874)
#6 void std::__invoke_impl<void, void (*)()>(std::__invoke_other, void (*&&)()) /usr/include/c++/10.1.0/bits/invoke.h:60 (gamescope+0x38408)
#7 std::__invoke_result<void (*)()>::type std::__invoke<void (*)()>(void (*&&)()) /usr/include/c++/10.1.0/bits/invoke.h:95 (gamescope+0x3835f)
#8 void std::thread::_Invoker<std::tuple<void (*)()> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) /usr/include/c++/10.1.0/thread:264 (gamescope+0x382c4)
#9 std::thread::_Invoker<std::tuple<void (*)()> >::operator()() /usr/include/c++/10.1.0/thread:271 (gamescope+0x3826e)
#10 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)()> > >::_M_run() /usr/include/c++/10.1.0/thread:215 (gamescope+0x380ae)
#11 execute_native_thread_routine /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80 (libstdc++.so.6+0xcfb73)
Previous write of size 8 at 0x7b1c00090200 by thread T18 (mutexes: write M64270548522275792):
#0 std::_Hashtable<unsigned int, std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, std::allocator<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > > >, std::__detail::_Select1st, std::equal_to<unsigned int>, std::hash<unsigned int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_insert_bucket_begin(unsigned long, std::__detail::_Hash_node<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, false>*) /usr/include/c++/10.1.0/bits/hashtable.h:1616 (gamescope+0x44c5a)
#1 std::_Hashtable<unsigned int, std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, std::allocator<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > > >, std::__detail::_Select1st, std::equal_to<unsigned int>, std::hash<unsigned int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_insert_unique_node(unsigned int const&, unsigned long, unsigned long, std::__detail::_Hash_node<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, false>*, unsigned long) /usr/include/c++/10.1.0/bits/hashtable.h:1735 (gamescope+0x43e9b)
#2 std::__detail::_Map_base<unsigned int, std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, std::allocator<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > > >, std::__detail::_Select1st, std::equal_to<unsigned int>, std::hash<unsigned int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true>, true>::operator[](unsigned int const&) /usr/include/c++/10.1.0/bits/hashtable_policy.h:719 (gamescope+0x43064)
#3 std::unordered_map<unsigned int, std::pair<bool, std::atomic<unsigned int> >, std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > > > >::operator[](unsigned int const&) /usr/include/c++/10.1.0/bits/unordered_map.h:984 (gamescope+0x42627)
#4 drm_fbid_from_dmabuf ../src/drm.cpp:650 (gamescope+0x4071d)
#5 import_commit ../src/steamcompmgr.cpp:524 (gamescope+0x1bc0c)
#6 check_new_wayland_res() ../src/steamcompmgr.cpp:2043 (gamescope+0x23722)
#7 steamcompmgr_main ../src/steamcompmgr.cpp:2618 (gamescope+0x264d8)
#8 steamCompMgrThreadRun() ../src/main.cpp:125 (gamescope+0x3888c)
#9 void std::__invoke_impl<void, void (*)()>(std::__invoke_other, void (*&&)()) /usr/include/c++/10.1.0/bits/invoke.h:60 (gamescope+0x38408)
#10 std::__invoke_result<void (*)()>::type std::__invoke<void (*)()>(void (*&&)()) /usr/include/c++/10.1.0/bits/invoke.h:95 (gamescope+0x3835f)
#11 void std::thread::_Invoker<std::tuple<void (*)()> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) /usr/include/c++/10.1.0/thread:264 (gamescope+0x382c4)
#12 std::thread::_Invoker<std::tuple<void (*)()> >::operator()() /usr/include/c++/10.1.0/thread:271 (gamescope+0x3826e)
#13 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)()> > >::_M_run() /usr/include/c++/10.1.0/thread:215 (gamescope+0x380ae)
#14 execute_native_thread_routine /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80 (libstdc++.so.6+0xcfb73)
Location is heap block of size 104 at 0x7b1c000901a0 allocated by thread T18:
#0 operator new(unsigned long) /build/gcc/src/gcc/libsanitizer/tsan/tsan_new_delete.cpp:64 (libtsan.so.0+0x8d1c4)
#1 __gnu_cxx::new_allocator<std::__detail::_Hash_node_base*>::allocate(unsigned long, void const*) /usr/include/c++/10.1.0/ext/new_allocator.h:115 (gamescope+0x3799c)
#2 std::allocator_traits<std::allocator<std::__detail::_Hash_node_base*> >::allocate(std::allocator<std::__detail::_Hash_node_base*>&, unsigned long) /usr/include/c++/10.1.0/bits/alloc_traits.h:460 (gamescope+0x36ea9)
#3 std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, false> > >::_M_allocate_buckets(unsigned long) <null> (gamescope+0x4619e)
#4 std::_Hashtable<unsigned int, std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, std::allocator<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > > >, std::__detail::_Select1st, std::equal_to<unsigned int>, std::hash<unsigned int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_allocate_buckets(unsigned long) <null> (gamescope+0x45dd1)
#5 std::_Hashtable<unsigned int, std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, std::allocator<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > > >, std::__detail::_Select1st, std::equal_to<unsigned int>, std::hash<unsigned int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_rehash_aux(unsigned long, std::integral_constant<bool, true>) <null> (gamescope+0x453bb)
#6 std::_Hashtable<unsigned int, std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, std::allocator<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > > >, std::__detail::_Select1st, std::equal_to<unsigned int>, std::hash<unsigned int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_rehash(unsigned long, unsigned long const&) /usr/include/c++/10.1.0/bits/hashtable.h:2070 (gamescope+0x44a6d)
#7 std::_Hashtable<unsigned int, std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, std::allocator<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > > >, std::__detail::_Select1st, std::equal_to<unsigned int>, std::hash<unsigned int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_insert_unique_node(unsigned int const&, unsigned long, unsigned long, std::__detail::_Hash_node<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, false>*, unsigned long) /usr/include/c++/10.1.0/bits/hashtable.h:1728 (gamescope+0x43e52)
#8 std::__detail::_Map_base<unsigned int, std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, std::allocator<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > > >, std::__detail::_Select1st, std::equal_to<unsigned int>, std::hash<unsigned int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true>, true>::operator[](unsigned int const&) /usr/include/c++/10.1.0/bits/hashtable_policy.h:719 (gamescope+0x43064)
#9 std::unordered_map<unsigned int, std::pair<bool, std::atomic<unsigned int> >, std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > > > >::operator[](unsigned int const&) /usr/include/c++/10.1.0/bits/unordered_map.h:984 (gamescope+0x42627)
#10 drm_fbid_from_dmabuf ../src/drm.cpp:650 (gamescope+0x4071d)
#11 CVulkanTexture::BInit(unsigned int, unsigned int, VkFormat, bool, bool, wlr_dmabuf_attributes*) ../src/rendervulkan.cpp:380 (gamescope+0x49c90)
#12 vulkan_make_output(VulkanOutput_t*) ../src/rendervulkan.cpp:949 (gamescope+0x4c8bc)
#13 vulkan_init ../src/rendervulkan.cpp:1082 (gamescope+0x4d2c7)
#14 steamcompmgr_main ../src/steamcompmgr.cpp:2200 (gamescope+0x24476)
#15 steamCompMgrThreadRun() ../src/main.cpp:125 (gamescope+0x3888c)
#16 void std::__invoke_impl<void, void (*)()>(std::__invoke_other, void (*&&)()) /usr/include/c++/10.1.0/bits/invoke.h:60 (gamescope+0x38408)
#17 std::__invoke_result<void (*)()>::type std::__invoke<void (*)()>(void (*&&)()) /usr/include/c++/10.1.0/bits/invoke.h:95 (gamescope+0x3835f)
#18 void std::thread::_Invoker<std::tuple<void (*)()> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) /usr/include/c++/10.1.0/thread:264 (gamescope+0x382c4)
#19 std::thread::_Invoker<std::tuple<void (*)()> >::operator()() /usr/include/c++/10.1.0/thread:271 (gamescope+0x3826e)
#20 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)()> > >::_M_run() /usr/include/c++/10.1.0/thread:215 (gamescope+0x380ae)
#21 execute_native_thread_routine /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80 (libstdc++.so.6+0xcfb73)
Mutex M64270548522275792 is already destroyed.
Thread T17 (tid=123590, running) created by main thread at:
#0 pthread_create /build/gcc/src/gcc/libsanitizer/tsan/tsan_interceptors_posix.cpp:962 (libtsan.so.0+0x5efab)
#1 __gthread_create /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/gthr-default.h:663 (libstdc++.so.6+0xcfe49)
#2 std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:135 (libstdc++.so.6+0xcfe49)
#3 init_drm ../src/drm.cpp:446 (gamescope+0x3f912)
#4 initOutput ../src/main.cpp:171 (gamescope+0x38b0d)
#5 main ../src/main.cpp:114 (gamescope+0x387e0)
Thread T18 (tid=123624, running) created by main thread at:
#0 pthread_create /build/gcc/src/gcc/libsanitizer/tsan/tsan_interceptors_posix.cpp:962 (libtsan.so.0+0x5efab)
#1 __gthread_create /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/gthr-default.h:663 (libstdc++.so.6+0xcfe49)
#2 std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:135 (libstdc++.so.6+0xcfe49)
#3 startSteamCompMgr ../src/main.cpp:130 (gamescope+0x388e3)
#4 xwayland_ready ../src/wlserver.c:105 (gamescope+0x3b614)
#5 wlr_signal_emit_safe ../subprojects/wlroots/util/signal.c:29 (gamescope+0xa8096)
#6 xserver_handle_ready ../subprojects/wlroots/xwayland/xwayland.c:250 (gamescope+0xa912d)
#7 <null> <null> (libwayland-server.so.0+0xa434)
#8 main ../src/main.cpp:120 (gamescope+0x38821)
SUMMARY: ThreadSanitizer: data race /usr/include/c++/10.1.0/bits/hashtable.h:1573 in std::_Hashtable<unsigned int, std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, std::allocator<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > > >, std::__detail::_Select1st, std::equal_to<unsigned int>, std::hash<unsigned int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_find_before_node(unsigned long, unsigned int const&, unsigned long) const
==================
==================
WARNING: ThreadSanitizer: data race (pid=123555)
Read of size 8 at 0x7b0800021ec0 by thread T17:
#0 std::_Hashtable<unsigned int, std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, std::allocator<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > > >, std::__detail::_Select1st, std::equal_to<unsigned int>, std::hash<unsigned int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_find_before_node(unsigned long, unsigned int const&, unsigned long) const /usr/include/c++/10.1.0/bits/hashtable.h:1577 (gamescope+0x44769)
#1 std::_Hashtable<unsigned int, std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, std::allocator<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > > >, std::__detail::_Select1st, std::equal_to<unsigned int>, std::hash<unsigned int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_find_node(unsigned long, unsigned int const&, unsigned long) const /usr/include/c++/10.1.0/bits/hashtable.h:693 (gamescope+0x43b80)
#2 std::__detail::_Map_base<unsigned int, std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, std::allocator<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > > >, std::__detail::_Select1st, std::equal_to<unsigned int>, std::hash<unsigned int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true>, true>::operator[](unsigned int const&) /usr/include/c++/10.1.0/bits/hashtable_policy.h:709 (gamescope+0x42fd7)
#3 std::unordered_map<unsigned int, std::pair<bool, std::atomic<unsigned int> >, std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > > > >::operator[](unsigned int const&) /usr/include/c++/10.1.0/bits/unordered_map.h:984 (gamescope+0x42627)
#4 page_flip_handler ../src/drm.cpp:210 (gamescope+0x3e045)
#5 drmHandleEvent <null> (libdrm.so.2+0x6874)
#6 void std::__invoke_impl<void, void (*)()>(std::__invoke_other, void (*&&)()) /usr/include/c++/10.1.0/bits/invoke.h:60 (gamescope+0x38408)
#7 std::__invoke_result<void (*)()>::type std::__invoke<void (*)()>(void (*&&)()) /usr/include/c++/10.1.0/bits/invoke.h:95 (gamescope+0x3835f)
#8 void std::thread::_Invoker<std::tuple<void (*)()> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) /usr/include/c++/10.1.0/thread:264 (gamescope+0x382c4)
#9 std::thread::_Invoker<std::tuple<void (*)()> >::operator()() /usr/include/c++/10.1.0/thread:271 (gamescope+0x3826e)
#10 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)()> > >::_M_run() /usr/include/c++/10.1.0/thread:215 (gamescope+0x380ae)
#11 execute_native_thread_routine /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80 (libstdc++.so.6+0xcfb73)
Previous write of size 8 at 0x7b0800021ec0 by thread T18 (mutexes: write M64270548522275792):
#0 operator new(unsigned long) /build/gcc/src/gcc/libsanitizer/tsan/tsan_new_delete.cpp:64 (libtsan.so.0+0x8d1c4)
#1 __gnu_cxx::new_allocator<std::__detail::_Hash_node<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, false> >::allocate(unsigned long, void const*) /usr/include/c++/10.1.0/ext/new_allocator.h:115 (gamescope+0x45be1)
#2 std::allocator_traits<std::allocator<std::__detail::_Hash_node<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, false> > >::allocate(std::allocator<std::__detail::_Hash_node<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, false> >&, unsigned long) <null> (gamescope+0x45283)
#3 std::__detail::_Hash_node<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, false>* std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, false> > >::_M_allocate_node<std::piecewise_construct_t const&, std::tuple<unsigned int const&>, std::tuple<> >(std::piecewise_construct_t const&, std::tuple<unsigned int const&>&&, std::tuple<>&&) /usr/include/c++/10.1.0/bits/hashtable_policy.h:2032 (gamescope+0x44947)
#4 std::_Hashtable<unsigned int, std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, std::allocator<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > > >, std::__detail::_Select1st, std::equal_to<unsigned int>, std::hash<unsigned int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_Scoped_node::_Scoped_node<std::piecewise_construct_t const&, std::tuple<unsigned int const&>, std::tuple<> >(std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, false> > >*, std::piecewise_construct_t const&, std::tuple<unsigned int const&>&&, std::tuple<>&&) /usr/include/c++/10.1.0/bits/hashtable.h:272 (gamescope+0x43cba)
#5 std::__detail::_Map_base<unsigned int, std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, std::allocator<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > > >, std::__detail::_Select1st, std::equal_to<unsigned int>, std::hash<unsigned int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true>, true>::operator[](unsigned int const&) /usr/include/c++/10.1.0/bits/hashtable_policy.h:712 (gamescope+0x4302f)
#6 std::unordered_map<unsigned int, std::pair<bool, std::atomic<unsigned int> >, std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > > > >::operator[](unsigned int const&) /usr/include/c++/10.1.0/bits/unordered_map.h:984 (gamescope+0x42627)
#7 drm_fbid_from_dmabuf ../src/drm.cpp:650 (gamescope+0x4071d)
#8 import_commit ../src/steamcompmgr.cpp:524 (gamescope+0x1bc0c)
#9 check_new_wayland_res() ../src/steamcompmgr.cpp:2043 (gamescope+0x23722)
#10 steamcompmgr_main ../src/steamcompmgr.cpp:2618 (gamescope+0x264d8)
#11 steamCompMgrThreadRun() ../src/main.cpp:125 (gamescope+0x3888c)
#12 void std::__invoke_impl<void, void (*)()>(std::__invoke_other, void (*&&)()) /usr/include/c++/10.1.0/bits/invoke.h:60 (gamescope+0x38408)
#13 std::__invoke_result<void (*)()>::type std::__invoke<void (*)()>(void (*&&)()) /usr/include/c++/10.1.0/bits/invoke.h:95 (gamescope+0x3835f)
#14 void std::thread::_Invoker<std::tuple<void (*)()> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) /usr/include/c++/10.1.0/thread:264 (gamescope+0x382c4)
#15 std::thread::_Invoker<std::tuple<void (*)()> >::operator()() /usr/include/c++/10.1.0/thread:271 (gamescope+0x3826e)
#16 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)()> > >::_M_run() /usr/include/c++/10.1.0/thread:215 (gamescope+0x380ae)
#17 execute_native_thread_routine /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80 (libstdc++.so.6+0xcfb73)
Location is heap block of size 24 at 0x7b0800021ec0 allocated by thread T18:
#0 operator new(unsigned long) /build/gcc/src/gcc/libsanitizer/tsan/tsan_new_delete.cpp:64 (libtsan.so.0+0x8d1c4)
#1 __gnu_cxx::new_allocator<std::__detail::_Hash_node<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, false> >::allocate(unsigned long, void const*) /usr/include/c++/10.1.0/ext/new_allocator.h:115 (gamescope+0x45be1)
#2 std::allocator_traits<std::allocator<std::__detail::_Hash_node<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, false> > >::allocate(std::allocator<std::__detail::_Hash_node<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, false> >&, unsigned long) <null> (gamescope+0x45283)
#3 std::__detail::_Hash_node<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, false>* std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, false> > >::_M_allocate_node<std::piecewise_construct_t const&, std::tuple<unsigned int const&>, std::tuple<> >(std::piecewise_construct_t const&, std::tuple<unsigned int const&>&&, std::tuple<>&&) /usr/include/c++/10.1.0/bits/hashtable_policy.h:2032 (gamescope+0x44947)
#4 std::_Hashtable<unsigned int, std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, std::allocator<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > > >, std::__detail::_Select1st, std::equal_to<unsigned int>, std::hash<unsigned int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_Scoped_node::_Scoped_node<std::piecewise_construct_t const&, std::tuple<unsigned int const&>, std::tuple<> >(std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, false> > >*, std::piecewise_construct_t const&, std::tuple<unsigned int const&>&&, std::tuple<>&&) /usr/include/c++/10.1.0/bits/hashtable.h:272 (gamescope+0x43cba)
#5 std::__detail::_Map_base<unsigned int, std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, std::allocator<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > > >, std::__detail::_Select1st, std::equal_to<unsigned int>, std::hash<unsigned int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true>, true>::operator[](unsigned int const&) /usr/include/c++/10.1.0/bits/hashtable_policy.h:712 (gamescope+0x4302f)
#6 std::unordered_map<unsigned int, std::pair<bool, std::atomic<unsigned int> >, std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > > > >::operator[](unsigned int const&) /usr/include/c++/10.1.0/bits/unordered_map.h:984 (gamescope+0x42627)
#7 drm_fbid_from_dmabuf ../src/drm.cpp:650 (gamescope+0x4071d)
#8 import_commit ../src/steamcompmgr.cpp:524 (gamescope+0x1bc0c)
#9 check_new_wayland_res() ../src/steamcompmgr.cpp:2043 (gamescope+0x23722)
#10 steamcompmgr_main ../src/steamcompmgr.cpp:2618 (gamescope+0x264d8)
#11 steamCompMgrThreadRun() ../src/main.cpp:125 (gamescope+0x3888c)
#12 void std::__invoke_impl<void, void (*)()>(std::__invoke_other, void (*&&)()) /usr/include/c++/10.1.0/bits/invoke.h:60 (gamescope+0x38408)
#13 std::__invoke_result<void (*)()>::type std::__invoke<void (*)()>(void (*&&)()) /usr/include/c++/10.1.0/bits/invoke.h:95 (gamescope+0x3835f)
#14 void std::thread::_Invoker<std::tuple<void (*)()> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) /usr/include/c++/10.1.0/thread:264 (gamescope+0x382c4)
#15 std::thread::_Invoker<std::tuple<void (*)()> >::operator()() /usr/include/c++/10.1.0/thread:271 (gamescope+0x3826e)
#16 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)()> > >::_M_run() /usr/include/c++/10.1.0/thread:215 (gamescope+0x380ae)
#17 execute_native_thread_routine /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80 (libstdc++.so.6+0xcfb73)
Mutex M64270548522275792 is already destroyed.
Thread T17 (tid=123590, running) created by main thread at:
#0 pthread_create /build/gcc/src/gcc/libsanitizer/tsan/tsan_interceptors_posix.cpp:962 (libtsan.so.0+0x5efab)
#1 __gthread_create /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/gthr-default.h:663 (libstdc++.so.6+0xcfe49)
#2 std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:135 (libstdc++.so.6+0xcfe49)
#3 init_drm ../src/drm.cpp:446 (gamescope+0x3f912)
#4 initOutput ../src/main.cpp:171 (gamescope+0x38b0d)
#5 main ../src/main.cpp:114 (gamescope+0x387e0)
Thread T18 (tid=123624, running) created by main thread at:
#0 pthread_create /build/gcc/src/gcc/libsanitizer/tsan/tsan_interceptors_posix.cpp:962 (libtsan.so.0+0x5efab)
#1 __gthread_create /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/gthr-default.h:663 (libstdc++.so.6+0xcfe49)
#2 std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:135 (libstdc++.so.6+0xcfe49)
#3 startSteamCompMgr ../src/main.cpp:130 (gamescope+0x388e3)
#4 xwayland_ready ../src/wlserver.c:105 (gamescope+0x3b614)
#5 wlr_signal_emit_safe ../subprojects/wlroots/util/signal.c:29 (gamescope+0xa8096)
#6 xserver_handle_ready ../subprojects/wlroots/xwayland/xwayland.c:250 (gamescope+0xa912d)
#7 <null> <null> (libwayland-server.so.0+0xa434)
#8 main ../src/main.cpp:120 (gamescope+0x38821)
SUMMARY: ThreadSanitizer: data race /usr/include/c++/10.1.0/bits/hashtable.h:1577 in std::_Hashtable<unsigned int, std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, std::allocator<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > > >, std::__detail::_Select1st, std::equal_to<unsigned int>, std::hash<unsigned int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_find_before_node(unsigned long, unsigned int const&, unsigned long) const
==================
==================
WARNING: ThreadSanitizer: data race (pid=123555)
Read of size 4 at 0x7b0800058d68 by thread T17:
#0 std::equal_to<unsigned int>::operator()(unsigned int const&, unsigned int const&) const /usr/include/c++/10.1.0/bits/stl_function.h:356 (gamescope+0x45ab8)
#1 std::__detail::_Hashtable_base<unsigned int, std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, std::__detail::_Select1st, std::equal_to<unsigned int>, std::hash<unsigned int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, st
d::__detail::_Hashtable_traits<false, false, true> >::_M_equals(unsigned int const&, unsigned long, std::__detail::_Hash_node<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, false>*) const <null> (gamescope+0x4514c)
#2 std::_Hashtable<unsigned int, std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, std::allocator<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > > >, std::__detail::_Select1st, std::equal_to<unsigned int>, std::hash<unsigned i
nt>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_find_before_node(unsigned long, unsigned int const&, unsigned long) const /usr/include/c++/10.1.0/bits/hashtabl
e.h:1580 (gamescope+0x4478c)
#3 std::_Hashtable<unsigned int, std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, std::allocator<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > > >, std::__detail::_Select1st, std::equal_to<unsigned int>, std::hash<unsigned i
nt>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_find_node(unsigned long, unsigned int const&, unsigned long) const /usr/include/c++/10.1.0/bits/hashtable.h:693
(gamescope+0x43b80)
#4 std::__detail::_Map_base<unsigned int, std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, std::allocator<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > > >, std::__detail::_Select1st, std::equal_to<unsigned int>, std::hash<u
nsigned int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true>, true>::operator[](unsigned int const&) /usr/include/c++/10.1.0/bits/hashtable_policy.h:709 (gamescope+0x42f
d7)
#5 std::unordered_map<unsigned int, std::pair<bool, std::atomic<unsigned int> >, std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > > > >::operator[](unsigned int const&) /usr/include/c++/
10.1.0/bits/unordered_map.h:984 (gamescope+0x42627)
#6 page_flip_handler ../src/drm.cpp:210 (gamescope+0x3e045)
#7 drmHandleEvent <null> (libdrm.so.2+0x6874)
#8 void std::__invoke_impl<void, void (*)()>(std::__invoke_other, void (*&&)()) /usr/include/c++/10.1.0/bits/invoke.h:60 (gamescope+0x38408)
#9 std::__invoke_result<void (*)()>::type std::__invoke<void (*)()>(void (*&&)()) /usr/include/c++/10.1.0/bits/invoke.h:95 (gamescope+0x3835f)
#10 void std::thread::_Invoker<std::tuple<void (*)()> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) /usr/include/c++/10.1.0/thread:264 (gamescope+0x382c4)
#11 std::thread::_Invoker<std::tuple<void (*)()> >::operator()() /usr/include/c++/10.1.0/thread:271 (gamescope+0x3826e)
#12 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)()> > >::_M_run() /usr/include/c++/10.1.0/thread:215 (gamescope+0x380ae)
#13 execute_native_thread_routine /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80 (libstdc++.so.6+0xcfb73)
Previous write of size 8 at 0x7b0800058d68 by thread T18:
#0 operator new(unsigned long) /build/gcc/src/gcc/libsanitizer/tsan/tsan_new_delete.cpp:64 (libtsan.so.0+0x8d1c4)
#1 __gnu_cxx::new_allocator<std::__detail::_Hash_node<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, false> >::allocate(unsigned long, void const*) /usr/include/c++/10.1.0/ext/new_allocator.h:115 (gamescope+0x45be1)
#2 std::allocator_traits<std::allocator<std::__detail::_Hash_node<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, false> > >::allocate(std::allocator<std::__detail::_Hash_node<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >
, false> >&, unsigned long) <null> (gamescope+0x45283)
#3 std::__detail::_Hash_node<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, false>* std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, false> > >::_M_a
llocate_node<std::piecewise_construct_t const&, std::tuple<unsigned int const&>, std::tuple<> >(std::piecewise_construct_t const&, std::tuple<unsigned int const&>&&, std::tuple<>&&) /usr/include/c++/10.1.0/bits/hashtable_policy.h:2032 (gamescope+0x44947)
#4 std::_Hashtable<unsigned int, std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, std::allocator<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > > >, std::__detail::_Select1st, std::equal_to<unsigned int>, std::hash<unsigned i
nt>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_Scoped_node::_Scoped_node<std::piecewise_construct_t const&, std::tuple<unsigned int const&>, std::tuple<> >(std:
:__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, false> > >*, std::piecewise_construct_t const&, std::tuple<unsigned int const&>&&, std::tuple<>&&) /usr/include/c++/10.1.0/bits/hashtable.
h:272 (gamescope+0x43cba)
#5 std::__detail::_Map_base<unsigned int, std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, std::allocator<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > > >, std::__detail::_Select1st, std::equal_to<unsigned int>, std::hash<u
nsigned int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true>, true>::operator[](unsigned int const&) /usr/include/c++/10.1.0/bits/hashtable_policy.h:712 (gamescope+0x430
2f)
#6 std::unordered_map<unsigned int, std::pair<bool, std::atomic<unsigned int> >, std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > > > >::operator[](unsigned int const&) /usr/include/c++/10.1.0/bits/unordered_map.h:984 (gamescope+0x42627)
#7 drm_fbid_from_dmabuf ../src/drm.cpp:650 (gamescope+0x4071d)
#8 import_commit ../src/steamcompmgr.cpp:524 (gamescope+0x1bc0c)
#9 check_new_wayland_res() ../src/steamcompmgr.cpp:2043 (gamescope+0x23722)
#10 steamcompmgr_main ../src/steamcompmgr.cpp:2618 (gamescope+0x264d8)
#11 steamCompMgrThreadRun() ../src/main.cpp:125 (gamescope+0x3888c)
#12 void std::__invoke_impl<void, void (*)()>(std::__invoke_other, void (*&&)()) /usr/include/c++/10.1.0/bits/invoke.h:60 (gamescope+0x38408)
#13 std::__invoke_result<void (*)()>::type std::__invoke<void (*)()>(void (*&&)()) /usr/include/c++/10.1.0/bits/invoke.h:95 (gamescope+0x3835f)
#14 void std::thread::_Invoker<std::tuple<void (*)()> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) /usr/include/c++/10.1.0/thread:264 (gamescope+0x382c4)
#15 std::thread::_Invoker<std::tuple<void (*)()> >::operator()() /usr/include/c++/10.1.0/thread:271 (gamescope+0x3826e)
#16 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)()> > >::_M_run() /usr/include/c++/10.1.0/thread:215 (gamescope+0x380ae)
#17 execute_native_thread_routine /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80 (libstdc++.so.6+0xcfb73)
Location is heap block of size 24 at 0x7b0800058d60 allocated by thread T18:
#0 operator new(unsigned long) /build/gcc/src/gcc/libsanitizer/tsan/tsan_new_delete.cpp:64 (libtsan.so.0+0x8d1c4)
#1 __gnu_cxx::new_allocator<std::__detail::_Hash_node<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, false> >::allocate(unsigned long, void const*) /usr/include/c++/10.1.0/ext/new_allocator.h:115 (gamescope+0x45be1)
#2 std::allocator_traits<std::allocator<std::__detail::_Hash_node<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, false> > >::allocate(std::allocator<std::__detail::_Hash_node<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, false> >&, unsigned long) <null> (gamescope+0x45283)
#3 std::__detail::_Hash_node<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, false>* std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, false> > >::_M_allocate_node<std::piecewise_construct_t const&, std::tuple<unsigned int const&>, std::tuple<> >(std::piecewise_construct_t const&, std::tuple<unsigned int const&>&&, std::tuple<>&&) /usr/include/c++/10.1.0/bits/hashtable_policy.h:2032 (gamescope+0x44947)
#4 std::_Hashtable<unsigned int, std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, std::allocator<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > > >, std::__detail::_Select1st, std::equal_to<unsigned int>, std::hash<unsigned int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_Scoped_node::_Scoped_node<std::piecewise_construct_t const&, std::tuple<unsigned int const&>, std::tuple<> >(std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, false> > >*, std::piecewise_construct_t const&, std::tuple<unsigned int const&>&&, std::tuple<>&&) /usr/include/c++/10.1.0/bits/hashtable.h:272 (gamescope+0x43cba)
#5 std::__detail::_Map_base<unsigned int, std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > >, std::allocator<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > > >, std::__detail::_Select1st, std::equal_to<unsigned int>, std::hash<unsigned int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true>, true>::operator[](unsigned int const&) /usr/include/c++/10.1.0/bits/hashtable_policy.h:712 (gamescope+0x4302f)
#6 std::unordered_map<unsigned int, std::pair<bool, std::atomic<unsigned int> >, std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int const, std::pair<bool, std::atomic<unsigned int> > > > >::operator[](unsigned int const&) /usr/include/c++/10.1.0/bits/unordered_map.h:984 (gamescope+0x42627)
#7 drm_fbid_from_dmabuf ../src/drm.cpp:650 (gamescope+0x4071d)
#8 import_commit ../src/steamcompmgr.cpp:524 (gamescope+0x1bc0c)
#9 check_new_wayland_res() ../src/steamcompmgr.cpp:2043 (gamescope+0x23722)
#10 steamcompmgr_main ../src/steamcompmgr.cpp:2618 (gamescope+0x264d8)
#11 steamCompMgrThreadRun() ../src/main.cpp:125 (gamescope+0x3888c)
#12 void std::__invoke_impl<void, void (*)()>(std::__invoke_other, void (*&&)()) /usr/include/c++/10.1.0/bits/invoke.h:60 (gamescope+0x38408)
#13 std::__invoke_result<void (*)()>::type std::__invoke<void (*)()>(void (*&&)()) /usr/include/c++/10.1.0/bits/invoke.h:95 (gamescope+0x3835f)
#14 void std::thread::_Invoker<std::tuple<void (*)()> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) /usr/include/c++/10.1.0/thread:264 (gamescope+0x382c4)
#15 std::thread::_Invoker<std::tuple<void (*)()> >::operator()() /usr/include/c++/10.1.0/thread:271 (gamescope+0x3826e)
#16 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)()> > >::_M_run() /usr/include/c++/10.1.0/thread:215 (gamescope+0x380ae)
#17 execute_native_thread_routine /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80 (libstdc++.so.6+0xcfb73)
Thread T17 (tid=123590, running) created by main thread at:
#0 pthread_create /build/gcc/src/gcc/libsanitizer/tsan/tsan_interceptors_posix.cpp:962 (libtsan.so.0+0x5efab)
#1 __gthread_create /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/gthr-default.h:663 (libstdc++.so.6+0xcfe49)
#2 std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:135 (libstdc++.so.6+0xcfe49)
#3 init_drm ../src/drm.cpp:446 (gamescope+0x3f912)
#4 initOutput ../src/main.cpp:171 (gamescope+0x38b0d)
#5 main ../src/main.cpp:114 (gamescope+0x387e0)
Thread T18 (tid=123624, running) created by main thread at:
#0 pthread_create /build/gcc/src/gcc/libsanitizer/tsan/tsan_interceptors_posix.cpp:962 (libtsan.so.0+0x5efab)
#1 __gthread_create /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/gthr-default.h:663 (libstdc++.so.6+0xcfe49)
#2 std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:135 (libstdc++.so.6+0xcfe49)
#3 startSteamCompMgr ../src/main.cpp:130 (gamescope+0x388e3)
#4 xwayland_ready ../src/wlserver.c:105 (gamescope+0x3b614)
#5 wlr_signal_emit_safe ../subprojects/wlroots/util/signal.c:29 (gamescope+0xa8096)
#6 xserver_handle_ready ../subprojects/wlroots/xwayland/xwayland.c:250 (gamescope+0xa912d)
#7 <null> <null> (libwayland-server.so.0+0xa434)
#8 main ../src/main.cpp:120 (gamescope+0x38821)
SUMMARY: ThreadSanitizer: data race /usr/include/c++/10.1.0/bits/stl_function.h:356 in std::equal_to<unsigned int>::operator()(unsigned int const&, unsigned int const&) const
==================
==================
WARNING: ThreadSanitizer: data race (pid=123555)
Write of size 1 at 0x55b92e3069ec by thread T24:
#0 operator() ../src/steamcompmgr.cpp:2277 (gamescope+0x2394d)
#1 __invoke_impl<void, steamcompmgr_main(int, char**)::<lambda()> > /usr/include/c++/10.1.0/bits/invoke.h:60 (gamescope+0x26d7e)
#2 __invoke<steamcompmgr_main(int, char**)::<lambda()> > /usr/include/c++/10.1.0/bits/invoke.h:95 (gamescope+0x26ceb)
#3 _M_invoke<0> /usr/include/c++/10.1.0/thread:264 (gamescope+0x26c50)
#4 operator() /usr/include/c++/10.1.0/thread:271 (gamescope+0x26bfa)
#5 _M_run /usr/include/c++/10.1.0/thread:215 (gamescope+0x26bb4)
#6 execute_native_thread_routine /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80 (libstdc++.so.6+0xcfb73)
Previous read of size 1 at 0x55b92e3069ec by main thread:
#0 wlserver_run ../src/wlserver.c:450 (gamescope+0x3d13c)
#1 main ../src/main.cpp:120 (gamescope+0x38821)
Location is global 'run' of size 1 at 0x55b92e3069ec (gamescope+0x00000010b9ec)
Thread T24 (tid=123632, running) created by thread T18 at:
#0 pthread_create /build/gcc/src/gcc/libsanitizer/tsan/tsan_interceptors_posix.cpp:962 (libtsan.so.0+0x5efab)
#1 __gthread_create /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/gthr-default.h:663 (libstdc++.so.6+0xcfe49)
#2 std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:135 (libstdc++.so.6+0xcfe49)
#3 steamcompmgr_main ../src/steamcompmgr.cpp:2278 (gamescope+0x24ac1)
#4 steamCompMgrThreadRun() ../src/main.cpp:125 (gamescope+0x3888c)
#5 void std::__invoke_impl<void, void (*)()>(std::__invoke_other, void (*&&)()) /usr/include/c++/10.1.0/bits/invoke.h:60 (gamescope+0x38408)
#6 std::__invoke_result<void (*)()>::type std::__invoke<void (*)()>(void (*&&)()) /usr/include/c++/10.1.0/bits/invoke.h:95 (gamescope+0x3835f)
#7 void std::thread::_Invoker<std::tuple<void (*)()> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) /usr/include/c++/10.1.0/thread:264 (gamescope+0x382c4)
#8 std::thread::_Invoker<std::tuple<void (*)()> >::operator()() /usr/include/c++/10.1.0/thread:271 (gamescope+0x3826e)
#9 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)()> > >::_M_run() /usr/include/c++/10.1.0/thread:215 (gamescope+0x380ae)
#10 execute_native_thread_routine /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80 (libstdc++.so.6+0xcfb73)
SUMMARY: ThreadSanitizer: data race ../src/steamcompmgr.cpp:2277 in operator()
==================