Repository navigation
Conversation
Scan-Build Report
Bug Summary
Filter Results by FileReports
|
|||||||||||||||||||||||||||||||||||||||||||||||||
CI Test ResultsRun: #43913299069 | Commit:
Status Overview
Legend: ✅ passed | ❌ failed | ⚪ skipped | 🚫 cancelled Summary: Total: 32 | Passed: 32 | Failed: 0 Updated: 2026-11-16 17:21:48 UTC |
|
Reliability & Chaos Results✅ All reliability & chaos checks passed Pipeline: https://gitlab.ddbuild.io/DataDog/java-profiler/-/pipelines/153607826 |
fd5f2e5 to
99fc144
Compare
99fc144 to
24da32f
Compare
4ab89da to
a9585e8
Compare
|
@DataDog review |
There was a problem hiding this comment.
Two distinct script-level issues were found: one where inconclusive run results are lost due to missing artifact paths in the publish step, and one where internal collector subprocesses are miscounted as external runnable co-tenants, corrupting the cotenant diagnostic marker.
🤖 Bits Code Review · Commit a9585e8
fc6183a to
a0b0a74
Compare
Codex Review Summary: ✅ CompletedThis 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.
The most critical structural issue is that matrix jobs emit artifacts to the same path, causing result rows to be silently overwritten before JSON generation. A separate logic flaw in memory_trend_check.py discards probe pressure readings, allowing memory-pressure-induced RSS drops to be incorrectly attributed to allocator release.
🤖 Bits Code Review · Commit a0b0a74
a0b0a74 to
023ea23
Compare
There was a problem hiding this comment.
Matrix jobs all archive artifacts to the same build.env path, so publish-reliability-gh-pages overwrites earlier rows when downloading, causing generate-run-json.sh to silently drop inconclusive and failure results and overstate pass counts. Each matrix row must write its artifact to a unique path, or the dotenv variables must be aggregated before JSON generation.
🤖 Bits Code Review · Commit 023ea23
023ea23 to
5eeef52
Compare
There was a problem hiding this comment.
Matrix jobs all archive build.env to the same root-level path, so publish-reliability-gh-pages overwrites earlier files when downloading artifacts, causing generate-run-json.sh to miscount inconclusive rows as passed. Each matrix row's artifact must be stored under a unique directory, or the dotenv variables must be merged before JSON generation.
🤖 Bits Code Review · Commit 5eeef52
PSI cpu/memory, loadavg, cgroup throttling and a co-tenant census are read from procfs/sysfs in the sampler's tick, with NA for unavailable sources; the mem line and cadence stay unchanged.
An optional --allocator argument evaluates load, NA share, the glibc release probe and growth into pass, fail or inconclusive; today's output without the flag is unchanged, and the <5-sample crash no longer passes silently on the verdict path.
gmalloc rows get a jcmd trim_native_heap probe in a 30s tail with RSS recorded around it; the verdict maps to fail, inconclusive or silence on stderr; probe lines never enter the growth series.
A new INCONCLUSIVE_* dotenv key flows through the unchanged REASON_* paths; the scheduled notify job now always runs and is a no-op on a green pipeline.
Distinct warning rendering and headline rules, a non-alert Slack message, and run-JSON partial status with explicit inconclusive counts; every REASON_* rendering stays byte-identical.
The shell-unit-tests job runs the seven new network-free test suites and the validate step lints every changed script; the python-driven fixtures use the image's stability venv.
Describe the load markers, the release probe and its tail, the three verdicts with their provisional bounds, the thread-arena caveat and the rerun-before-regression rule.
The probe jcmd now comes from the JDK that launched the JVM with an executable check; a crashed trend check fails the job loudly instead of degrading to inconclusive; the sampler targets the launched JVM's pid directly; the co-tenant census runs in one awk pass so the markers do not measure their own load.
The census pipes stat files through cat so a vanished process cannot abort the awk pass; an unresolvable java fails the job loudly instead of probing a bogus jcmd path.
An unreadable stat entry is a directory so root permissions cannot mask it; the guard test asserts on maven-get.log instead of a vacuous stdout grep, and covers a non-executable java.
Read smaps_rollup without a useless cat and mark the pre-existing CANCELLED test for the older shellcheck.
A quiet container reads psi memory 0.00 while sustained reclaim distorts RSS; scheduler contention only shapes latency verdicts, so psi cpu is recorded without gating and psi memory takes the provisional 5.0 bound.
A dotenv report reaches later jobs only as variables unless the file is also in artifacts:paths, so the publish parser scanning the artifact download missed INCONCLUSIVE_ rows
The census's own cat|awk collectors are grandchildren of the sampler shell through command substitutions, so the direct-parent check counted them as co-tenants; walk the ancestor chain instead
Pid reuse can pair two stat entries into a ppid cycle; the walk now carries a step limit and counts an unresolvable entry instead of spinning
5eeef52 to
e73202a
Compare
There was a problem hiding this comment.
Matrix jobs all archive their results to the same root-level build.env artifact path, so the scheduled publisher overwrites earlier rows when extracting into one directory, causing generate-run-json.sh to undercount inconclusive (and potentially failed) results. Each matrix job's result file must be staged under a unique artifact directory to preserve all outcomes.
🤖 Bits Code Review · Commit e73202a
There was a problem hiding this comment.
More details
The memory gate records load markers, runs an external glibc release probe, and propagates pass/fail/inconclusive results through CI reporting. Per-row artifact copies and deduplication fix the earlier loss of matrix results, and the incremental static review leaves no open findings.
🤖 Bits Code Review · Commit e20776b
Summary
Retrofit the reliability
memorygate with the measured estimator discipline: load markers recorded with every RSS sample, a glibc release probe run from the harness (never inside the profiler), and a three-way verdict —pass,failorinconclusive. Tracker: PROF-16568. Stacked on #968.Today the gate reads passive
smaps_rollupRSS every 5 s and fails on a growth trend. On glibc, passive RSS stays flat (<0.2 %) at equal live bytes whether memory is retained or releasable, so the verdict cannot tell a leak from a releasable spike — and with no load record it cannot tell growth from a loaded host. This PR adds the two missing signals and makes the verdict honest about what it knows.What changed
Markers (
mem_watch.sh, newcollect_markers.sh): everymem:sample is followed by a same-tickmarkers:record — PSI cpu/memorysome avg10, 1-min loadavg, cgroupnr_throttled, and a co-tenant runnable census. Unavailable sources are the literalNA, never0. The census runs as onecat | awkpass (a direct awk glob aborts when a/procentry vanishes between glob and open) so the sampler does not measure its own load. Themem:line, CLI, and 5 s cadence are unchanged.Release probe (
memory_trend_check.sh): ongmallocrows the JVM runs 30 s longer and the harness callsjcmd <pid> System.trim_native_heap(the JDK that launched the JVM; executable-checked) after the measurement window closes. RSS is recorded before/after; probe lines never enter the growth series. Other allocators recordnot-applicable. The probe never touches profiler code.Verdict (
memory_trend_check.py, optional--allocator): first-match rules — too few samples, either series' NA share > 0.5 (psi_memoryandcpu_nr_throttledgated separately), usablecpu_nr_throttledreadings not spanning the first and last sample, median memory pressurepsi_memory_some_avg10> 5.0, cgroupnr_throttleddelta > 8, or a missing/failed glibc probe ⇒inconclusive; no growth ⇒pass; persistent growth with acceptable markers ⇒fail(on gmalloc, only when the probe recovers < 50 % of the growth). The <5-sample case used to crash withZeroDivisionErrorand pass silently. A crashed trend check fails the job loudly (FAIL:Trend check crashed) instead of degrading to inconclusive rows.Load gating by mechanism, not by host type:
psi_cpu_some_avg10, loadavg and the census are recorded but never gate — scheduler contention distorts latency/stall verdicts, not RSS trends (the firsttest:reliabilityrun confirmed it: shared-CI hosts sit at CPU-pressure medians 11.7–40.3, which made a CPU-pressure bound useless there). The two gating signals are the ones that actually alter the measured series:psi_memory(reclaim directly changes RSS; a quiet container reads 0.00, so 5.0 is provisional) andnr_throttled(cgroup throttling paces the JVM's own allocation/GC). All bounds are named provisional constants; changing one needs engineer sign-off.Reporting:⚠️ PR-comment block, a distinct non-alert Slack message, and run-JSON
inconclusivedoes not fail the job. It flows through a newINCONCLUSIVE_*dotenv key (allREASON_*paths byte-identical) to apartialstatus with explicit counts. The schedulednotify-slackjob now always runs and is a no-op on a green pipeline.Tests: seven network-free suites (~1,500 assertions) wired into
shell-unit-tests, plusbash -n/shellcheckin the validate step. The Python-driven suites use the image's stability venv (/app/bp-stability/venv), which carries numpy/matplotlib; the defaultpython3(3.9) does not.Behavior decisions for reviewer acknowledgment
collect_markers.shprintsNAfor the throttle token when nocpu.statexists at any known cgroup mount instead of runningsedagainst an empty filename (which reads the sampler's stdin), andgenerate-run-json.shkeeps a run whose every completed config failed but that holds an inconclusive row atpartial—failedstays reserved for runs with no inconclusive row.inconclusiveinstead of failing; (b) on gmalloc, growth the probe releases (≥ 50 % recovery) ispass. Every otherFAIL:path (crash, fetch, lib, non-glibc trend) keeps its exact text.TREND:uprun whose net growth vs the first sample is ≤ 0 still fails on gmalloc (e.g. a series that dips early then rises). Conservative by design: a leak building after an early high-water mark must not pass.MEMWATCH_TARGET_PID) instead of aps|greptext match that could select a sibling process. At most the first tick of RSS is missed; the sampler still runs without the allocator preload.EXPECTED_CONFIGS=36staleness and theREASON_/INCONCLUSIVE_regex mis-split ofprofiler+traceringenerate-run-json.sh.Preserved behavior branches (CI script changes)
Enumerated via
git log -pand preserved in every changed script: the 6-attempt mvn retry andmaven-get.log; fetch/libFAIL:exits;count_cpuscgroup v1/v2/nproc paths; sdkman install;CONFIG/ALLOCATORcases including theLD_PRELOADfind and the unknown-valueexit 1;RCandFAIL:Benchmark crashed;memwatch-trend.png; both YAMLREASONparsers (cut -f2 -d':'scheduled,grep -m1 … cut -f2-PR child);after_script; theCANCELLEDexit innotify_channel.sh.Testing
bash -n+shellcheckclean (at CI's 0.8.0 and current 0.11); both YAMLs parse.test:reliabilityrun on this candidate: all 12 memory rows produced markers and verdicts on real CI hosts through the complete chain (markers → verdict →INCONCLUSIVE_*→ PR comment). The first run's rows all reported inconclusive on CPU pressure under the since-amended rule — that observation is what motivated the mechanism-based gating above; a fresh run on this head will classify rows by memory pressure instead.