Skip to content

refchain test: widen external-process leak-cache tail window (stacked on #889) - #1022

Merged
jbachorik merged 2 commits into
paul.fournillon/fix-reference-chain-release-failuresfrom
dd/diagnose-linux-slow-release-reference-chain-failures-9fx6
Nov 19, 2026
Merged

jbachorik merged 2 commits into
paul.fournillon/fix-reference-chain-release-failuresfrom
dd/diagnose-linux-slow-release-reference-chain-failures-9fx6

Conversation

@jbachorik

Copy link
Copy Markdown
Collaborator

What does this PR do?:

Widens the external-process leak-cache scenario's post-round tail from 5 fixed one-second attempts to a 60-second time budget, raises that test's child timeout from 90s to 150s, and prints per-round reference_chain_* counters plus per-tail-attempt progress lines as failure diagnostics. Test-only change (2 files), stacked on #889.

Motivation:

ExternalProcessReferenceChainTest.shouldReconstructReferrerChainInSeparateProcess fails [chain-not-found] on Linux aarch64/glibc release. Diagnosis (task diagnose-linux-slow-release-reference-chain-failures-9fx6): the datadog.ReferenceChain event materializes only at t≈15–17s because chain-building polls are serialized behind the search's first BFS pass under the engine lock, while the scenario's 5s tail closed the window ~10s too early. The same five failures reproduce identically on clean main (full testSlowRelease run, glibc/release/aarch64, JDK 17) — pre-existing, not introduced by #889. #889's branch has since fixed the other four; this completes the remaining one.

The engine-side observations from the diagnosis (polls blocked for the whole pass; terminal-state checks unreachable while passes are long/blocked) are recorded as follow-up material for #889's ongoing work, not addressed here.

Additional Notes:

  • Timing numbers (admission at t≈6–8s, event at t≈15–17s from round-loop start, chain at tail attempts 6–7) are from full-suite verification runs of an earlier commit of this branch; the final candidate adds the review fixes (150s timeout, capped final sleep, comment corrections, dropped a redundant per-round print) and is compile-verified but not re-run end-to-end. The deltas are behavior-preserving or strictly widen the window.
  • Review: fresh-context code-review subagent, three rounds (initial, post-fix re-review, final delta); no open Critical/High findings. One round caught a compile-breaking variable-rename miss, fixed and compile-verified. One cosmetic LOW (comment line wrap) remains.
  • Human review recommended: the change alters the timing envelope of a flake-prone end-to-end test; a human should confirm the wider window is acceptable for CI.

How to test the change?:

./.claude/commands/build-and-summarize :ddprof-test:testSlowRelease -Ptests=ExternalProcessReferenceChainTest on Linux aarch64/glibc release (glibc/17-release-aarch64). Previously the leak-cache test failed [chain-not-found] essentially consistently; with this change it passes, with the chain landing inside the new tail budget.

For Datadog employees:

  • This PR doesn't touch any of that.
  • JIRA: [JIRA-XXXX]

The chain event can only be built after the search's first BFS pass completes
(chain-building polls are serialized behind the in-flight pass), which on
Linux aarch64/glibc release lands at t~15-17s - after the previous 5-attempt
tail had given up. Verified on glibc/release/aarch64 JDK 17: the test passes
with the chain landing at tail attempts 6-7 across two full-suite runs.
…he scenario

Release builds have no TEST_LOG, so a failing child previously reported only
the final counters. Printing reference_chain_* counters each round shows
when candidate admission happens, when frontier admissions stop, and when
the chain event lands - the evidence that localized the Linux aarch64/glibc
release failures to single-pass timing rather than a code defect.
@jbachorik jbachorik added AI human_review:recommended Human review recommended — see PR description labels Nov 19, 2026
@jbachorik

Copy link
Copy Markdown
Collaborator Author

@DataDog review

@jbachorik jbachorik added the dog-sitter Actively watched by babysit-pr: fixes pushed through the repo gates label Nov 19, 2026
@jbachorik

jbachorik commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator Author

🐶 babysit-pr is watching this PR — CI breakages and mechanical findings are fixed and pushed automatically; design decisions are always brought to you.

This run
  • 13:20 · started · CI on head 846f65c51 in progress
  • 13:33 · CI green · check run 44529079509 cancelled jobs were concurrency fallout of the force-push; current run 44529212467 progressing clean
  • 13:45 · Bits · PASS returned for 846f65c51 (2 reviews, trusted bot) — no actionable findings
  • 13:38 · stopped · CI green (123 checks passed, 0 failed), merge state CLEAN

✅ stopped 13:38 UTC · CI green — 123 checks passed, 0 failed · merge state CLEAN


Stop summary: no commits pushed, no fixes needed. CI green on head 846f65c51; Bits review PASS on the current head (triggered by the author's @datadog review, once-per-head recorded). No inline review threads; no findings to answer. bits_triggered: [846f65c51]. replied: []. Note for the session: the PR description's caveat (e2e verification numbers from an earlier commit; final candidate compile-verified only) remains accurate — the two retargeted commits are test-only and unchanged in intent.

@datadog-datadog-us1-prod datadog-datadog-us1-prod Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: PASS

More details

The longer tail wait preserves the existing chain-success assertions while allowing more time for the first BFS pass to complete. Its effectiveness against the Linux aarch64/glibc flake remains unverified end to end.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 846f65c

@dd-octo-sts

dd-octo-sts Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Scan-Build Report

User:runner@runnervmccnms
Working Directory:/home/runner/work/java-profiler/java-profiler/ddprof-lib/src/test/make
Command Line:make -j4 all
Clang Version:Ubuntu clang version 21.1.8 (6ubuntu1)
Date:Thu Nov 19 13:01:44 2026

Bug Summary

Bug TypeQuantityDisplay?
All Bugs2
Logic error
Dereference of null pointer1
Unused code
Dead initialization1

Filter Results by File

Reports

Bug Group Bug Type ▾ File Function/Method Line Path Length
Unused codeDead initializationreferenceChains.cppapplyOomRamp4971
Logic errorDereference of null pointerperfEvents_linux.cppunregisterThread72026

@jbachorik
jbachorik marked this pull request as ready for review November 19, 2026 13:07
@jbachorik
jbachorik requested a review from a team as a code owner November 19, 2026 13:08
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T13:09:45.760969Z 846f65c Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@datadog-datadog-us1-prod datadog-datadog-us1-prod Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: PASS

More details

The longer tail preserves the existing chain-success assertions while allowing more time for the first BFS pass to complete. Its effectiveness against the reported Linux aarch64/glibc flake remains unverified end to end.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 846f65c

@dd-octo-sts

dd-octo-sts Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

CI Test Results

Run: #44529212467 | Commit: e12e16a | Duration: 21m 16s (longest job)

✅ All 32 test jobs passed

Status Overview

JDK glibc-aarch64/debug glibc-amd64/debug musl-aarch64/debug musl-amd64/debug
8 - ✅ - -
8-ibm - ✅ - -
8-j9 ✅ ✅ - -
8-librca - - ✅ ✅
8-orcl - ✅ - -
11 - ✅ - -
11-j9 ✅ ✅ - -
11-librca - - ✅ ✅
17 ✅ ✅ - -
17-graal ✅ ✅ - -
17-j9 ✅ ✅ - -
17-librca - - ✅ ✅
21 ✅ ✅ - -
21-graal ✅ ✅ - -
21-librca - - ✅ ✅
25 ✅ ✅ - -
25-graal ✅ ✅ - -
25-librca - - ✅ ✅

Legend: ✅ passed | ❌ failed | ⚪ skipped | 🚫 cancelled

Summary: Total: 32 | Passed: 32 | Failed: 0


Updated: 2026-11-19 13:24:22 UTC

@dd-octo-sts

dd-octo-sts Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

✅ All 40 integration tests passed

📊 Dashboard · 👷 Pipeline · 📦 846f65c5

@jbachorik jbachorik removed the dog-sitter Actively watched by babysit-pr: fixes pushed through the repo gates label Nov 19, 2026
@jbachorik
jbachorik merged commit 502b84c into paul.fournillon/fix-reference-chain-release-failures Nov 19, 2026
139 of 158 checks passed
@jbachorik
jbachorik deleted the dd/diagnose-linux-slow-release-reference-chain-failures-9fx6 branch November 19, 2026 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI human_review:recommended Human review recommended — see PR description

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant