songgaoye commented on PR #3689:
URL: https://github.com/apache/brpc/pull/3689#issuecomment-6474155250

   run tsan on master branch.
   ```shell
   Running main() from 
/tmp/brpc-master-tsan/build-tsan/googletest-src/googletest/src/gtest_main.cc
   Note: Google Test filter = BthreadIdTest.join_races_with_destroy
   [==========] Running 1 test from 1 test suite.
   [----------] Global test environment set-up.
   [----------] 1 test from BthreadIdTest
   [ RUN      ] BthreadIdTest.join_races_with_destroy
   ==================
   WARNING: ThreadSanitizer: data race (pid=344302)
     Write of size 4 at 0x729400000040 by main thread:
       #0 bthread_id_unlock_and_destroy 
/tmp/brpc-master-tsan/src/bthread/id.cpp:630
       #1 TestBody /tmp/brpc-master-tsan/test/bthread_id_unittest.cpp:143
       #2 testing::Test::Run()
       #3 testing::TestInfo::Run()
       #4 testing::TestSuite::Run()
       #5 testing::internal::UnitTestImpl::RunAllTests()
       #6 testing::UnitTest::Run()
       #7 RUN_ALL_TESTS()
       #8 main
   
     Previous atomic read of size 4 at 0x729400000040 by thread T2:
       #0 std::__atomic_base<int>::load(std::memory_order)
       #1 bthread::butex_wait(void*, int, timespec const*, bool)
          /tmp/brpc-master-tsan/src/bthread/butex.cpp:755
       #2 bthread_id_join
          /tmp/brpc-master-tsan/src/bthread/id.cpp:530
       #3 join_race_waiter
          /tmp/brpc-master-tsan/test/bthread_id_unittest.cpp:125
   
     Thread T2 created by main thread at:
       #0 pthread_create
       #1 TestBody /tmp/brpc-master-tsan/test/bthread_id_unittest.cpp:137
   
   SUMMARY: ThreadSanitizer: data race
     /tmp/brpc-master-tsan/src/bthread/id.cpp:630
     in bthread_id_unlock_and_destroy
   ==================
   [       OK ] BthreadIdTest.join_races_with_destroy (260 ms)
   [----------] 1 test from BthreadIdTest (260 ms total)
   
   [----------] Global test environment tear-down
   [==========] 1 test from 1 test suite ran. (260 ms total)
   [  PASSED  ] 1 test.
   ThreadSanitizer: reported 1 warnings
   EXIT_CODE=66
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to