Repository navigation
tools/asahi: show why host tests failed, and name signal deaths - #3849
Conversation
A failed host-tests run listed the failing apple-dcp TAP cases but never
their reason. apple-dcp writes each one to out/<case>-failure.log, which
the runner did not print and the workflow did not upload. A test that
was SIGKILLed was reported as a bare "exit -9".
Print the tail of each failing case's failure log (first 10 cases) after
the case list. Report a signal death as "killed by SIGKILL (likely the
out-of-memory killer: an infrastructure failure, re-run it)". Upload the
failure logs with the run logs. After a failure, show free memory and
any OOM kills from the kernel log.
Tested: helper check against run 46730914700's apple-dcp log prints the
case 70 failure-log tail; died(-9)/died(-15)/died(1)/died('timeout')
give the SIGKILL hint/SIGTERM/''/''. Full run of this runner at
linux#3845's head under MemoryMax=7G, 4 jobs: 945/945 pass, peak 2.07 GB.
Risk: one-way: CI output only; no test changes pass/fail.
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
RyanTheTide
left a comment
There was a problem hiding this comment.
I ran run_all() at base and this head with the same failing TAP case and an unreadable optional physical-disconnect-failure.log. Base returns the failing case and prints the main log tail. This head raises PermissionError inside case_reasons() before the tail or any subsequent diagnostics are printed. In the default temporary-work mode, that also leaves main() with an empty failed list and it cleans up the logs. Treat reading optional per-case reasons as best-effort and keep the normal failure report on OSError.
An unreadable <case>-failure.log raised PermissionError in case_reasons() before the run's normal failure report, and in temporary-work mode main() then cleaned up the logs with an empty failed list. Skip any reason file that cannot be read (OSError), so the report never depends on it. Tested: case_reasons() on run 46730914700's apple-dcp log with case 70 readable, case 71 a directory, case 73 mode 000, case 92 missing: prints only case 70's reason, no exception. Risk: one-way: CI output only. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Fixed in e6004cc (one commit on top, no force push). |
RyanTheTide
left a comment
There was a problem hiding this comment.
The unreadable regular file now preserves the primary failure tail. The retry drops the regular-file check, though. With an existing --work directory whose out/physical-disconnect-failure.log is a FIFO with no writer, the exact case_reasons call blocks opening it and the suite never prints its primary failure tail. The prior head skipped that path. Keep the is_file() check inside the OSError guard so an optional diagnostic cannot block on a nonregular file.
Reading a reason path that is a FIFO in a reused work directory blocked the report forever. Read a <case>-failure.log only when lstat() says it is a regular file; a FIFO, directory, symlink or missing file is skipped. Tested: case_reasons() on run 46730914700's apple-dcp log with case 70 readable, 71 a directory, 73 mode 000, 92 a FIFO: prints case 70's reason only and returns at once (under a 10 s timeout). Risk: one-way: CI output only. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Fixed the FIFO stall in edff505: a reason file is read only when |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Reviewed the full diff at edff505. Verified that a regular case reason prints and that missing or unreadable files, directories, symlinks, and a FIFO leave the normal failure report intact. Checked signal and timeout reporting. This only changes CI diagnostics and artifact capture. No runtime change.
What: When host tests fail, the output now shows why. The apple-dcp per-case reasons (
out/<case>-failure.log) are printed after the failing-case list and uploaded with the run logs. A test killed by a signal is reported askilled by SIGKILL (likely the out-of-memory killer: an infrastructure failure, re-run it)instead ofexit -9. After a failure the job printsfree -mand any OOM kills from the kernel log.Why: ewb asked whether host-tests is flaky. Of the ~200 runs since 12-01 16:00Z, 8 failed. Six were real failures from their own PRs, and they repeated on re-run. Each showed only
not ok 70 - physical-disconnectwith no reason, because the reason sat in a failure log that was never printed or uploaded. One run (#3845, run 46762152155 attempt 1) had its runner VM shut down mid-job (exit 143). That is fixed on the buildbox side: the runner unit no longer stops on one OOM kill, and ci-overflow re-runs a job once on exit 137/143.Tested: I checked the helpers against run 46730914700's apple-dcp log: they print the case 70 failure-log tail.
died()maps -9, -15, 1 and timeout correctly. I ran this runner in full at #3845's head underMemoryMax=7Gwith 4 jobs (the buildbox VM's size): 945/945 pass, peak 2.07 GB.Risk: one-way: CI output only. No test changes pass or fail. Hardware row: n/a (CI tooling only).