Repository navigation
fix(ci+plugin): first-nightly triage — ctest lookahead never matched (coverage gate green); admin-scope handshake race; tsan suppressions - #320
Merged
Conversation
…tsan suppressions for trantor races
Both nightlies fired for the first time 2026-11-08 (new cron triggers,
~7h GitHub schedule delay) and both failed. Root causes are INHERITED
defects the first real runs exposed:
1. Coverage gate leg (run 42472349551): the 'everything else' ctest
filter -R '^(?!.*OAuth2Tests).*$' NEVER matched anything — ctest's
regex engine (cmsys) cannot compile negative lookahead ('?+*
follows nothing'), it matched zero tests, printed 'No tests were
found!!!' and still EXITED 0. The 512 non-monolithic tests (every
Contract repository test included) never executed on ANY coverage
run since the pattern's introduction; the ratchet then read the
missing library-layer data as regressions (identity 87.1->63.0,
oauth2 88.8->74.4, common 74.3->66.1 — matching the v1.6.0-era
partial-data signature exactly, now explained). Fix: POSIX-safe
ctest -E '^OAuth2Tests$' exclude flag; evidence recorded in a
comment at the call site.
2. tsan-nightly (run 42469207432): first genuine TSan run ever (the
job had been dispatch-only since creation — the referenced
suppression file never existed). Both findings are trantor-internal
(Drogon's event-loop library): EventLoop::wakeup()'s cross-thread
eventfd write vs createEventfd() setup, and MpscQueue's producer-
side std::function move vs consumer read — the queue's publication
protocol is the intended synchronization. Per the workflow's own
triage policy these get documented suppressions: new
tools/sanitizers/tsan.supp (per-race evidence + dated + the
first-party-findings-are-fixed-not-suppressed rule), wired into
TSAN_OPTIONS at both the job and ctest-step scopes via a
workspace-absolute path.
Verification: workflow_dispatch of both workflows on this branch —
the gate leg now runs the full 513-test suite (ratchet verdict on
complete data), tsan re-runs with suppressions to surface whatever
genuine findings remain.
…m connector-teardown race First tsan-nightly findings, round 2 (after the trantor suppressions took effect): 1. FIRST-PARTY race in OAuth2Plugin (fixed, not suppressed): initAndStart issues the admin-scope DB load via initStorage at :75, but constructs authorizationService_ ~150 lines later — the DbLoop callback (OAuth2Plugin.cc:718) read the member unsynchronized AND its if (authorizationService_) guard silently DROPPED the DB-loaded set when the callback won the race, falling back to the hardcoded default set (wrong admin-gate semantics for any deployment with non-default oauth2_scopes.requires_admin_role rows). Fix: mutex-ordered handshake — the callback stashes the set as pendingAdminScopes_ when the service does not exist yet; the construction site assigns the member AND flushes the stash under the same lock. IdentityService's static admin-class set is updated before the lock (unchanged behavior). 2. Upstream race suppressed with evidence (drogon/trantor frames only on both stacks): HttpRequestImpl dtor clearing the headers map vs trantor Connector::handleWrite still reading it during the full-stack smoke host teardown. tools/sanitizers/tsan.supp extended (#3); the triage-policy footer now points at this commit's first-party fix as the example of fix-not-suppress.
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
7 tasks done
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.
Summary
Both nightlies fired for the first time on 2026-11-08 (~7h GitHub schedule delay on new cron triggers — expected) and both failed. This PR lands the triage of everything they exposed, verified by re-dispatch on this branch.
Finding 1 — the coverage gate's "everything else" ctest filter NEVER matched (fixed)
-R "^(?!.*OAuth2Tests).*$"— ctest's regex engine (cmsys) cannot compile negative lookahead:RegularExpression::compile(): ?+* follows nothing, zero tests matched, "No tests were found!!!", exit 0. The 512 non-monolithic tests (every Contract repository test) never executed on ANY coverage run since the pattern's introduction; the ratchet read the missing library-layer data as regressions (identity 87.1→63.0, oauth2 88.8→74.4 — matching the v1.6.0 partial-data signature exactly, now explained). Fix: POSIX-safectest -E '^OAuth2Tests$'.Verified (dispatch, run 42550974545): full suite 597/597 passed in 174.5 s + OAuth2Tests 55.9 s — and
[ratchet] OK: no library dropped more than 0.5pp below baseline. The 2026-09-05 baseline was accurate all along; no re-baselining. (Also proves the gcov suite is FAST on current master — the "cannot sustain the full suite" premise described the pre-#302 DB-timeout era.)Finding 2 — tsan-nightly's first genuine run ever: a bug harvest (two layers triaged, backlog documented)
The job had been dispatch-only since creation; the suppression file its own policy references never existed.
EventLoop::wakeup()cross-thread eventfd +MpscQueueproducer-side std::function move — upstream, queue/fd publication protocol is the intended synchronization. Newtools/sanitizers/tsan.supp.OAuth2Plugin::initAndStartissues the admin-scope DB load at:75(initStorage) but constructsauthorizationService_~150 lines later — the DbLoop callback read the member unsynchronized, and itsif (authorizationService_)guard silently dropped the DB-loaded set when the callback won the race (non-default deployments would gate on the hardcoded fallback set — wrong authorization semantics, latent since the plugin's inception). Fix: mutex-ordered handshake (pendingAdminScopes_stash + flush underadminScopesMu_at the construction site).HttpRequestImpldtor clearing headers vstrantor::Connector::handleWriteduring smoke-host teardown — all frames upstream.Remaining backlog (honest): the third dispatch still fails on further findings (hashtable-
_M_begin/ shared_count ctor / vector-size races — attribution pending). tsan-nightly is a schedule-gated nightly, not a PR gate, so it stays red until its own follow-up triage pass — exactly the "cannot be made green within budget" branch the workflow policy documents. The harvest so far: 1 real authorization-semantics bug fixed, 3 upstream races documented.Verification
Type of change
Checklist