Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
id: find-estimator-rss-conflation-executed
title: per-object allocation estimates cannot gate attributable RSS - same estimate, 2x measured residency
kind: finding
tags: [malloc, rss, estimator, mallocfootprint, memory-gate]
applies_to: [ddprof-lib/src/main/cpp/mallocFootprint.h]
source: native-safety-hypothesis-loop/find-estimator-rss-conflation-executed
status: active
recorded: 2026-11-11
valid_at: 2026-11-11
---


With the requested/usable estimates held fixed, measured residency at 8192 B
differs by 2x between glibc and musl while `MallocFootprint` returns identical
values for both: the estimator is blind to occupancy and touching. Any memory
gate must state its accounting target - per-object allocator accounting (usable
size plus the probed header) for allocation cost, residency measurements for
attributable memory - and never equate the two.
19 changes: 19 additions & 0 deletions .knowledgebase/memories/find-flake-rule-operationalized.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
id: find-flake-rule-operationalized
title: a single failing gtest run under load is not a catch - require a standalone failure or a majority of repetitions
kind: finding
tags: [testing, flake, gtest, load, ci]
applies_to: []
source: native-safety-hypothesis-loop/find-flake-rule-operationalized
status: active
recorded: 2026-11-11
valid_at: 2026-11-11
---


A clean-source binary fails the same canary gtest in 1 of 12 contended runs -
mutation-independent flake exists at the suite layer. Before treating a native
test failure as a catch, require a standalone (out-of-suite) failure or at
least 2 of 3 in-Gradle repetitions; a single in-suite failure under load is
evidence of nothing. The same rule applies to CI gates: a single failing run of
a load-sensitive check should be rerun before being treated as a regression.
24 changes: 24 additions & 0 deletions .knowledgebase/memories/find-glibc-passive-retention-flat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
id: find-glibc-passive-retention-flat
title: no passive glibc signal distinguishes retained from releasable memory - a retention check needs an actual release step
kind: finding
tags: [glibc, malloc, retention, rss, smaps, memory-gate, testing]
applies_to: [.gitlab/reliability/memory_trend_check.sh]
source: native-safety-hypothesis-loop/find-glibc-passive-retention-flat
status: active
recorded: 2026-11-11
valid_at: 2026-11-11
---


Pre-release RSS, mincore and `smaps` `Private_Dirty` stay within 0.2 percent
across the whole allocation-pattern matrix on glibc 2.35 and 2.39 at equal live
bytes, and a field-by-field sweep of every `smaps` field (both libcs, to 0.1
percent) is equally flat: `MADV_DONTNEED` zeroes everything and `MADV_FREE`
moves `LazyFree` only after a real release. There is no passive glibc signal
that separates retained from releasable memory, so any gate must exercise the
release itself - a harness-issued `malloc_trim`/`madvise` from outside the
profiler, with RSS recorded before and after. musl post-free RSS does
discriminate. The mallinfo2-stall side of the original finding is glibc-version
dependent (no stall on 2.35, 3-17 ms stalls on 2.39); treat any mallinfo2 timing
claim as version-scoped.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
id: find-paired-traces-adjudicate-r1-cost-confound
title: cost deltas need paired same-window replays of one prerecorded trace - block-ordered estimates only work under small measured drift
kind: finding
tags: [benchmark, estimator, paired, drift, cost, testing]
applies_to: []
source: native-safety-hypothesis-loop/find-paired-traces-adjudicate-r1-cost-confound
status: active
recorded: 2026-11-11
valid_at: 2026-11-11
---


