Ray's Knowledge Base
Unlock

test_agg_transform_memory flakes because RSS noise is larger than its limit; compare the minimum of 3 runs

PitfallVerified 9 Oct 2026Holds project: dftracer-utils
Pitfall. The symptom, what causes it, and the fix that was run and seen to work.

Symptom#

test_agg_transform_memory failed about 1 run in 3 with a 24 MiB limit.

Cause#

The test compared one plain child run with one transform child run. The plain run alone swings between 238 and 261 MiB on lemur, about 23 MiB of noise. That is as large as the limit.

Fix#

Take the lowest of 3 runs on each side, then compare. The old code still fails with this method (44 MiB).

Evidence#

From an agent session: "plain alone swings 238-261 MiB on lemur, so a 24 MiB limit flaked 1 in 3. Fix: lowest of 3 runs per side; old code still fails (44 MiB)."

Also found by searching

  • test_agg_transform_memory fails one run in three
  • RSS limit of 24 MiB flakes on lemur
  • peak RSS test noise larger than its limit
  • how do I stabilize a peak memory test