docs(libkernel): record sem_timedwait timeouts as measured on a PS5 #10137

Merged
orezraey merged 5 commits from upstream-pr/10137 into main 2026-10-26 14:27:46 +00:00
orezraey commented 2026-10-23 10:35:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by orezraey on 2026-10-23T10:35:49Z.


What

The sem_timedwait debt entry said the console's behaviour for null and invalid timeouts when a count is available was unverified. I measured it on a retail PS5 (firmware 13.60) with a homebrew probe, from a payload process. The source and console log are in this gist (psem).

Count Timeout PS5
1 null 0, count taken
1 tv_nsec -1 0, count taken
1 tv_nsec 1000000000 0, count taken
1 {0, 0} (past) 0, count taken
0 tv_nsec -1 or 1000000000 -1, EINVAL
0 {0, 0} or {-1, 0} -1, ETIMEDOUT

AnyPS5 already gives every one of these results, so only the debt entry changes. It now records the measurement in place of "unverified".

Tested

Windows 11, MinGW (winlibs).

  • Documentation only; no code changes.
  • tools/check_conventions.py passes.
  • tools/pr_overlap.py lists PRs that touch other lines of docs/dev/debt/libkernel.md; #9167 keeps this entry as context and does not change it.

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: #11267 (the debt line after sem_timedwait), #9491 (merge order only: it edits the same lines; this PR is refreshed after it)
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4981446329 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10137). Originally posted by [orezraey](https://github.com/orezraey) on 2026-10-23T10:35:49Z. --- ### What The `sem_timedwait` debt entry said the console's behaviour for null and invalid timeouts when a count is available was unverified. I measured it on a retail PS5 (firmware 13.60) with a homebrew probe, from a payload process. The source and console log are in [this gist](https://gist.github.com/orezraey/1dac0730c0c8d05c0db90b6db6e12676) (`psem`). | Count | Timeout | PS5 | |---|---|---| | 1 | null | 0, count taken | | 1 | `tv_nsec` -1 | 0, count taken | | 1 | `tv_nsec` 1000000000 | 0, count taken | | 1 | `{0, 0}` (past) | 0, count taken | | 0 | `tv_nsec` -1 or 1000000000 | -1, `EINVAL` | | 0 | `{0, 0}` or `{-1, 0}` | -1, `ETIMEDOUT` | AnyPS5 already gives every one of these results, so only the debt entry changes. It now records the measurement in place of "unverified". ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> Windows 11, MinGW (winlibs). - Documentation only; no code changes. - `tools/check_conventions.py` passes. - `tools/pr_overlap.py` lists PRs that touch other lines of `docs/dev/debt/libkernel.md`; #9167 keeps this entry as context and does not change it. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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: #11267 (the debt line after `sem_timedwait`), #9491 (merge order only: it edits the same lines; this PR is refreshed after it) - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
MarcZX10 commented 2026-10-23 10:44:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-23T10:44:00Z.

Review: DISMISSED


The measurement is useful and the PR body is appropriately scoped: it records the exact count/timeout cases and leaves the implementation unchanged. The evidence in the linked probe log supports the table, including ETIMEDOUT (errno 60) for the no-count past/negative-seconds cases and successful count consumption before timeout validation when a count is present. Conventions, diff-check, and current-main sync pass (3 ahead/29 behind; merge clean); hosted eligibility/intake/conventions/labels pass and product jobs are skipped for this documentation-only change. There is one merge blocker to coordinate: PR #10105 also edits this exact sem_timedwait debt entry, and a pairwise merge of the two current heads conflicts in docs/dev/debt/libkernel.md. Please coordinate a single combined wording/landing order with that author, refresh after the first change lands, and preserve both the title call-site evidence from #10105 and these console measurements. Add Depends on if one PR must land first under the repository rules; otherwise document the agreed order and rerun overlap/convention checks.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5627150188 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10137#pullrequestreview-5627150188). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-23T10:44:00Z. **Review:** DISMISSED --- The measurement is useful and the PR body is appropriately scoped: it records the exact count/timeout cases and leaves the implementation unchanged. The evidence in the linked probe log supports the table, including `ETIMEDOUT` (errno 60) for the no-count past/negative-seconds cases and successful count consumption before timeout validation when a count is present. Conventions, diff-check, and current-main sync pass (3 ahead/29 behind; merge clean); hosted eligibility/intake/conventions/labels pass and product jobs are skipped for this documentation-only change. There is one merge blocker to coordinate: PR #10105 also edits this exact `sem_timedwait` debt entry, and a pairwise merge of the two current heads conflicts in `docs/dev/debt/libkernel.md`. Please coordinate a single combined wording/landing order with that author, refresh after the first change lands, and preserve both the title call-site evidence from #10105 and these console measurements. Add `Depends on` if one PR must land first under the repository rules; otherwise document the agreed order and rerun overlap/convention checks.
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!10137
No description provided.