ci(sanitizers): list precise_wait as a known failure of the hosted runner #13250

Closed
xXPBSXx wants to merge 2 commits from upstream-pr/13250 into main
xXPBSXx commented 2026-10-30 07:53:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-30T07:53:01Z.


What

The nightly Sanitizers workflow reports precise_wait as a failed test in its runs of 28 October, 29 October and 30 October: the median of a 50 us sleep is 120 us, 117 us and 117 us against the test's bound of 90 us. The release.yml workflow already leaves this test out of its Linux run (commit 20c425aabe); the Release runs of 18 October and 19 October, which are unsanitized builds on a hosted ubuntu-latest runner, failed the same 50 us check at 111 us and 114 us. The Build workflow's Linux job, where the test passes, runs on the self-hosted runners. The three nightly runs contain no sanitizer report for precise_wait, only the timing lines.

This adds one line for precise_wait (address,undefined) to .github/sanitizer-known-failures.txt, so the sanitizer report lists it as a known failure of the hosted runner. It does not hide a fault of a library: the line names the runner effect. In the three runs the 50 us checks of PreciseWait.cpp end at a stable 117 to 120 us. Its "busy runner" skip, which needs a probe gap above 25 us or a spread above 1 ms, applied to PreciseSleepUs(50) on 29 and 30 October but not to PreciseSleepUntil(+50us), the check that fails. Should the test be adapted instead of listed here?

