Repository navigation
Conversation
songgaoye
force-pushed
the
fix/bthread-id-join-race
branch
from
October 28, 2026 15:58
8e93fe6 to
58f5f92
Compare
Contributor
Author
|
run tsan on master branch. 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 |
songgaoye
force-pushed
the
fix/bthread-id-join-race
branch
from
October 28, 2026 16:12
58f5f92 to
ed9a32f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Issue Number: resolve
Problem Summary:
What is changed and the side effects?
Changed:
Side effects:
Performance effects:
Breaking backward compatibility:
Check List: