Repository navigation
test: fix TSAN race in RtdsOverAdsShutdown - #48488
Merged
Merged
Conversation
In ServerInstanceImplTest.RtdsOverAdsShutdown, server_->run() executes on server_thread while server_->shutdown() was called directly from the main test thread. This caused a TSAN data race against isShutdown() in InstanceBase::startWorkers(). Post the shutdown call to the server's dispatcher instead, matching how other tests in server_test trigger shutdown when using startTestServer(). Signed-off-by: antoniovleonti <[email protected]>
antoniovleonti
marked this pull request as ready for review
October 20, 2026 20:39
antoniovleonti
marked this pull request as draft
October 21, 2026 02:38
antoniovleonti
marked this pull request as ready for review
October 21, 2026 17:08
yanavlasov
approved these changes
Oct 22, 2026
jwendell
pushed a commit
that referenced
this pull request
Nov 12, 2026
In `ServerInstanceImplTest.RtdsOverAdsShutdown`, `server_->run()` executes on `server_thread` while `server_->shutdown()` was called directly from the main test thread. This caused a TSAN data race against `isShutdown()` in `InstanceBase::startWorkers()`. Post the shutdown call to the server's dispatcher instead, matching how other tests in `server_test` trigger shutdown when using `startTestServer()`. Risk Level: Low (test-only) Testing: `//test/server:server_test` under TSAN (100 runs) Docs Changes: N/A Release Notes: N/A Platform Specific Features: N/A Signed-off-by: antoniovleonti <[email protected]> Signed-off-by: Ryan Northey <[email protected]>
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.
Commit Message: test: fix TSAN race in RtdsOverAdsShutdown
Additional Description:
In
ServerInstanceImplTest.RtdsOverAdsShutdown,server_->run()executes onserver_threadwhileserver_->shutdown()was called directly from the main test thread. This caused a TSAN data race againstisShutdown()inInstanceBase::startWorkers().Post the shutdown call to the server's dispatcher instead, matching how other tests in
server_testtrigger shutdown when usingstartTestServer().Risk Level: Low (test-only)
Testing:
//test/server:server_testunder TSAN (100 runs)Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A