Tested

  • python -m unittest tools.tests.test_sanitizer_report passes with the line (27 tests, 2 skipped) on Windows 10 (Python 3.12.10), and on Ubuntu 24.04 under WSL2 (a virtualised kernel, not bare-metal, Python 3.12.3) with an earlier wording of the line; only its reason text differs from this head (two heads back), and the WSL2 VM did not start for a re-run on this head. With the sanitizer name misspelled, or with the line twice, test_every_entry_parses fails with a ValueError naming the line, so the file is checked; after restoring it the tests pass again.
  • precise_wait passes 10 of 10 runs in an ASan build and 10 of 10 in a TSan build on that Ubuntu under WSL2 (setarch x86_64 -R).
  • check_conventions --base upstream/main passes, and git merge-tree against main is clean.
  • Not run: the nightly workflow itself with this line (it stays red until #12894 lets libSceAddressSanitizer build), and the plain and the sanitized build measured in one job on a hosted runner.

Overlap

I took the changed files of each of the 1480 open PRs from git diff --name-only against its merge base: four change .github/sanitizer-known-failures.txt, tools/sanitizer_report.py, its test or PreciseWait.cpp (#12483, #12493, #12872 and #13189), and none of them changes .github/sanitizer-known-failures.txt or PreciseWait.cpp. git merge-tree of this head with each of the four is clean, and so is git merge-tree of each of them against main alone.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

AI-assisted (Claude Code).

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5081228008 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13250). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-30T07:53:01Z. --- ### What The nightly Sanitizers workflow reports `precise_wait` as a failed test in its runs of [28 October](https://github.com/boykopovar/AnyPS5/actions/runs/40628345613), [29 October](https://github.com/boykopovar/AnyPS5/actions/runs/40813774822) and [30 October](https://github.com/boykopovar/AnyPS5/actions/runs/40998975340): the median of a 50 us sleep is 120 us, 117 us and 117 us against the test's bound of 90 us. The `release.yml` workflow already leaves this test out of its Linux run (commit `20c425aabe`); the Release runs of [18 October](https://github.com/boykopovar/AnyPS5/actions/runs/39158404755) and [19 October](https://github.com/boykopovar/AnyPS5/actions/runs/39322114724), which are unsanitized builds on a hosted `ubuntu-latest` runner, failed the same 50 us check at 111 us and 114 us. The Build workflow's Linux job, where the test passes, runs on the self-hosted runners. The three nightly runs contain no sanitizer report for `precise_wait`, only the timing lines. This adds one line for `precise_wait` (`address,undefined`) to `.github/sanitizer-known-failures.txt`, so the sanitizer report lists it as a known failure of the hosted runner. It does not hide a fault of a library: the line names the runner effect. In the three runs the 50 us checks of `PreciseWait.cpp` end at a stable 117 to 120 us. Its "busy runner" skip, which needs a probe gap above 25 us or a spread above 1 ms, applied to `PreciseSleepUs(50)` on 29 and 30 October but not to `PreciseSleepUntil(+50us)`, the check that fails. Should the test be adapted instead of listed here? ### Tested - `python -m unittest tools.tests.test_sanitizer_report` passes with the line (27 tests, 2 skipped) on Windows 10 (Python 3.12.10), and on Ubuntu 24.04 under WSL2 (a virtualised kernel, not bare-metal, Python 3.12.3) with an earlier wording of the line; only its reason text differs from this head (two heads back), and the WSL2 VM did not start for a re-run on this head. With the sanitizer name misspelled, or with the line twice, `test_every_entry_parses` fails with a `ValueError` naming the line, so the file is checked; after restoring it the tests pass again. - `precise_wait` passes 10 of 10 runs in an ASan build and 10 of 10 in a TSan build on that Ubuntu under WSL2 (`setarch x86_64 -R`). - `check_conventions --base upstream/main` passes, and `git merge-tree` against `main` is clean. - Not run: the nightly workflow itself with this line (it stays red until #12894 lets `libSceAddressSanitizer` build), and the plain and the sanitized build measured in one job on a hosted runner. ### Overlap I took the changed files of each of the 1480 open PRs from `git diff --name-only` against its merge base: four change `.github/sanitizer-known-failures.txt`, `tools/sanitizer_report.py`, its test or `PreciseWait.cpp` (#12483, #12493, #12872 and #13189), and none of them changes `.github/sanitizer-known-failures.txt` or `PreciseWait.cpp`. `git merge-tree` of this head with each of the four is clean, and so is `git merge-tree` of each of them against `main` alone. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes AI-assisted (Claude Code). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
malekaifa commented 2026-10-30 10:30:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by malekaifa on 2026-10-30T10:30:34Z.

Review: CHANGES_REQUESTED


The updated runner diagnosis is well supported, but I found a blocking policy issue with encoding this timing flake in sanitizer-known-failures.txt. sanitizer_report treats a known failure purely by test name, not by failure cause or whether a sanitizer report was captured. On current code, summarize('ASan', {'precise_wait':'failed'}, {'precise_wait':'hosted runner timing'}, {'precise_wait':'SUMMARY: AddressSanitizer: heap-buffer-overflow in PreciseWait'}) returns failing=False and prints only the Known failure table; the sanitizer report is omitted. So after this line lands, a future real ASan/UBSan defect inside precise_wait would make the nightly pass as a known hosted-runner timing failure. That directly confirms the masking risk oneandonlydean raised; clarifying that the current three runs contain no sanitizer report does not protect future runs. Please handle the hosted timing behavior at the test/workflow level instead (for example a sanitizer/hosted-runner-aware bound or skip), or change the reporting policy so a known test is still unexpected when a sanitizer report is present, with a regression for that distinction. The evidence that ubuntu-latest itself contributes to the current timing failure looks reasonable; my blocker is only the unsafe suppression mechanism.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5711005754 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13250#pullrequestreview-5711005754). Originally posted by [malekaifa](https://github.com/malekaifa) on 2026-10-30T10:30:34Z. **Review:** CHANGES_REQUESTED --- The updated runner diagnosis is well supported, but I found a blocking policy issue with encoding this timing flake in sanitizer-known-failures.txt. sanitizer_report treats a known failure purely by test name, not by failure cause or whether a sanitizer report was captured. On current code, summarize('ASan', {'precise_wait':'failed'}, {'precise_wait':'hosted runner timing'}, {'precise_wait':'SUMMARY: AddressSanitizer: heap-buffer-overflow in PreciseWait'}) returns failing=False and prints only the Known failure table; the sanitizer report is omitted. So after this line lands, a future real ASan/UBSan defect inside precise_wait would make the nightly pass as a known hosted-runner timing failure. That directly confirms the masking risk oneandonlydean raised; clarifying that the current three runs contain no sanitizer report does not protect future runs. Please handle the hosted timing behavior at the test/workflow level instead (for example a sanitizer/hosted-runner-aware bound or skip), or change the reporting policy so a known test is still unexpected when a sanitizer report is present, with a regression for that distinction. The evidence that ubuntu-latest itself contributes to the current timing failure looks reasonable; my blocker is only the unsafe suppression mechanism.
adriadam10 commented 2026-10-30 13:29:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-30T13:29:29Z.

Review: CHANGES_REQUESTED


Agree with @oneandonlydean and @malekaifa on the mechanism, and the runner diagnosis itself is well supported. Requested change:

  • .github/sanitizer-known-failures.txt:9: summarize in tools/sanitizer_report.py (lines 89-90) treats a known failure by test name only, so once precise_wait is listed a real ASan/UBSan report inside it would be printed as "Known failure: hosted runner timing" and the nightly would stay green. Please don't encode a timing flake there.
  • Handle it at the workflow/test level instead: PreciseWait.cpp already honours APS5_SKIP_TIMING_TESTS (lines 14-19), so set it in the nightly Sanitizers job's test step, or exclude it there with ctest -E '^precise_wait$' as release.yml:90 does, or give the sanitizer/hosted build a wider bound. Then the test is skipped, not listed, and any sanitizer report from it still fails the run.
  • Alternatively, change the reporting policy so a known test with a captured sanitizer report stays unexpected, with a regression test for that distinction (that would be its own PR touching tools/sanitizer_report.py, which overlaps #12483, #12493, #12872 and #13189).
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5712943592 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13250#pullrequestreview-5712943592). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-30T13:29:29Z. **Review:** CHANGES_REQUESTED --- Agree with @oneandonlydean and @malekaifa on the mechanism, and the runner diagnosis itself is well supported. Requested change: - `.github/sanitizer-known-failures.txt:9`: `summarize` in `tools/sanitizer_report.py` (lines 89-90) treats a known failure by test name only, so once `precise_wait` is listed a real ASan/UBSan report inside it would be printed as "Known failure: hosted runner timing" and the nightly would stay green. Please don't encode a timing flake there. - Handle it at the workflow/test level instead: `PreciseWait.cpp` already honours `APS5_SKIP_TIMING_TESTS` (lines 14-19), so set it in the nightly Sanitizers job's test step, or exclude it there with `ctest -E '^precise_wait$'` as `release.yml:90` does, or give the sanitizer/hosted build a wider bound. Then the test is skipped, not listed, and any sanitizer report from it still fails the run. - Alternatively, change the reporting policy so a known test with a captured sanitizer report stays unexpected, with a regression test for that distinction (that would be its own PR touching `tools/sanitizer_report.py`, which overlaps #12483, #12493, #12872 and #13189).

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!13250
No description provided.