← Back to Pull requests

Abort pending optimizing compiles before collecting kept boxes in tracing-test #8621

Closed
unknown closed this pull request without merging on Nov 22, 2026 03:55 UTC
View on GitHub
unknown unknown commented on Nov 18, 2026 15:52 UTC
Author

tracing-test.c++ "wrappables are charged as external memory while they live" (added in #8496) fails now and then on edgeworker CI. It failed 5 times on 2026-11-18, in both the @ and @all-autogates variants, on release, RBE and ASan builds. The final check fails with nothing released: expected remaining < int64_t(sizeof(NumberBox)) * 16 [1120000 < 1792].

Cause: keepBoxes() builds its 10,000 boxes in a hot loop, which V8 may optimize on a background thread. If that compile job is still pending when the test drops keep and forces its two GCs, the job keeps every box alive.

Evidence:

  • With --concurrent-recompilation-delay=300, which keeps the job pending, the test failed 10 runs out of 10.

  • Both forced GCs ran (two major epilogues, kGCCallbackFlagForced), and neither released anything.

  • A heap snapshot taken after the failed check found no live NumberBox wrappers. Its CollectAllAvailableGarbage() aborts concurrent optimization first.

  • Building the array in a function-local instead of reading the keep global did not help: with the delay, it still failed 10 runs out of 10.
  • Fix: call v8::Isolate::ClearCachesForTesting() before the GCs. It aborts the pending Turbofan and Maglev jobs and waits for them. With the delay flag, the test then passed 10 runs out of 10.

    Testing: run from edgeworker with --config=bazelflare:

  • --runs_per_test=20 on tracing-test@ and tracing-test@all-autogates: all pass.

  • --config=asan, both variants: pass.
  • 🤖 Generated with Claude Code

    Diff: 195 lines (+146 / -49) across 2 files Reviewer: littledivy Review duration: 5043m
    All Vouch review confidence checks passed
    Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.36 · 195 lines diff across 2 files
    0.36
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.316
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #8621"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 36% (MEDIUM) · Higher = larger blast radius
    36%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 14.2% · Safe to merge
    14.2%