Add a thread sanitizer CI lane and Event Hubs thread safety tests
I maintainer di solito rispondono entro 1 giorno
@j7nw4r ci sta già lavorando.
Dal 5/8/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Summary
The Event Hubs library has no thread safety test and no sanitizer lane in CI. The races in #7284 thus went into main with no warning, and a new race can do the same. A thread sanitizer build and a small test suite let CI hold the thread safety guarantee.
Parent: #7284. Severity tags follow the key in #7252. The code anchors refer to commit 2de7c583e.
Motivation
A thread sanitizer finds all three defects in #7284. It needs one test that shares a client across threads. No such test exists. The stress test applies load (test/eventhubs-stress-test/). It does not share one client across threads, and it does not run under a sanitizer.
A sanitizer lane also protects the locking rework, which is the largest change in this workstream. #7286 changes EnsureSender to a double-checked write. #7288 moves to a std::shared_mutex. A small error in either change gives a rare race, not a test failure.
The repository can already run an ASan lane or a UBSan lane. A TSan job can then extend it. Read the CI definitions before you add a job.
Proposal
Build support.
- Add a CMake option that turns on
-fsanitize=threadfor clang and gcc. [GA quality bar] - Put ASan and UBSan on the same option. The option selects one sanitizer, because a binary cannot hold the thread sanitizer and the address sanitizer together. [GA quality bar]
- Add a CI job that builds the Event Hubs tests with the thread sanitizer and runs the thread safety tests. [GA quality bar]
Tests.
- Add a test for the unlocked map read. N threads call
Sendto N different partitions that no thread used before. The test uses one sharedProducerClient. [GA quality bar] - Add a shared-client stress test. One
ProducerClient, many threads, sends to the same partition and to different partitions. The test counts the messages that arrive. [GA quality bar] - Add a wrong-use test. A
TryAddduring aSendon the same batch fails each time, and the batch stays correct. [GA quality bar] - Add a processor test. Parallel partition handlers write to a checkpoint store. The test loses no checkpoint and duplicates no checkpoint. [GA quality bar]
- Add a lifecycle test for the races in #7255: a parallel
SendandClose, then a parallelStartandStop. The two workstreams then share one suite. [GA quality bar] - Extend the stress test to apply load to one shared client (
test/eventhubs-stress-test/). [Post GA]
The map-read test must cause a thread sanitizer error before #7285. It must pass after #7285.
The tests that need a broker must use the existing test broker, not a live namespace. The lane then stays cheap enough for every pull request. #7270 pinned the broker hash, so the target is stable.
Validation
- The thread sanitizer lane runs in CI. A reported race fails the build.
- The map-read test causes a thread sanitizer error when you revert #7285.
- The full test suite passes under the thread sanitizer with no suppressions. A necessary suppression has a comment that gives the reason and the issue that removes it.
- The lane is fast enough to run on every pull request.
- Lingua principale
- C++
- Stelle
- 206
- Fork
- 178
- Merge medio
- 2g 15h
- PR unite (30g)
- 33
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Azure/azure-sdk-for-cpp
-
bug EngSys
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
Azure/azure-sdk-for-cpp#7362 ·
I maintainer di solito rispondono entro 1 giorno
-
Client needs-team-attention Service Attention Storage
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Azure/azure-sdk-for-cpp#7347 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Client Event Hubs needs-team-attention Service Attention
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
Azure/azure-sdk-for-cpp#7333 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Azure Storage STG105 Feature TestsForse di nuovo libera @Jinming-Hu l’ha presa 30 giorni fa e non c’è nessuna pull request aperta. ApertaClient Storage
Azure/azure-sdk-for-cpp#7449 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Azure.Core bug test-enhancement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 66/100
Azure/azure-sdk-for-cpp#7401 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Azure/azure-sdk-for-cpp
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
-
[XLA] hlo/pass/README.md says passes implement Run; since the NVI change they implement RunImplAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 91/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
NVIDIA-RTX/NRI#312 ·
I maintainer di solito rispondono entro 1 giorno
-
permute_q_b_proj / permute_wv_proj accept scale factors from another deviceForse già presa @0z5a l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
deepseek-ai/FlashMLA#247 ·
I maintainer di solito rispondono entro 1 giorno
-
Linux npm packaging leaves workspace files that block subsequent CI checkoutForse già presa @Spockkk0225 l’ha presa oggi. Apertaci
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
alibaba/neug#1195 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno