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 warnings #6738

Closed
jedelbo opened this issue Jun 22, 2023 · 5 comments
Closed

Thread sanitizer warnings #6738

jedelbo opened this issue Jun 22, 2023 · 5 comments
Assignees

Comments

@jedelbo
Copy link
Contributor

jedelbo commented Jun 22, 2023

I noticed these warnings:

[2023/06/22 11:41:12.875] 1: ==================
[2023/06/22 11:41:12.875] 1: WARNING: ThreadSanitizer: data race (pid=4399)
[2023/06/22 11:41:12.875] 1:   Write of size 8 at 0x7f7ad63024d0 by thread T126 (mutexes: write M331068, write M1100144374546296920):
[2023/06/22 11:41:12.875] 1:     #0 memcpy /home/nnelson/Documents/llvm-project/llvm/utils/release/final/llvm-project/compiler-rt/lib/tsan/../sanitizer_common/sanitizer_common_interceptors.inc:808 (realm-tests+0x7aa52e)
[2023/06/22 11:41:12.875] 1:     #1 void realm::GroupWriter::write_array_at<realm::GroupWriter::MapWindow>(realm::GroupWriter::MapWindow*, unsigned long, char const*, unsigned long) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/group_writer.cpp:1334 (realm-tests+0x175394a)
[2023/06/22 11:41:12.878] 1:     #2 realm::GroupWriter::write_group() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/group_writer.cpp:897 (realm-tests+0x174da9f)
[2023/06/22 11:41:12.878] 1:     #3 realm::DB::low_level_commit(unsigned long, realm::Transaction&, bool) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/db.cpp:2481 (realm-tests+0x173bcb9)
[2023/06/22 11:41:12.879] 1:     #4 realm::DB::do_commit(realm::Transaction&, bool) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/db.cpp:2411 (realm-tests+0x173b7b8)
[2023/06/22 11:41:12.887] 1:     #5 realm::Transaction::commit_and_continue_as_read(bool) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/transaction.cpp:262 (realm-tests+0x18744a9)
[2023/06/22 11:41:12.887] 1:     #6 (anonymous namespace)::handover_writer(std::shared_ptr<realm::DB>) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/test_lang_bind_helper.cpp:3716 (realm-tests+0xc975e2)
[2023/06/22 11:41:12.889] 1:     #7 operator() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/test_lang_bind_helper.cpp:3740 (realm-tests+0xc975e2)
[2023/06/22 11:41:12.889] 1:     #8 void* realm::util::Thread::entry_point<(anonymous namespace)::handover_querier((anonymous namespace)::HandoverControl<(anonymous namespace)::Work>*, realm::test_util::unit_test::TestContext&, std::shared_ptr<realm::DB>)::$_36>(void*) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/util/thread.hpp:483 (realm-tests+0xc975e2)
[2023/06/22 11:41:12.889] 1:
[2023/06/22 11:41:12.889] 1:   Previous read of size 8 at 0x7f7ad63024d0 by thread T124:
[2023/06/22 11:41:12.889] 1:     [failed to restore the stack]
[2023/06/22 11:41:12.889] 1:
[2023/06/22 11:41:12.889] 1:   Mutex M331068 (0x7f7ad679f030) created at:
[2023/06/22 11:41:12.890] 1:     #0 pthread_mutex_lock /home/nnelson/Documents/llvm-project/llvm/utils/release/final/llvm-project/compiler-rt/lib/tsan/../sanitizer_common/sanitizer_common_interceptors.inc:4196 (realm-tests+0x7bdef6)
[2023/06/22 11:41:12.890] 1:     #1 realm::util::RobustMutex::low_level_lock() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/util/thread.cpp:211 (realm-tests+0x1902718)
[2023/06/22 11:41:12.891] 1:     #2 void realm::util::RobustMutex::lock<realm::util::InterprocessMutex::lock()::{lambda()#1}>(realm::util::InterprocessMutex::lock()::{lambda()#1}) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/util/thread.hpp:639 (realm-tests+0x173a4bf)
[2023/06/22 11:41:12.891] 1:     #3 realm::util::InterprocessMutex::lock() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/util/interprocess_mutex.hpp:343 (realm-tests+0x173a4bf)
[2023/06/22 11:41:12.891] 1:     #4 realm::DB::do_begin_write() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/db.cpp:2310 (realm-tests+0x173a4bf)
[2023/06/22 11:41:12.895] 1:     #5 realm::DB::start_write(bool) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/db.cpp:2655 (realm-tests+0x1737407)
[2023/06/22 11:41:12.896] 1:     #6 Realm_UnitTest__LangBindHelper_HandoverBetweenThreads::test_run() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/test_lang_bind_helper.cpp:3864 (realm-tests+0xc3c4ee)
[2023/06/22 11:41:12.896] 1:     #7 realm::test_util::unit_test::RegisterTest<Realm_UnitTest__LangBindHelper_HandoverBetweenThreads>::run_test(realm::test_util::unit_test::TestContext&) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/util/unit_test.hpp:640 (realm-tests+0xc9f020)
[2023/06/22 11:41:12.896] 1:     #8 realm::test_util::unit_test::TestList::ThreadContextImpl::run(realm::test_util::unit_test::TestList::SharedContextImpl::Entry, realm::util::UniqueLock&) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/util/unit_test.cpp:728 (realm-tests+0x1524a4e)
[2023/06/22 11:41:12.896] 1:     #9 realm::test_util::unit_test::TestList::ThreadContextImpl::run() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/util/unit_test.cpp:682 (realm-tests+0x1524413)
[2023/06/22 11:41:12.896] 1:     #10 operator() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/util/unit_test.cpp:641 (realm-tests+0x1529a2a)
[2023/06/22 11:41:12.896] 1:     #11 operator() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/util/unit_test.cpp:645 (realm-tests+0x1529a2a)
[2023/06/22 11:41:12.897] 1:     #12 void* realm::util::Thread::entry_point<realm::test_util::unit_test::TestList::run(realm::test_util::unit_test::TestList::Config)::$_1>(void*) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/util/thread.hpp:483 (realm-tests+0x1529a2a)
[2023/06/22 11:41:12.897] 1:
[2023/06/22 11:41:12.897] 1:   Mutex M1100144374546296920 is already destroyed.
[2023/06/22 11:41:12.897] 1:
[2023/06/22 11:41:12.897] 1:   Thread T126 (tid=4740, running) created by thread T124 at:
[2023/06/22 11:41:12.897] 1:     #0 pthread_create /home/nnelson/Documents/llvm-project/llvm/utils/release/final/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:966 (realm-tests+0x7a094b)
[2023/06/22 11:41:12.897] 1:     #1 realm::util::Thread::start(void* (*)(void*), void*) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/util/thread.hpp:472 (realm-tests+0xc96533)
[2023/06/22 11:41:12.897] 1:     #2 void realm::util::Thread::start<(anonymous namespace)::handover_querier((anonymous namespace)::HandoverControl<(anonymous namespace)::Work>*, realm::test_util::unit_test::TestContext&, std::shared_ptr<realm::DB>)::$_36>((anonymous namespace)::handover_querier((anonymous namespace)::HandoverControl<(anonymous namespace)::Work>*, realm::test_util::unit_test::TestContext&, std::shared_ptr<realm::DB>)::$_36) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/util/thread.hpp:450 (realm-tests+0xc96533)
[2023/06/22 11:41:12.898] 1:     #3 (anonymous namespace)::handover_querier((anonymous namespace)::HandoverControl<(anonymous namespace)::Work>*, realm::test_util::unit_test::TestContext&, std::shared_ptr<realm::DB>) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/test_lang_bind_helper.cpp:3739 (realm-tests+0xc96533)
[2023/06/22 11:41:12.898] 1:     #4 operator() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/test_lang_bind_helper.cpp:3876 (realm-tests+0xc96533)
[2023/06/22 11:41:12.898] 1:     #5 void* realm::util::Thread::entry_point<Realm_UnitTest__LangBindHelper_HandoverBetweenThreads::test_run()::$_15>(void*) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/util/thread.hpp:483 (realm-tests+0xc96533)
[2023/06/22 11:41:12.898] 1:
[2023/06/22 11:41:12.898] 1:   Thread T124 (tid=4738, running) created by thread T6 at:
[2023/06/22 11:41:12.898] 1:     #0 pthread_create /home/nnelson/Documents/llvm-project/llvm/utils/release/final/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:966 (realm-tests+0x7a094b)
[2023/06/22 11:41:12.898] 1:     #1 realm::util::Thread::start(void* (*)(void*), void*) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/util/thread.hpp:472 (realm-tests+0xc3c8b3)
[2023/06/22 11:41:12.899] 1:     #2 void realm::util::Thread::start<Realm_UnitTest__LangBindHelper_HandoverBetweenThreads::test_run()::$_15>(Realm_UnitTest__LangBindHelper_HandoverBetweenThreads::test_run()::$_15) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/util/thread.hpp:450 (realm-tests+0xc3c8b3)
[2023/06/22 11:41:12.899] 1:     #3 Realm_UnitTest__LangBindHelper_HandoverBetweenThreads::test_run() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/test_lang_bind_helper.cpp:3875 (realm-tests+0xc3c8b3)
[2023/06/22 11:41:12.899] 1:     #4 realm::test_util::unit_test::RegisterTest<Realm_UnitTest__LangBindHelper_HandoverBetweenThreads>::run_test(realm::test_util::unit_test::TestContext&) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/util/unit_test.hpp:640 (realm-tests+0xc9f020)
[2023/06/22 11:41:12.899] 1:     #5 realm::test_util::unit_test::TestList::ThreadContextImpl::run(realm::test_util::unit_test::TestList::SharedContextImpl::Entry, realm::util::UniqueLock&) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/util/unit_test.cpp:728 (realm-tests+0x1524a4e)
[2023/06/22 11:41:12.899] 1:     #6 realm::test_util::unit_test::TestList::ThreadContextImpl::run() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/util/unit_test.cpp:682 (realm-tests+0x1524413)
[2023/06/22 11:41:12.900] 1:     #7 operator() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/util/unit_test.cpp:641 (realm-tests+0x1529a2a)
[2023/06/22 11:41:12.900] 1:     #8 operator() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/util/unit_test.cpp:645 (realm-tests+0x1529a2a)
[2023/06/22 11:41:12.900] 1:     #9 void* realm::util::Thread::entry_point<realm::test_util::unit_test::TestList::run(realm::test_util::unit_test::TestList::Config)::$_1>(void*) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/util/thread.hpp:483 (realm-tests+0x1529a2a)
[2023/06/22 11:41:12.900] 1:
[2023/06/22 11:41:12.900] 1: SUMMARY: ThreadSanitizer: data race /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/group_writer.cpp:1334 in void realm::GroupWriter::write_array_at<realm::GroupWriter::MapWindow>(realm::GroupWriter::MapWindow*, unsigned long, char const*, unsigned long)
[2023/06/22 11:41:12.948] 1: ==================
[2023/06/22 11:41:12.948] 1: ==================
[2023/06/22 11:41:12.948] 1: WARNING: ThreadSanitizer: data race (pid=4399)
[2023/06/22 11:41:12.948] 1:   Write of size 4 at 0x7f7ad63024f0 by thread T126 (mutexes: write M331068, write M1100144374546296920):
[2023/06/22 11:41:12.948] 1:     #0 void realm::GroupWriter::write_array_at<realm::GroupWriter::MapWindow>(realm::GroupWriter::MapWindow*, unsigned long, char const*, unsigned long) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/group_writer.cpp:1333 (realm-tests+0x1753928)
[2023/06/22 11:41:12.948] 1:     #1 realm::GroupWriter::write_group() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/group_writer.cpp:909 (realm-tests+0x174db2c)
[2023/06/22 11:41:12.948] 1:     #2 realm::DB::low_level_commit(unsigned long, realm::Transaction&, bool) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/db.cpp:2481 (realm-tests+0x173bcb9)
[2023/06/22 11:41:12.948] 1:     #3 realm::DB::do_commit(realm::Transaction&, bool) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/db.cpp:2411 (realm-tests+0x173b7b8)
[2023/06/22 11:41:12.948] 1:     #4 realm::Transaction::commit_and_continue_as_read(bool) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/transaction.cpp:262 (realm-tests+0x18744a9)
[2023/06/22 11:41:12.949] 1:     #5 (anonymous namespace)::handover_writer(std::shared_ptr<realm::DB>) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/test_lang_bind_helper.cpp:3716 (realm-tests+0xc975e2)
[2023/06/22 11:41:12.949] 1:     #6 operator() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/test_lang_bind_helper.cpp:3740 (realm-tests+0xc975e2)
[2023/06/22 11:41:12.949] 1:     #7 void* realm::util::Thread::entry_point<(anonymous namespace)::handover_querier((anonymous namespace)::HandoverControl<(anonymous namespace)::Work>*, realm::test_util::unit_test::TestContext&, std::shared_ptr<realm::DB>)::$_36>(void*) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/util/thread.hpp:483 (realm-tests+0xc975e2)
[2023/06/22 11:41:12.949] 1:
[2023/06/22 11:41:12.949] 1:   Previous read of size 8 at 0x7f7ad63024f0 by thread T124:
[2023/06/22 11:41:12.949] 1:     [failed to restore the stack]
[2023/06/22 11:41:12.949] 1:
[2023/06/22 11:41:12.950] 1:   Mutex M331068 (0x7f7ad679f030) created at:
[2023/06/22 11:41:12.950] 1:     #0 pthread_mutex_lock /home/nnelson/Documents/llvm-project/llvm/utils/release/final/llvm-project/compiler-rt/lib/tsan/../sanitizer_common/sanitizer_common_interceptors.inc:4196 (realm-tests+0x7bdef6)
[2023/06/22 11:41:12.951] 1:     #1 realm::util::RobustMutex::low_level_lock() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/util/thread.cpp:211 (realm-tests+0x1902718)
[2023/06/22 11:41:12.951] 1:     #2 void realm::util::RobustMutex::lock<realm::util::InterprocessMutex::lock()::{lambda()#1}>(realm::util::InterprocessMutex::lock()::{lambda()#1}) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/util/thread.hpp:639 (realm-tests+0x173a4bf)
[2023/06/22 11:41:12.952] 1:     #3 realm::util::InterprocessMutex::lock() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/util/interprocess_mutex.hpp:343 (realm-tests+0x173a4bf)
[2023/06/22 11:41:12.952] 1:     #4 realm::DB::do_begin_write() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/db.cpp:2310 (realm-tests+0x173a4bf)
[2023/06/22 11:41:12.954] 1:     #5 realm::DB::start_write(bool) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/db.cpp:2655 (realm-tests+0x1737407)
[2023/06/22 11:41:12.954] 1:     #6 Realm_UnitTest__LangBindHelper_HandoverBetweenThreads::test_run() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/test_lang_bind_helper.cpp:3864 (realm-tests+0xc3c4ee)
[2023/06/22 11:41:12.954] 1:     #7 realm::test_util::unit_test::RegisterTest<Realm_UnitTest__LangBindHelper_HandoverBetweenThreads>::run_test(realm::test_util::unit_test::TestContext&) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/util/unit_test.hpp:640 (realm-tests+0xc9f020)
[2023/06/22 11:41:12.954] 1:     #8 realm::test_util::unit_test::TestList::ThreadContextImpl::run(realm::test_util::unit_test::TestList::SharedContextImpl::Entry, realm::util::UniqueLock&) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/util/unit_test.cpp:728 (realm-tests+0x1524a4e)
[2023/06/22 11:41:12.955] 1:     #9 realm::test_util::unit_test::TestList::ThreadContextImpl::run() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/util/unit_test.cpp:682 (realm-tests+0x1524413)
[2023/06/22 11:41:12.955] 1:     #10 operator() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/util/unit_test.cpp:641 (realm-tests+0x1529a2a)
[2023/06/22 11:41:12.955] 1:     #11 operator() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/util/unit_test.cpp:645 (realm-tests+0x1529a2a)
[2023/06/22 11:41:12.955] 1:     #12 void* realm::util::Thread::entry_point<realm::test_util::unit_test::TestList::run(realm::test_util::unit_test::TestList::Config)::$_1>(void*) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/util/thread.hpp:483 (realm-tests+0x1529a2a)
[2023/06/22 11:41:12.955] 1:
[2023/06/22 11:41:12.955] 1:   Mutex M1100144374546296920 is already destroyed.
[2023/06/22 11:41:12.955] 1:
[2023/06/22 11:41:12.955] 1:   Thread T126 (tid=4740, running) created by thread T124 at:
[2023/06/22 11:41:12.955] 1:     #0 pthread_create /home/nnelson/Documents/llvm-project/llvm/utils/release/final/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:966 (realm-tests+0x7a094b)
[2023/06/22 11:41:12.959] 1:     #1 realm::util::Thread::start(void* (*)(void*), void*) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/util/thread.hpp:472 (realm-tests+0xc96533)
[2023/06/22 11:41:12.962] 1:     #2 void realm::util::Thread::start<(anonymous namespace)::handover_querier((anonymous namespace)::HandoverControl<(anonymous namespace)::Work>*, realm::test_util::unit_test::TestContext&, std::shared_ptr<realm::DB>)::$_36>((anonymous namespace)::handover_querier((anonymous namespace)::HandoverControl<(anonymous namespace)::Work>*, realm::test_util::unit_test::TestContext&, std::shared_ptr<realm::DB>)::$_36) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/util/thread.hpp:450 (realm-tests+0xc96533)
[2023/06/22 11:41:12.967] 1:     #3 (anonymous namespace)::handover_querier((anonymous namespace)::HandoverControl<(anonymous namespace)::Work>*, realm::test_util::unit_test::TestContext&, std::shared_ptr<realm::DB>) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/test_lang_bind_helper.cpp:3739 (realm-tests+0xc96533)
[2023/06/22 11:41:12.967] 1:     #4 operator() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/test_lang_bind_helper.cpp:3876 (realm-tests+0xc96533)
[2023/06/22 11:41:12.968] 1:     #5 void* realm::util::Thread::entry_point<Realm_UnitTest__LangBindHelper_HandoverBetweenThreads::test_run()::$_15>(void*) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/util/thread.hpp:483 (realm-tests+0xc96533)
[2023/06/22 11:41:12.968] 1:
[2023/06/22 11:41:12.968] 1:   Thread T124 (tid=4738, running) created by thread T6 at:
[2023/06/22 11:41:12.968] 1:     #0 pthread_create /home/nnelson/Documents/llvm-project/llvm/utils/release/final/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:966 (realm-tests+0x7a094b)
[2023/06/22 11:41:12.969] 1:     #1 realm::util::Thread::start(void* (*)(void*), void*) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/util/thread.hpp:472 (realm-tests+0xc3c8b3)
[2023/06/22 11:41:12.970] 1:     #2 void realm::util::Thread::start<Realm_UnitTest__LangBindHelper_HandoverBetweenThreads::test_run()::$_15>(Realm_UnitTest__LangBindHelper_HandoverBetweenThreads::test_run()::$_15) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/util/thread.hpp:450 (realm-tests+0xc3c8b3)
[2023/06/22 11:41:12.970] 1:     #3 Realm_UnitTest__LangBindHelper_HandoverBetweenThreads::test_run() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/test_lang_bind_helper.cpp:3875 (realm-tests+0xc3c8b3)
[2023/06/22 11:41:12.970] 1:     #4 realm::test_util::unit_test::RegisterTest<Realm_UnitTest__LangBindHelper_HandoverBetweenThreads>::run_test(realm::test_util::unit_test::TestContext&) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/util/unit_test.hpp:640 (realm-tests+0xc9f020)
[2023/06/22 11:41:12.970] 1:     #5 realm::test_util::unit_test::TestList::ThreadContextImpl::run(realm::test_util::unit_test::TestList::SharedContextImpl::Entry, realm::util::UniqueLock&) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/util/unit_test.cpp:728 (realm-tests+0x1524a4e)
[2023/06/22 11:41:12.971] 1:     #6 realm::test_util::unit_test::TestList::ThreadContextImpl::run() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/util/unit_test.cpp:682 (realm-tests+0x1524413)
[2023/06/22 11:41:12.973] 1:     #7 operator() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/util/unit_test.cpp:641 (realm-tests+0x1529a2a)
[2023/06/22 11:41:12.973] 1:     #8 operator() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/util/unit_test.cpp:645 (realm-tests+0x1529a2a)
[2023/06/22 11:41:12.973] 1:     #9 void* realm::util::Thread::entry_point<realm::test_util::unit_test::TestList::run(realm::test_util::unit_test::TestList::Config)::$_1>(void*) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/util/thread.hpp:483 (realm-tests+0x1529a2a)
[2023/06/22 11:41:12.973] 1:
[2023/06/22 11:41:12.973] 1: SUMMARY: ThreadSanitizer: data race /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/group_writer.cpp:1333 in void realm::GroupWriter::write_array_at<realm::GroupWriter::MapWindow>(realm::GroupWriter::MapWindow*, unsigned long, char const*, unsigned long)
[2023/06/22 11:41:12.973] 1: ==================
[2023/06/22 11:41:13.027] 1: ==================
[2023/06/22 11:41:13.027] 1: WARNING: ThreadSanitizer: data race (pid=4399)
[2023/06/22 11:41:13.027] 1:   Write of size 8 at 0x7f7ad63024f8 by thread T126 (mutexes: write M331068, write M1100144374546296920):
[2023/06/22 11:41:13.027] 1:     #0 memcpy /home/nnelson/Documents/llvm-project/llvm/utils/release/final/llvm-project/compiler-rt/lib/tsan/../sanitizer_common/sanitizer_common_interceptors.inc:808 (realm-tests+0x7aa52e)
[2023/06/22 11:41:13.027] 1:     #1 void realm::GroupWriter::write_array_at<realm::GroupWriter::MapWindow>(realm::GroupWriter::MapWindow*, unsigned long, char const*, unsigned long) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/group_writer.cpp:1334 (realm-tests+0x175394a)
[2023/06/22 11:41:13.027] 1:     #2 realm::GroupWriter::write_group() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/group_writer.cpp:909 (realm-tests+0x174db2c)
[2023/06/22 11:41:13.028] 1:     #3 realm::DB::low_level_commit(unsigned long, realm::Transaction&, bool) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/db.cpp:2481 (realm-tests+0x173bcb9)
[2023/06/22 11:41:13.028] 1:     #4 realm::DB::do_commit(realm::Transaction&, bool) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/db.cpp:2411 (realm-tests+0x173b7b8)
[2023/06/22 11:41:13.028] 1:     #5 realm::Transaction::commit_and_continue_as_read(bool) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/transaction.cpp:262 (realm-tests+0x18744a9)
[2023/06/22 11:41:13.028] 1:     #6 (anonymous namespace)::handover_writer(std::shared_ptr<realm::DB>) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/test_lang_bind_helper.cpp:3716 (realm-tests+0xc975e2)
[2023/06/22 11:41:13.028] 1:     #7 operator() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/test_lang_bind_helper.cpp:3740 (realm-tests+0xc975e2)
[2023/06/22 11:41:13.028] 1:     #8 void* realm::util::Thread::entry_point<(anonymous namespace)::handover_querier((anonymous namespace)::HandoverControl<(anonymous namespace)::Work>*, realm::test_util::unit_test::TestContext&, std::shared_ptr<realm::DB>)::$_36>(void*) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/util/thread.hpp:483 (realm-tests+0xc975e2)
[2023/06/22 11:41:13.028] 1:
[2023/06/22 11:41:13.028] 1: Thread[11]: ../test/test_binary_data.cpp:158: Begin BinaryData_LexicographicCompare  Previous read of size 8 at 0x7f7ad63024f8 by thread T124:
[2023/06/22 11:41:13.028] 1:
[2023/06/22 11:41:13.028] 1:     [failed to restore the stack]
[2023/06/22 11:41:13.028] 1:
[2023/06/22 11:41:13.028] 1:   Mutex M331068 (0x7f7ad679f030) created at:
[2023/06/22 11:41:13.028] 1:     #0 pthread_mutex_lock /home/nnelson/Documents/llvm-project/llvm/utils/release/final/llvm-project/compiler-rt/lib/tsan/../sanitizer_common/sanitizer_common_interceptors.inc:4196 (realm-tests+0x7bdef6)
[2023/06/22 11:41:13.029] 1: Thread[11]: ../test/test_query2.cpp:255: Begin Query_FindAllParens1
[2023/06/22 11:41:13.029] 1: Thread[11]: ../test/test_group.cpp:1251: Begin Group_CascadeNotify_TableViewClearWeak
[2023/06/22 11:41:13.029] 1:     #1 realm::util::RobustMutex::low_level_lock() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/util/thread.cpp:211 (realm-tests+0x1902718)
[2023/06/22 11:41:13.033] 1:     #2 void realm::util::RobustMutex::lock<realm::util::InterprocessMutex::lock()::{lambda()#1}>(realm::util::InterprocessMutex::lock()::{lambda()#1}) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/util/thread.hpp:639 (realm-tests+0x173a4bf)
[2023/06/22 11:41:13.033] 1:     #3 realm::util::InterprocessMutex::lock() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/util/interprocess_mutex.hpp:343 (realm-tests+0x173a4bf)
[2023/06/22 11:41:13.033] 1:     #4 realm::DB::do_begin_write() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/db.cpp:2310 (realm-tests+0x173a4bf)
[2023/06/22 11:41:13.033] 1:     #5 realm::DB::start_write(bool) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/db.cpp:2655 (realm-tests+0x1737407)
[2023/06/22 11:41:13.034] 1:     #6 Realm_UnitTest__LangBindHelper_HandoverBetweenThreads::test_run() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/test_lang_bind_helper.cpp:3864 (realm-tests+0xc3c4ee)
[2023/06/22 11:41:13.034] 1:     #7 realm::test_util::unit_test::RegisterTest<Realm_UnitTest__LangBindHelper_HandoverBetweenThreads>::run_test(realm::test_util::unit_test::TestContext&) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/util/unit_test.hpp:640 (realm-tests+0xc9f020)
[2023/06/22 11:41:13.034] 1:     #8 realm::test_util::unit_test::TestList::ThreadContextImpl::run(realm::test_util::unit_test::TestList::SharedContextImpl::Entry, realm::util::UniqueLock&) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/util/unit_test.cpp:728 (realm-tests+0x1524a4e)
[2023/06/22 11:41:13.034] 1:     #9 realm::test_util::unit_test::TestList::ThreadContextImpl::run() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/util/unit_test.cpp:682 (realm-tests+0x1524413)
[2023/06/22 11:41:13.034] 1:     #10 operator() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/util/unit_test.cpp:641 (realm-tests+0x1529a2a)
[2023/06/22 11:41:13.034] 1:     #11 operator() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/util/unit_test.cpp:645 (realm-tests+0x1529a2a)
[2023/06/22 11:41:13.034] 1:     #12 void* realm::util::Thread::entry_point<realm::test_util::unit_test::TestList::run(realm::test_util::unit_test::TestList::Config)::$_1>(void*) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/util/thread.hpp:483 (realm-tests+0x1529a2a)
[2023/06/22 11:41:13.034] 1: Thread[11]: ../test/test_list.cpp:320: Begin List_Ops<realm::test_util::Prop<realm::Timestamp,+(realm::test_util::ColumnState)1,+void>>
[2023/06/22 11:41:13.035] 1:
[2023/06/22 11:41:13.035] 1:   Mutex M1100144374546296920 is already destroyed.
[2023/06/22 11:41:13.035] 1:
[2023/06/22 11:41:13.035] 1:   Thread T126 (tid=4740, running) created by thread T124 at:
[2023/06/22 11:41:13.035] 1:     #0 pthread_create /home/nnelson/Documents/llvm-project/llvm/utils/release/final/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:966 (realm-tests+0x7a094b)
[2023/06/22 11:41:13.035] 1: Thread[11]: ../test/test_lang_bind_helper.cpp:2789: Begin LangBindHelper_RollbackAndContinueAsRead_IntIndex
[2023/06/22 11:41:13.035] 1:     #1 realm::util::Thread::start(void* (*)(void*), void*) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/util/thread.hpp:472 (realm-tests+0xc96533)
[2023/06/22 11:41:13.036] 1:     #2 void realm::util::Thread::start<(anonymous namespace)::handover_querier((anonymous namespace)::HandoverControl<(anonymous namespace)::Work>*, realm::test_util::unit_test::TestContext&, std::shared_ptr<realm::DB>)::$_36>((anonymous namespace)::handover_querier((anonymous namespace)::HandoverControl<(anonymous namespace)::Work>*, realm::test_util::unit_test::TestContext&, std::shared_ptr<realm::DB>)::$_36) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/util/thread.hpp:450 (realm-tests+0xc96533)
[2023/06/22 11:41:13.036] 1:     #3 (anonymous namespace)::handover_querier((anonymous namespace)::HandoverControl<(anonymous namespace)::Work>*, realm::test_util::unit_test::TestContext&, std::shared_ptr<realm::DB>) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/test_lang_bind_helper.cpp:3739 (realm-tests+0xc96533)
[2023/06/22 11:41:13.036] 1:     #4 operator() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/test_lang_bind_helper.cpp:3876 (realm-tests+0xc96533)
[2023/06/22 11:41:13.036] 1:     #5 void* realm::util::Thread::entry_point<Realm_UnitTest__LangBindHelper_HandoverBetweenThreads::test_run()::$_15>(void*) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/util/thread.hpp:483 (realm-tests+0xc96533)
[2023/06/22 11:41:13.036] 1:
[2023/06/22 11:41:13.036] 1:   Thread T124 (tid=4738, running) created by thread T6 at:
[2023/06/22 11:41:13.036] 1:     #0 pthread_create /home/nnelson/Documents/llvm-project/llvm/utils/release/final/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:966 (realm-tests+0x7a094b)
[2023/06/22 11:41:13.036] 1:     #1 realm::util::Thread::start(void* (*)(void*), void*) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/util/thread.hpp:472 (realm-tests+0xc3c8b3)
[2023/06/22 11:41:13.036] 1:     #2 void realm::util::Thread::start<Realm_UnitTest__LangBindHelper_HandoverBetweenThreads::test_run()::$_15>(Realm_UnitTest__LangBindHelper_HandoverBetweenThreads::test_run()::$_15) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/util/thread.hpp:450 (realm-tests+0xc3c8b3)
[2023/06/22 11:41:13.036] 1:     #3 Realm_UnitTest__LangBindHelper_HandoverBetweenThreads::test_run() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/test_lang_bind_helper.cpp:3875 (realm-tests+0xc3c8b3)
[2023/06/22 11:41:13.037] 1:     #4 realm::test_util::unit_test::RegisterTest<Realm_UnitTest__LangBindHelper_HandoverBetweenThreads>::run_test(realm::test_util::unit_test::TestContext&) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/util/unit_test.hpp:640 (realm-tests+0xc9f020)
[2023/06/22 11:41:13.037] 1:     #5 realm::test_util::unit_test::TestList::ThreadContextImpl::run(realm::test_util::unit_test::TestList::SharedContextImpl::Entry, realm::util::UniqueLock&) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/util/unit_test.cpp:728 (realm-tests+0x1524a4e)
[2023/06/22 11:41:13.037] 1:     #6 realm::test_util::unit_test::TestList::ThreadContextImpl::run() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/util/unit_test.cpp:682 (realm-tests+0x1524413)
[2023/06/22 11:41:13.037] 1:     #7 operator() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/util/unit_test.cpp:641 (realm-tests+0x1529a2a)
[2023/06/22 11:41:13.037] 1:     #8 operator() /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../test/util/unit_test.cpp:645 (realm-tests+0x1529a2a)
[2023/06/22 11:41:13.037] 1:     #9 void* realm::util::Thread::entry_point<realm::test_util::unit_test::TestList::run(realm::test_util::unit_test::TestList::Config)::$_1>(void*) /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/util/thread.hpp:483 (realm-tests+0x1529a2a)
[2023/06/22 11:41:13.037] 1:
[2023/06/22 11:41:13.037] 1: SUMMARY: ThreadSanitizer: data race /data/mci/32d3279a995390a6bd3d9f9be96dbf76/realm-core/build/../src/realm/group_writer.cpp:1334 in void realm::GroupWriter::write_array_at<realm::GroupWriter::MapWindow>(realm::GroupWriter::MapWindow*, unsigned long, char const*, unsigned long)
[2023/06/22 11:41:13.038] 1: ==================
@jedelbo
Copy link
Contributor Author

jedelbo commented Jun 22, 2023

@finnschiermer you are so good at this ...

@nicola-cab
Copy link
Member

Seems similar to this one: #6474

@finnschiermer
Copy link
Contributor

Agreed.

@finnschiermer
Copy link
Contributor

Likely the same as this one: #6624 (one has the writer, the reader stack is gone, the other has the reader, the writer stack is gone)

@kiburtse
Copy link
Contributor

Duplicate of #6474

@kiburtse kiburtse marked this as a duplicate of #6474 Jun 27, 2023
@kiburtse kiburtse closed this as not planned Won't fix, can't repro, duplicate, stale Oct 11, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants