Skip to content

dynamic_modules: join async host selection threads in cluster tests - #48439

Merged
agrawroh merged 1 commit into
envoyproxy:mainfrom
agrawroh:dm-cluster-join-async-selection-threads
Oct 19, 2026
Merged

agrawroh merged 1 commit into
envoyproxy:mainfrom
agrawroh:dm-cluster-join-async-selection-threads

Conversation

@agrawroh

Copy link
Copy Markdown
Member

Description

This PR fixes a flaky test in the DYM for Cert Selector.


Commit Message: dynamic_modules: join async host selection threads in cluster tests
Risk Level: Low
Testing: CI
Docs Changes: N/A
Release Notes: N/A

The cluster integration test module completes asynchronous host selection
on a detached std::thread. Every Rust thread runs module code while it
exits, because std registers a pthread key destructor in the module, and
glibc calls key destructors after the thread-local destructors that keep
the module loaded. When a test server shut down while such a thread was
still exiting, Envoy unloaded the module under it and the thread crashed
in a later test, for example
DynamicModuleAsyncTlsIntegrationTest.SessionReuseFollowsLogicalHostnameReverseOrder
on the arm64 release job.

Keep the join handles and join them when the load balancer is destroyed,
like the other Rust test modules do. Envoy destroys every load balancer
before it can unload the module.

Signed-off-by: Rohit Agrawal <[email protected]>
@agrawroh
agrawroh merged commit 692078e into envoyproxy:main Oct 19, 2026
27 checks passed
jwendell pushed a commit that referenced this pull request Nov 12, 2026
…48439)

## Description

This PR fixes a flaky test in the DYM for Cert Selector.

---

**Commit Message:** dynamic_modules: join async host selection threads
in cluster tests
**Risk Level:** Low
**Testing:** CI
**Docs Changes**: N/A
**Release Notes**: N/A

Signed-off-by: Rohit Agrawal <[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.

3 participants