Replaying one prerecorded trace identically in every measured mode with matched
bookkeeping and AB/BA pair-order randomization makes per-mode deltas paired
causal estimates: the A-A noise floor stays non-significant even though absolute
medians drift ~30 percent within a single run, so the pairing carries the
signal. Unpaired before/after medians cannot resolve effects at or below
roughly 10 ns/op. A block-ordered unpaired estimate deviates from the paired
estimate by exactly the within-window drift it fails to cancel - the deviation
tracks the measured drift slope (r=+0.902, permutation p=0.0001) and reaches
±13 ns under heavy drift - so block ordering is adequate only when drift is
measured small, never assumed. Report the paired median with a seeded bootstrap
confidence interval, an exact sign test, and the A-A noise floor.
20 changes: 20 additions & 0 deletions .knowledgebase/memories/find-r6-stall-was-load-confounded.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
id: find-r6-stall-was-load-confounded
title: stall and latency verdicts are confounded by host load - record load markers with every timing verdict
kind: finding
tags: [load, psi, stall, testing, benchmark]
applies_to: []
source: native-safety-hypothesis-loop/find-r6-stall-was-load-confounded
status: active
recorded: 2026-11-11
valid_at: 2026-11-11
---


The mallinfo2 stall signature reproduced under pure CPU-spinner containers with
zero allocator activity, and idle repetitions of the same cell showed no stall:
cross-container load is a first-class confound for throughput and stall
comparisons on shared hosts. Timing-based verdicts need recorded load markers
(PSI, loadavg, cgroup throttling), and a loaded run must not pass or fail on
the load - it reports inconclusive or is rerun. Markers must be passive reads of
procfs/sysfs, never instrumentation inside the measured process.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
id: find-rss-verdict-load-gating-by-mechanism
title: gate load-sensitive verdicts on the load signal that actually distorts the measured quantity, not on host busyness
kind: finding
tags: [psi, load, rss, memory-gate, verdict, ci]
applies_to: [.gitlab/reliability/memory_trend_check.py]
source: native-safety-hypothesis-loop/find-r6-stall-was-load-confounded
status: active
recorded: 2026-11-11
valid_at: 2026-11-11
---


A load bound calibrated on one host population silently breaks on another: a
CPU-pressure (psi cpu some avg10) bound set from an idle single VM (idle 0.0-0.2,
loaded 45-90) sat inside the normal operating band of shared CI hosts (observed
medians 11.7-40.3, 2026-11-10), turning every row of a memory gate inconclusive.
Choose gating signals by distortion mechanism: scheduler contention shapes
latency/stall verdicts but not RSS trends; memory pressure (reclaim) and cgroup
throttling of the measured workload do alter RSS. Record the non-gating signals
anyway - they explain verdicts later - and mark every bound provisional with
its observed basis, changing it only with recorded-run evidence and engineer
sign-off, never to make one run pass.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
id: find-s0-band-mapping-is-probe-induced
title: measurement probes perturb what they measure - record markers passively and snapshot before instrumenting
kind: finding
tags: [measurement, probe, mmap, testing, benchmark]
applies_to: []
source: native-safety-hypothesis-loop/find-s0-band-mapping-is-probe-induced
status: active
recorded: 2026-11-11
valid_at: 2026-11-11
---


A band mapping attributed to allocator/kernel behavior appeared only after the
probe wrote its own marker file: the instrumentation's footprint created the
effect it measured. Placement and mapping experiments need a pre-instrumentation
snapshot (4/4 rows showed the effect absent at S0, present at S1), and load
markers must be passive reads of procfs/sysfs - never writes into, code
execution inside, or attaches to the measured process.
20 changes: 20 additions & 0 deletions .knowledgebase/memories/find-window-quota-cfs-shape.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
id: find-window-quota-cfs-shape
title: measurement windows under CPU quota must span several CFS periods or the delivered-share reading aliases
kind: finding
tags: [cfs, quota, window, benchmark, load, testing]
applies_to: []
source: native-safety-hypothesis-loop/find-window-quota-cfs-shape
status: active
recorded: 2026-11-11
valid_at: 2026-11-11
---


At a binding CPU quota, CFS delivers CPU in period quanta: windows shorter than
a few periods alias a variable number of quanta and scatter the apparent
delivered share (observed ratio medians 0.73 down to 0.38 as the window grew
from 99 ms to 999 ms), while windows spanning at least 3 periods converge to the
quota share. Any quota- or stall-ratio comparison needs window-length control
aligned to CFS periods, and sampling cadences (e.g. a 5 s memory sampler) sit
far above this aliasing regime.
Loading
Loading