Skip to content

ci(sanitizers): skip the strict precise_wait bound in the hosted nightly - #13325

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
xXPBSXx:ci/sanitizers-skip-timing-tests
Oct 30, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
xXPBSXx:ci/sanitizers-skip-timing-tests

Conversation

@xXPBSXx

@xXPBSXx xXPBSXx commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

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 three runs contain no sanitizer report for precise_wait, only the timing lines. The unsanitized Release runs of 18 October and 19 October on a hosted ubuntu-latest runner failed the same check at 111 us and 114 us, while the Linux job of the Build workflow, where the test passes, runs on the self-hosted runners. That points to the hosted runner rather than the instrumentation, though the two kinds of run were not measured in one job.

PreciseWait.cpp already reads APS5_SKIP_TIMING_TESTS (documented in docs/dev/ENVIRONMENT.md): when it is set, a median that still misses its bound after three attempts is skipped as on a busy runner. A sleep that returns before its requested duration still fails, and a median within the bound still passes. This sets the variable for the ctest step of the nightly workflow, one line in .github/workflows/sanitizers.yml; nothing is added to the known-failures list and no code changes. The Build workflow and local runs keep the 90 us bound. A sanitizer report in the test still fails it and is reported with its first report like any unlisted test, because the variable only changes the final timing check.

This replaces #13250, which listed the test as a known failure and would have hidden such a report.

Tested

  • PreciseWait.cpp copied with its bound set to 5 us, so that the median check fails at once (Windows 10 Pro, MinGW-w64 GCC 15.2, Release; the file in the repository is unchanged): without the variable the test fails 3 of 3 runs with median overslept target bound; with APS5_SKIP_TIMING_TESTS=1 it passes 3 of 3 with Skipping strict median bound ... on busy runner; with APS5_SKIP_TIMING_TESTS=0 it fails 3 of 3. The unchanged test, run in 8 pairs, failed 1 of 8 times without the variable and 0 of 8 with it.
  • The workflow file parses as YAML, with the variable in the env of the step that runs ctest. check_conventions --base upstream/main passes, and git merge-tree against main is clean.
  • On Ubuntu 24.04 under WSL2 (a virtualised kernel, not the hosted runner), the same copy of PreciseWait.cpp with its bound set to 5 us, in a plain build and in an ASan and UBSan build, fails in 5 of 6 runs without the variable (in the sixth the test's own busy-runner probe skipped the check) and passes in 6 of 6 runs with APS5_SKIP_TIMING_TESTS=1, printing Skipping strict median bound ... on busy runner. In 12 alternating runs of an unchanged copy that prints its medians, the 50 us sleeps have a median of 50.1 to 50.7 us in both builds, with a highest value of 63 us, so the sanitizers add no measurable time there; the 111 to 120 us of the hosted runner did not appear on that machine.
  • Not run: the nightly workflow itself with this line (it stays red until fix(build): do not build libSceAddressSanitizer in an ASan or TSan build #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 1425 open PRs from git diff --name-only against its merge base: none changes .github/workflows/sanitizers.yml or core/libs/tests/PreciseWait.cpp. 91 change docs/dev/ENVIRONMENT.md, which this PR does not touch, so no pair of this PR with another open PR can conflict on a file this PR changes. #13250 is the known-failures entry that this PR replaces.

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

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — looks good

This workflow-only change scopes the timing-tolerance variable to the sanitizer test step, and the existing test still checks that sleeps never return early.

What I ran

Reviewed head 1ceceab40eece374967f44c7921a0b1dee37e68b against base f91137142eafd5df646fca6419a1fc4ef61b89d9; the merge preview was clean (tree 1002ede91391c663d1453675b6cb9afeadc02c26). Environment: Debian 12 x86-64, Python 3.11.2, Git 2.39.5. I did not build or run C++ tests.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13325
python3 -c 'import subprocess, yaml; text = subprocess.check_output(["git", "show", "refs/review/pr-13325:.github/workflows/sanitizers.yml"], text=True); yaml.safe_load(text); print("sanitizers.yml parsed successfully")'
python3 tools/check_conventions.py --base f91137142eafd5df646fca6419a1fc4ef61b89d9 --head 1ceceab40eece374967f44c7921a0b1dee37e68b --title 'ci(sanitizers): skip the strict precise_wait bound in the hosted nightly' --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13325-1ceceab40eec/pr-body.md
git merge-tree --write-tree f91137142eafd5df646fca6419a1fc4ef61b89d9 1ceceab40eece374967f44c7921a0b1dee37e68b

Results

Check Result
Diff whitespace and conventions/template Passed.
Workflow YAML parse Passed.
Scope/source inspection The variable is set only on the sanitizer ctest step. PreciseWait.cpp still returns failure for sleeps shorter than requested; the variable only affects acceptance of an over-bound median after retries.
Merge preview Clean against the PR base.
Author-reported tests The PR reports 3/3 pass with the variable, 3/3 fail with it set to 0, and existing test runs; I did not independently run these C++ tests.
Hosted CI Queued at final refresh.
Unedited local check output
sanitizers.yml parsed successfully
All conventions checks passed.
1002ede91391c663d1453675b6cb9afeadc02c26

Sources

Not verified

The hosted sanitizer workflow and C++ tests were not run locally. Hosted CI was still queued at the final refresh.

@adriadam10

Copy link
Copy Markdown
Collaborator

Checked that PreciseWait.cpp only uses APS5_SKIP_TIMING_TESTS for the final median bound after three attempts (early returns and sanitizer reports still fail), and that the variable is set on the ctest step only; merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants