Repository navigation
Reference-chain test-stack updates, seam fixes, and repro/sweep tooling - #801
Conversation
Scan-Build Report
Bug Summary
Reports
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This comment has been minimized.
This comment has been minimized.
CI Test ResultsRun: #39475539658 | Commit:
Status Overview
Legend: ✅ passed | ❌ failed | ⚪ skipped | 🚫 cancelled Summary: Total: 76 | Passed: 76 | Failed: 0 Updated: 2026-10-20 18:54:01 UTC |
70b07d8 to
ebc51a4
Compare
ebc51a4 to
6761ff0
Compare
6761ff0 to
f840cba
Compare
f840cba to
345faca
Compare
345faca to
9aea2c4
Compare
9aea2c4 to
5629244
Compare
5629244 to
7ec1618
Compare
7ec1618 to
414e0ee
Compare
414e0ee to
400c95d
Compare
400c95d to
6a09156
Compare
- ReferenceChainTestHooks: consolidate debug test seams behind one package-private facade; drop public visibility of the JavaProfiler seams back to package-private - JavaProfiler: restore the mutating-state warning on shouldRunPassForTest0 javadoc; getTid javadoc corrections - referencechains tests: await handoff publication in default mode, continue hysteresis epochs past the initial seeding, keepBest() preserves in-pool correlated results, clear seeded heap-floor-ring samples and chainTargetHolder in finally, bound the allocator-tid spin-wait, seed per-(klass,tid) ramps on the allocating thread - LeakTagCorrelationReferenceChainTest: assert at least one leak-tag interception in the tight-window variant - utils/sweep-*.sh: guard parse_run pipelines with || true, fix the JDK<=16 safepoint double-count, resolve swept-knob precedence against baked-in defaults - utils/run-refchains-repro.sh: stale budget comment, knob override - build-and-summarize: headline IndexError guard, zip pairing of failure headlines, multi-count test summaries, parser failure artifacts - ReferenceChainLeakAntagonist: hoist cache.size() out of the inner loop; ReferenceChainLeakDemo: malformed-duration usage message, rotating snapshot path - refchains-report-multi.py: warn on unparsable CSV cells
The roundtrip JFR fixture is produced by referenceChainJfrRoundtrip_ut, which does not run on CI runners without Google Test (e.g. the el7 testRelease job); asserting its existence failed the job there. Assume instead of assert so the test skips where the gtest artifact is unavailable and still executes wherever the gtest ran.
Comment-only rewrite of nine reference-chain test and hook files (assertions, seams test, scenarios, launcher, test hooks, JavaProfiler seam javadocs) to match the hand-written style of the rest of the suite. No code changes. Humanize pass over jb/rc-7-tooling.
Fixes from the sphinx light review (9 items): - LeakTagCorrelationScenario.keepBest now merges violations in both directions; resultLine extracted and covered by the new LeakTagCorrelationScenarioKeepBestTest (7 tests, no profiler needed) - AggressiveLeakReferenceChainTest: hoist shouldRunPassForTest0() out of assertFalse, reset the search first - build-and-summarize: single write_unknown_summary() writer; Gradle exit status stays authoritative - run-refchains-repro.sh: bash 3.2 set -u guards for empty arrays - ReferenceChainTrackingTest: scratch JFRs via Files.createTempFile - ReferenceChainLeakDemo: seeding in main() before run(); heapUsedFraction falls back to Runtime.maxMemory() - referenceChainJfrRoundtrip fixture is consume-once (unlink before write); ReferenceChainJfrParserTest deletes it after reading - ReferenceChainJfrParserTest: assumeTrue fixture skip, re-applied from 218c2b7 (rc-7 forked before that fix) The touched Java files also carry the humanize comment rewrites for those files; splitting them would have left comments describing code that the intermediate commit did not contain.
…t native name Renaming the Java declaration to drainReferenceChainEventCount0() left no JNI symbol for it in any build; rename both javaApi.cpp definitions (no-arg, no leaf filter) instead, and restore the four removed seam declarations (frontier state, resolved target tag, heap-floor reset/rising) the tests need, plus the roundtrip gtest's stale env-var comment and its unread .expected sidecar writer.
Replaces the literal "debug" config checks with isDebugInstrumentedBuild() (debug/asan/tsan all compile the seams) and requiredTestConfig()'s fail-loud forwarding; restores the synchronized testLogTail guards, the frontier-state EXPANDED wait and target-tag matching, the ThreadLocalMap-hop filter and (tag, incarnation) correlation, the handoff-timeout marker, painbudget=100, the scaled child timeouts, the ActiveSetting id check, the matched population seeds, the pass-count baseline ordering, the held[0] reservation, the ring-reset mutation-killer test, and the roundtrip JFR env-var-first lookup.
…o snapshot retention A cache that freezes at CAP_ENTRIES reads a ~zero population slope for the rest of a long run, so the antagonist now recycles 25% of the cap and regrows instead. The run-forever repro keeps only the last 5 periodic snapshots so multi-hour sessions cannot fill the temp dir.
Aggregate every .jfr.snapshot.<round> file (a drained event is written once, so the final snapshot alone undercounts chains), drop the swept knob from fixed REFCHAINS_ARGS before each run (last-occurrence-wins would shadow it), guard the safepoint pipelines with || true under pipefail, and replace the associative array with a case function for macOS bash 3.2.
The wrapper had grown a live-tail/awk pipeline, a 150-line embedded log parser, and summary artifacts - machinery from an era when builds were summarized by a billed subagent call. Harnesses truncate agent output and keep the full log on disk anyway, so the agent only needs the status line plus the failure section, extracted by grep. Update AGENTS.md's operating guide to match (no gradle-log-analyst delegation, no summary artifacts).
3ce5655 to
860860f
Compare
Codex Review SummaryThis 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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 860860ff5c
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Successful discoveries are reported as missing, and the latency extractor measures elapsed time from snapshot boundaries. The correlation scenario also loses its incarnation check, allowing different tag owners to count as the same object.
🤖 Bits Code Review · Commit 860860f
|
Auto-expanded scope: 2 sibling issue(s) fixed in the same pass:
|
Leak tags are recycled, so tag-only correlation in LeakTagCorrelationScenario could accept a stale chunk that inherited the recycled tag; match the HeapLiveObject on both identity fields and fail loud when either accessor or stamp is missing. Format the repro's machine-readable metrics with Locale.ROOT so a comma-decimal locale cannot silently zero parsed values.
samples_dropped_thread_local is process-global and shared with every SIGNAL_HANDLER_GUARD_OR_DROP path, while the allowance is bounded by this test's own sample count, so co-located runner load in the sequential el7-8 suite run can trip the bound (observed 79/195, 50/645, 272/137 across the three RetryingTest attempts).
What does this PR do?:
Repairs and finishes the reference-chain test stack (#800), and adds standalone repro/sweep/report tooling for the feature:
PersistentAllocator.drainReferenceChainEventCount0()(Java + JNI); restore four dropped test seams; drop the unread.expectedsidecar from the roundtrip gtest. Test seams only — package-private, debug builds.ReferenceChainLeakDemo(locale-stable metrics, bounded snapshot retention) andReferenceChainLeakAntagonist(bounded sawtooth growth keeps the population slope positive).build-and-summarizereduced to log capture + grep failure extraction (LLM summarizer removed; AGENTS.md guide aligned); agent-scratch.gitignoreentries;TlsPrimingTestquarantined onel7-8-release-amd64(PROF-16281).Motivation:
The #800 review left several reference-chain fixes reverted, which made the tests flaky or vacuous. This PR restores them and lands the repro/sweep tooling that PR's investigation produced.
Additional Notes:
Stacked on #800. No public API change.
How to test the change?:
bash -nover the scripts;python3 .github/scripts/quarantine.py validate.:ddprof-lib:gtestDebug_referenceChainJfrRoundtrip_ut.:ddprof-test:testDebug/testSlowDebug -Ptests=...for the reference-chain test classes.:ddprof-stresstest:compileReproJava.For Datadog employees: