bench: a failed or interrupted leg can leave stale or late artifacts for the report #426
Labels
No labels
priority/P0
priority/P1
priority/P2
release/v0.1.0
status/blocked
status/planned
type/bug
type/design
type/test-gap
type/tracker
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
natsukium/felis#426
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Split from #408. While fixing #408 (the macOS warm startup daemon, and refusing legs the display cannot present), review found faults in how
tools/benchcleans up after a failed, interrupted or refused leg. They predate #408 and are not needed for its two points, so they are tracked here.#408's fix keeps a refused leg out of the report and forces its retake from the leg's env record:
field.sweep_refusedmoves a refused leg's artifacts torefused/before a suite starts and before the report loads a directory. That covers late writes for refused legs. The faults below remain for legs that were not refused.1. A stale row survives a retry that raised
Review finding (sol):
The same applies to any leg and suite: artifacts from an attempt interrupted after writing its result but before its
.donemarker stay in the suite directory. If the retry fails before rewriting them, the report charts them. A likely fix is to clear every leg's result stems (startup:felis-cold/felis-warm/<term>) before the retry.2. A stopped launch can outlive its stop and write afterwards
Review findings (sol):
For #408 these were resolved by the env-record sweep, which does not rely on the writer being dead. A launch that ignores SIGTERM can still outlive
open_legfor a leg that was not refused, and felis's wrapper shell runs under the daemon rather than the launch. It can then touch its result or.donewhile the next leg runs. Decide whetheropen_legshould wait for, and escalate against, the leg's whole process set.3. Escalating to SIGKILL needs process identity, not a pid
Review finding (sol), against a
reaphelper that was dropped from #408:Any fix for (2) that escalates must satisfy this: pidfd on Linux, or a start-time check on macOS.