Skip to content

test: fix TSAN race in RtdsOverAdsShutdown - #48488

Merged
yanavlasov merged 1 commit into
envoyproxy:mainfrom
antoniovleonti:fix_bug_573527265
Oct 22, 2026
Merged

yanavlasov merged 1 commit into
envoyproxy:mainfrom
antoniovleonti:fix_bug_573527265

Conversation

@antoniovleonti

Copy link
Copy Markdown
Contributor

Commit Message: test: fix TSAN race in RtdsOverAdsShutdown
Additional Description:
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

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]>
@repokitteh-read-only

Copy link
Copy Markdown

As a reminder, PRs marked as draft will not be automatically assigned reviewers,
or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

🐱

Caused by: #48488 was opened by antoniovleonti.

see: more, trace.

@antoniovleonti
antoniovleonti marked this pull request as ready for review October 20, 2026 20:39
@antoniovleonti
antoniovleonti marked this pull request as draft October 21, 2026 02:38
@antoniovleonti
antoniovleonti marked this pull request as ready for review October 21, 2026 17:08
@yanavlasov
yanavlasov merged commit b83bf58 into envoyproxy:main Oct 22, 2026
27 checks passed
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants