ScriptWorker ShadowModeTests: one unexplained wrong sibling value under heavy CPU load #811

Closed
opened 2026-11-10 21:39:41 -05:00 by dohertj2 · 1 comment
Owner

Seen once while fixing #798 (commit 304d1f1e). In the first loaded run of the reworked ShadowModeTests runaway test (16 yes processes, load avg ~64) the sibling script's published value was wrong; the output was truncated before the value/reason, so the cause is unknown. Not reproduced in 20+ further loaded runs (16/24/48 load processes, load avg up to 358) or 20 unloaded runs.

Hypothesis (unverified): the test's 300 ms in-process run budget expiring under load. If it recurs, capture the failing value's status/reason; if it is a budget timeout, raise the test's run budget (which also sets the worker soft deadline) rather than weakening any assertion. Watch CI for it.

Seen once while fixing #798 (commit 304d1f1e). In the first loaded run of the reworked ShadowModeTests runaway test (16 `yes` processes, load avg ~64) the sibling script's published value was wrong; the output was truncated before the value/reason, so the cause is unknown. Not reproduced in 20+ further loaded runs (16/24/48 load processes, load avg up to 358) or 20 unloaded runs. Hypothesis (unverified): the test's 300 ms in-process run budget expiring under load. If it recurs, capture the failing value's status/reason; if it is a budget timeout, raise the test's run budget (which also sets the worker soft deadline) rather than weakening any assertion. Watch CI for it.
dohertj2 added the type:testpriority:p3 labels 2026-11-10 21:39:41 -05:00
Author
Owner

Fixed on master (merge 83e8cf76; db057548, test-only). Reproduced: 3/8 failures at load avg ~320–390 (32 yes + nice -n 20). Every failure was the sibling's shadow run in the worker missing the test's 300 ms soft deadline (shadow Failed [budget] script timed out after 0.3s) — the published value was correct in every run. Test run budget raised to the 2 s production default (named RunawayRunBudget); no assertion weakened; failures are now self-diagnosing (value/status/reason/timing, guard counters, thread pool, GC, logs). After the fix 10/10 at load avg up to 588. Matching the original single failure to this cause is a strong inference, not proof. Design follow-up: #827 (soft deadline includes transport/scheduling delay). Runtime flake → #828.

Fixed on master (merge 83e8cf76; db057548, test-only). Reproduced: 3/8 failures at load avg ~320–390 (32 `yes` + `nice -n 20`). Every failure was the sibling's **shadow** run in the worker missing the test's 300 ms soft deadline (`shadow Failed [budget] script timed out after 0.3s`) — the published value was correct in every run. Test run budget raised to the 2 s production default (named `RunawayRunBudget`); no assertion weakened; failures are now self-diagnosing (value/status/reason/timing, guard counters, thread pool, GC, logs). After the fix 10/10 at load avg up to 588. Matching the original single failure to this cause is a strong inference, not proof. Design follow-up: #827 (soft deadline includes transport/scheduling delay). Runtime flake → #828.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dohertj2/lmxopcua#811