H17 Soak: a match decided during the drop leaves the client leak check without a sample #86

Closed
opened 2026-11-14 22:57:47 +00:00 by claude · 1 comment
Owner

Found by the R5 (#64) release gate on f776d59.

make soak (24 clients, 2 matches, 60 ms ± 20 ms, 2% loss, seed 7) failed with "client process N logged its memory at 1 match starts, too few to look for a leak" for all three client processes. Everything else passed: 2,438 hashes compared, 0 differing; p99 tick 6.3 ms; server memory growth 0.4 MB.

Cause: match 0 was decided during the drop. The clients fought as they landed, and 23 weapon eliminations ended it 39 s after the drop began (drop → results at tick 1572, never play). That's allowed by design (Match.in_match() covers DROP, and test_last_one_standing_wins_and_places_are_recorded ends a match there). But soak_clients.gd samples a process's memory only on entering play, so that match gave no sample. The server samples at drop, which every match reaches, so it wasn't affected.

Acceptance

  • A match that never reaches play is sampled at its results, so every match gives each client process one memory sample.
  • A test covers the phase rule.
  • make soak-selfcheck and a full make soak pass.
Found by the R5 (#64) release gate on f776d59. `make soak` (24 clients, 2 matches, 60 ms ± 20 ms, 2% loss, seed 7) failed with "client process N logged its memory at 1 match starts, too few to look for a leak" for all three client processes. Everything else passed: 2,438 hashes compared, 0 differing; p99 tick 6.3 ms; server memory growth 0.4 MB. **Cause:** match 0 was decided during the drop. The clients fought as they landed, and 23 weapon eliminations ended it 39 s after the drop began (drop → results at tick 1572, never `play`). That's allowed by design (`Match.in_match()` covers DROP, and `test_last_one_standing_wins_and_places_are_recorded` ends a match there). But `soak_clients.gd` samples a process's memory only on entering `play`, so that match gave no sample. The server samples at `drop`, which every match reaches, so it wasn't affected. **Acceptance** - A match that never reaches play is sampled at its results, so every match gives each client process one memory sample. - A test covers the phase rule. - `make soak-selfcheck` and a full `make soak` pass.
claude added this to the v0.9 Hardening milestone 2026-11-14 22:57:47 +00:00
claude added the type/bug label 2026-11-14 22:57:47 +00:00
eric closed this issue 2026-11-14 23:31:10 +00:00
Author
Owner

Fixed in f5227b7.

  • Fix: soak_clients.gd takes a match's memory sample on entering play, or at its results for a match that never reached play. The rule is samples_memory_in(phase), covered by test/net/test_soak_memory_sample.gd. Each memory line now carries "at" to say where the sample came from.
  • Tested:
    • make soak-selfcheck passed.
    • A full make soak (same seed 7, so match 0 ended in the drop again) passed. Each client process logged two samples (results for match 0, play for match 1), client growth was 0.65 MB, and 2,458 hashes were compared with 0 differing.
    • make check passed (698 tests).
  • Caveat: a results sample can sit slightly above a play sample. A run whose first match is sampled at results is therefore a little lenient on growth measured from it.

— tidewall-build

Fixed in f5227b7. - **Fix:** `soak_clients.gd` takes a match's memory sample on entering play, or at its results for a match that never reached play. The rule is `samples_memory_in(phase)`, covered by `test/net/test_soak_memory_sample.gd`. Each memory line now carries `"at"` to say where the sample came from. - **Tested:** - `make soak-selfcheck` passed. - A full `make soak` (same seed 7, so match 0 ended in the drop again) passed. Each client process logged two samples (`results` for match 0, `play` for match 1), client growth was 0.65 MB, and 2,458 hashes were compared with 0 differing. - `make check` passed (698 tests). - **Caveat:** a results sample can sit slightly above a play sample. A run whose first match is sampled at results is therefore a little lenient on growth measured from it. — tidewall-build
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: claude/tidewall#86