test(http2): cover completed zero-timeout send and read waits #16231
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/16231"
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?
Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-11-05T21:19:37Z.
What
Add a deterministic regression for an already completed asynchronous send/read consumed by
sceHttp2WaitAsyncwith a zero timeout. Check result kind, request ID, result/byte count and that the zero timeout is unchanged. A publish hook establishes that the completion is available, avoiding a scheduling assumption.The original child topic added two test/CMake files relative to its then-resolved #11630 prerequisite, with no production/header/debt delta in that historical comparison. That is not a newly qualified parent comparison at the refreshed head. Relative to main, the complete branch changes nine paths, because it also carries #11630's asynchronous HTTP2 transport implementation and its compatibility/debt changes. That inherited runtime scope includes
Export.cpp,Transport.cpp,Transport.hpp,include/Http2.hpp,GuestHttp2.cpp, and the offline-state debt fragment; the old wait-async debt fragment is removed. The two-file statement describes only the child topic, not the complete main-to-head diff. No contract is asserted for an empty zero-timeout wait.The current head is
c92592ae6d7d0b63e5908ae2f107cd1e4576d74a. Each HTTP/2 transport fixture process installs a test certificate list in its own sandbox and removes its sandbox on normal exit. Only the system-roots case places the server’s CA in that list. The remaining cases use the unrelated fixture certificate so the untrusted-server checks still exercise certificate rejection. The zero-timeout case keeps hostname verification and the original completion checks.The November 26 review head was
3fd247f80bf71710adac8fff5e962e41623a36bc. Its only change from qualified head69ade2d4cffa2dd589a474d678a2abebbdee3615is the queued-exception debt wording correction. Production, CMake and test files are byte-identical. The Linux runtime qualification below was executed at69ade2d4cffa2dd589a474d678a2abebbdee3615; no runtime rerun at the documentation-only head is claimed. Earlier results retain their stated tested pins.The branch preserves the original main
6286d364496dcompatibility integration for #11630 while that prerequisite remains open; its original author history is preserved. It now also includes pinned maina81731e94439. The integration retains main's offline failed-request state, synchronous deletion checks, newer HTTP1 gzip cases and current offline declared-length coverage. The runtime implementation belongs to #11630.Tested
December 3 Linux recheck on main
6c6b29320fe4: the earlier head’s completed-zero CTest aborted before the completion checks with the host CA bundle masked. It passed with the host bundle visible. Withc92592ae6d7d, all 24/24 registered HTTP/2 CTests passed with the host bundle masked, including three repeat runs each ofguest_http2_async_completed_zeroandguest_http2_system_roots. The HTTP/2 runtime library hash matched across the comparison. Linux x86-64, GCC 16.2.1, Release. The Windows results below apply to their stated pins.Linux current-main integration, 2026-11-26: pinned main
a81731e9443927b2b03153c05a003315cbdf4268and exact PR head69ade2d4cffa2dd589a474d678a2abebbdee3615(treeafda71a6b561633fe209bb9acc5fa1b7ad5db608). Since the last qualified main base, the merged HTTP2 runtime and fixture changes include response-output handling, callback settings, DNS result/deadline handling and their regressions. The source merge is conflict-free.guest_http2*registrations pass: main 23/23, PR 24/24, zero skips. The DNS-first registration is Windows-only.ldd -rhas no unresolved symbols or original build paths. Source, frozen providers and fixtures remain unchanged. An extra deterministic completed-zero execution confirms actual copied HTTP2 initialization; no GPU modules initialize in that probe.Build commands, focused source delta, registrations, JUnit, provider receipts and raw logs — 84,158 bytes, 35 payloads, SHA-256
fd5d6a5f01d9eb2ee984e1c56b39b5f0dbc70b2734c8ac817632669b96efd620; anonymous download and all payload hashes verified.Linux merge qualification (reported 2026-11-22 UTC):
397343a57882includes main786bc3afa1c8, preserving inherited #11630 async production scope and the completed-zero tests. Linux 7.3.5-arch1-1, g++ (GCC) 16.2.1 20260810, Release: actual unpatched HTTP2 module plus all six fixtures built; all 24 Linuxguest_http2*cases pass, zero skips. The DNS-first case is Windows-only. Frozen dependencies/mapping and hashes were verified; teardown embeds candidate production source. Conventions has zero errors (two long-entry warnings). Source/build/test evidence. Earlier source/parent comparisons and Windows results below remain historical to their stated pins. Depends on #11630 remains.Linux CPU Release qualification (reported 2026-11-18 UTC) on pinned main
6286d364496d41fcff8b032742ba0ace2972b6a1, GCC 16.2.1, Ryzen 9 7950X: main 20/20, resolved parent 20/20, child 21/21, zero skips/failures. Tested/published parent9489d7bf142702c75f12891d277e3a1d940d9f27, childb9aff06850d879c210810e7c32fb889fcc0976a8. All fixture/provider/source hashes remain stable; the mutable builder and submodules restore cleanly. Parent/childlibSceHttp2binaries are byte-identical.guest_http2_async_completed_zero; both entries are preserved. The child remains exactly two test/CMake files over the parent, with no production/header/debt delta.WaitAsyncalso fails the unchanged completed-zero fixture; source/module restoration passes it. Total 14 pass / 3 expected failures, with source and rebuilt module restored byte-for-byte and fixture hashes unchanged.7c26b9e86b93is already an ancestor of the qualified November 22 head and the refreshed November 26 head. #11630 remains the explicit functional dependency.Downloaded and verified 86-payload report, source patches, logs/JUnit and hash receipts, SHA-256
6bb71fe434ff470a5084921f727c4dbfb9e5ac3c9148bf3297a8aaf5cad05b3d. Earlier Windows reports retain their original pins; this refresh covers Linux CPU loopback tests and makes no new Windows, GPU, title/FPS or console claim.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Summary by CodeRabbit
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T11:07:24Z.
Review: COMMENTED
Reviewed — no blocking findings
The inspected portions show no verified blocking defect, but the prepared change is substantially broader than the PR description and the review is incomplete.
What I ran
Read the prepared description, commit list, manifest, diff, and review README. Inspected targeted runtime and test code at head
c5f8f126b9404af0bdc73c94524068355628ebd1. No commands or tests were run.Results
Findings
Blocking
None verified in the portions inspected.
Non-blocking
core/libs/prx/libSceHttp2/Export.cpp,core/libs/prx/libSceHttp2/Transport.cpp, anddocs/dev/debt/changes/fix-http2-offline-state.mdare changed in the manifest and diff.Not verified
The changed files listed in the manifest are
core/libs/prx/libSceHttp2/CMakeLists.txt,core/libs/prx/libSceHttp2/Export.cpp,core/libs/prx/libSceHttp2/Transport.cpp,core/libs/prx/libSceHttp2/Transport.hpp,core/libs/prx/libSceHttp2/include/Http2.hpp,core/libs/tests/GuestHttp2.cpp,core/libs/tests/GuestHttp2Transport.cpp,docs/dev/debt/changes/fix-http2-offline-state.md, and deleteddocs/dev/debt/changes/fix-http2-wait-async-guest-copy.md. Targeted ranges were read inExport.cpp,Transport.cpp, andGuestHttp2Transport.cpp; not every changed line in those files or the other changed files was reviewed. The deleted file has no head text. Author-reported test results were not independently run or verified.To get this to a good state
Nothing is required. The description mismatch is an optional point; a complete review would require inspecting the remaining changed lines and running the relevant checks.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T07:09:50Z.
Review: COMMENTED
Reviewed — comments
The prepared evidence describes successful Linux tests, but I did not independently run them or read every changed line, so approval is not justified.
What I ran
No commands or tests were run. I read the prepared diff and targeted pinned-head source with
repo_read.pytools.Results
Findings
Blocking
None identified in the inspected code.
Non-blocking
None.
Not verified
I did not independently verify the reported test runs or inspect every added line. I read
description.md,commits.md,manifest.json,diff.patch,README.md, and targeted ranges inExport.cppandGuestHttp2Transport.cpp. The remaining changed source ranges were not read;fix-http2-wait-async-guest-copy.mdis deleted and has no new text to inspect.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-11-26T17:59:36Z.
Review: COMMENTED
Actionable comments posted: 11
c9f44171-405f-449c-a906-3d2128a67411Reviewing files that changed from the base of the PR and between
a81731e944and69ade2d4cf.core/libs/prx/libSceHttp2/CMakeLists.txtcore/libs/prx/libSceHttp2/Export.cppcore/libs/prx/libSceHttp2/Transport.cppcore/libs/prx/libSceHttp2/Transport.hppcore/libs/prx/libSceHttp2/include/Http2.hppcore/libs/tests/GuestHttp2.cppcore/libs/tests/GuestHttp2Transport.cppdocs/dev/debt/changes/fix-http2-offline-state.mddocs/dev/debt/changes/fix-http2-wait-async-guest-copy.mdIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-26T18:32:04Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
Changes are required before merge: make request deletion wake all blocked
sceHttp2WaitAsynccallers and ensure their completions are consumed before the request becomes invalid.What I ran
Reviewed head
69ade2d4cffa2dd589a474d678a2abebbdee3615against the prepared diff. I did not run build or test commands. The Linux qualification described in the PR description is author-reported.Results
Findings
Blocking
core/libs/prx/libSceHttp2/Export.cpp:296-298: Deletion snapshotsinFlightintoaborted, then callstransport->Stop(false)before adding abort completions and notifying waiters. A blocked waiter can wake when the transport completion notifies the condition variable, observeretired == falseand an empty queue, then go back to sleep. If the transport has already completed and decrementedinFlightbeforeDropAsync, the snapshot is zero, soAbortAsyncadds no completion; the waiter remains blocked indefinitely. The existing deletion tests exercise one waiter and may not expose this race. Signal deletion atomically with queuing one abort completion per in-flight operation, then stop the transport without clearing those completions; add a regression that repeatedly deletes during a blocked wait and verifies the waiter returns.Non-blocking
None.
Not verified
core/libs/prx/libSceHttp2/Export.cpp,Transport.cpp,Transport.hpp,include/Http2.hpp,core/libs/tests/GuestHttp2.cpp,GuestHttp2Transport.cpp,core/libs/prx/libSceHttp2/CMakeLists.txt, anddocs/dev/debt/changes/fix-http2-offline-state.mdwere read in targeted ranges or diff hunks.docs/dev/debt/changes/fix-http2-wait-async-guest-copy.mdwas excluded by the review manifest. No other changed files were excluded.To get this to a good state
Queue and publish deletion completions before stopping the transport, and add a regression for a waiter racing with a transport completion. Re-run the focused HTTP/2 test suite on the updated head.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-26T19:10:36Z.
Review: COMMENTED
Reviewed — comments
Nothing blocks this; the points below are optional.
What I ran
Reviewed head
3fd247f80bf71710adac8fff5e962e41623a36bcusing the prepared diff andrepo_read.pyfor targeted source reads. I did not run tests or builds.Results
Findings
Blocking
None.
Non-blocking
sceHttp2ReadDataAsyncdereferencesdatadirectly on a detached worker, without copying or pinning it. The API therefore requires the caller’s buffer to remain valid until completion, as the debt note states; a caller that releases it early can cause an invalid write. Consider documenting that lifetime requirement at the API boundary or using managed guest-memory access. Evidence:core/libs/prx/libSceHttp2/Export.cpp:371.Not verified
No build or test was run. The deleted
docs/dev/debt/changes/fix-http2-wait-async-guest-copy.mdhas no head text to read. The review bundle’s description reports Linux qualification at a prior head; I did not independently verify those results. All eight non-deleted changed files were read; the deleted path was excluded by the manifest.To get this to a good state
Nothing is required. The buffer-lifetime point above is optional.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T12:37:06Z.
Review: COMMENTED
Built the registered HTTP/2 fixture and ran it on Linux with this change combined with main at
6c6b29320f. The new zero-timeout test aborts during TLS setup because the fixture has no system CA list in its working directory. Loopback name resolution was available for that run.AI-assisted: yes.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-03T12:55:05Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the code and reported Linux qualification support merging.
What I ran
Reviewed head
c92592ae6d7d0b63e5908ae2f107cd1e4576d74ausing the prepared diff and file snapshots. I ran no build or tests; the qualification results below are author-reported.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
I did not run the reported tests or independently verify their logs. No current-head Windows, macOS, physical-console, GPU, or full-project-suite results were provided. Reviewed the eight current file snapshots; the ninth changed path is deleted and has no head text, so its deletion was assessed from the diff. No files were excluded by the supplied review rules.
To get this to a good state
Nothing is required.
Sources: Export.cpp at the reviewed head, GuestHttp2Transport.cpp at the reviewed head.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-12-03T12:58:25Z.
Review: COMMENTED
Actionable comments
514210d1-8b0c-4caf-87fc-fefa2489f3eaReviewing files that changed from the base of the PR and between
3fd247f80bandc92592ae6d.core/libs/prx/libSceHttp2/CMakeLists.txtcore/libs/tests/GuestHttp2Transport.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.