qemu: name the cause when warden-ui stops answering a flow #26

Merged
noah merged 1 commits from rb/ln-stall-diag into rebuild 2026-10-23 08:49:19 -06:00
Owner

Refs blueflare/flare-edge#1528 (QEMU representative flows: warden-ui stops answering under load on lenovo).

On PRs #1487 and #1481 (jobs 57859, 58619, runner garm-lxqemu) warden-ui stopped answering for 30 to 60 s at a time and then recovered (unnamed-device-offers-no-app: two bridge no-replies in a row, then later steps answered). The bridge bound counts 600 polls of 0.05 s, so each no-reply is at least 30 s of guest time: the bound is not too early. Re-runs wiped the failed-flow artifacts, so nothing shows the cause.

This adds the evidence to the job log itself:

  • qmp.py: on a step that fails with the bridge's no-reply line or an unconsumed press, a stall probe (at most 3 per run) samples over 2 s the host load and PSI, the VM's vCPU thread CPU (QMP query-cpus-fast thread-id), guest /proc/stat and every guest process, and appends one line to the step detail: a verdict (host starves the VM / guest CPU saturated / guest waits on I/O / guest idle, UI blocked), the numbers, the top 3 guest processes and any in D state.
  • warden-lib.sh: the bridge answers @procs itself (cat /proc/[0-9]*/stat), so the probe works while the UI is stuck.

Local gate:

$ python3 qemu/tests/test_qmp_drive.py
Ran 64 tests in 11.844s
OK
$ bash qemu/tests/ctl-bridge-test.sh
[PASS] @procs lists process stat lines without the UI
ctl-bridge tests: OK (7 checks)
$ WARDEN_TEST_SH=<busybox ash> bash qemu/tests/ctl-bridge-test.sh
ctl-bridge tests: OK (7 checks)
$ shellcheck -s sh qemu/rootfs/etc/warden-lib.sh; shellcheck qemu/tests/ctl-bridge-test.sh
(clean)

Mutants: probing past STALL_REPORTS_MAX fails 1 test; a saturation threshold above 100% fails 2.

Generated with Claude Code

https://claude.ai/code/session_01KerYPVh72hhNgKi3wS5ijG

Refs blueflare/flare-edge#1528 (QEMU representative flows: warden-ui stops answering under load on lenovo). On PRs #1487 and #1481 (jobs 57859, 58619, runner garm-lxqemu) warden-ui stopped answering for 30 to 60 s at a time and then recovered (unnamed-device-offers-no-app: two bridge no-replies in a row, then later steps answered). The bridge bound counts 600 polls of 0.05 s, so each no-reply is at least 30 s of guest time: the bound is not too early. Re-runs wiped the failed-flow artifacts, so nothing shows the cause. This adds the evidence to the job log itself: - qmp.py: on a step that fails with the bridge's no-reply line or an unconsumed press, a stall probe (at most 3 per run) samples over 2 s the host load and PSI, the VM's vCPU thread CPU (QMP query-cpus-fast thread-id), guest /proc/stat and every guest process, and appends one line to the step detail: a verdict (host starves the VM / guest CPU saturated / guest waits on I/O / guest idle, UI blocked), the numbers, the top 3 guest processes and any in D state. - warden-lib.sh: the bridge answers `@procs` itself (cat /proc/[0-9]*/stat), so the probe works while the UI is stuck. Local gate: $ python3 qemu/tests/test_qmp_drive.py Ran 64 tests in 11.844s OK $ bash qemu/tests/ctl-bridge-test.sh [PASS] @procs lists process stat lines without the UI ctl-bridge tests: OK (7 checks) $ WARDEN_TEST_SH=<busybox ash> bash qemu/tests/ctl-bridge-test.sh ctl-bridge tests: OK (7 checks) $ shellcheck -s sh qemu/rootfs/etc/warden-lib.sh; shellcheck qemu/tests/ctl-bridge-test.sh (clean) Mutants: probing past STALL_REPORTS_MAX fails 1 test; a saturation threshold above 100% fails 2. Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01KerYPVh72hhNgKi3wS5ijG
noah added 1 commit 2026-10-22 06:31:19 -06:00
qemu: name the cause when warden-ui stops answering a flow
ci / patches-apply (pull_request) Successful in 52s
ci / mcdc (push) Successful in 32s
ci / test (push) Successful in 24s
ci / kernel-build (pull_request) Skipped
ci / bench (push) Successful in 14s
ci / qemu-tools (push) Successful in 2m29s
ci / prune-artifacts (push) Skipped
ci / test (pull_request) Successful in 24s
ci / quality (push) Successful in 1m52s
ci / mcdc (pull_request) Successful in 31s
ci / bench (pull_request) Successful in 18s
ci / kernel-build (push) Skipped
ci / patches-apply (push) Successful in 52s
ci / badges (push) Skipped
ci / kernel-symbols (push) Successful in 5m55s
ci / qemu-tools (pull_request) Successful in 2m6s
ci / prune-artifacts (pull_request) Skipped
ci / quality (pull_request) Successful in 1m38s
ci / badges (pull_request) Skipped
ci / kernel-symbols (pull_request) Successful in 6m17s
b7be6f7fbe
flare-edge #1528: on the lenovo QEMU runner warden-ui stopped answering for
30 to 60 s at a time (bridge no-reply, presses not consumed) and then
recovered. Re-run jobs lose their failed-flow artifacts, so nothing showed
whether the host starved the VM, the guest CPU was saturated, the guest
waited on I/O, or warden-ui was blocked in an idle guest.

qmp.py drive() now probes the first three such failures of a run: over 2 s
it samples host load and PSI, the VM's vCPU thread CPU (query-cpus-fast
thread-id), the guest /proc/stat and every guest process's stat line, and
appends one line to the step's detail (verdict, numbers, top guest
processes, processes in D state). The detail reaches the job log, so the
answer survives a re-run. The control bridge answers the new `@procs`
command itself, so the probe works while the UI is stuck.

Tests: test_qmp_drive.py StallProbe (parsers, verdicts, CPU deltas, the
vCPU thread sampler, a bounded probe on no-reply steps and none on a plain
mismatch); ctl-bridge-test.sh checks `@procs` with no UI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KerYPVh72hhNgKi3wS5ijG
noah merged commit 13cd0c63be into rebuild 2026-10-23 08:49:19 -06:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: blueflare/bfe-core1106-sdk#26