feat(http2): complete asynchronous send and read #11630
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/11630"
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 edubox on 2026-10-26T23:59:59Z.
What
sceHttp2SendRequestAsync,sceHttp2ReadDataAsyncandsceHttp2WaitAsyncthrew. This completes them over the existing transport:sceHttp2SendRequestAsynccopies the body, runsSendon a worker and queues anHttp2AsyncResultwhoseresultis the transport's result, then triggers the kqueue user event (equeue at 0, event id at 8, user data at 16, the layout inferred from PPSA17221).sceHttp2ReadDataAsyncdoes the same forReadand reports the bytes read inresult.sceHttp2WaitAsyncwaits for the oldest completion. A nulltimeoutwaits indefinitely;*timeout == 0throws because whether zero blocks is unknown (PPSA02195 polls with a zero timeout and aborts the request on an immediate timeout, but the 11.00 kernel path is not in the dump), recorded in the debt entry; a nonzero*timeoutis a microsecond deadline that returns0x817b1079when it expires, which is the 11.00 mapping of the kernel's0x8002003c. A nullresultreturns0x817b1225and a non-null trailing argument or a non-zeroreservedfield of the result returns0x817b11fe. Each request owns a stable completion state; deleting a request or its parent retires that state, wakes waiters with the invalid-id error, and drops queued and later completions without triggering a user event. Publication and retirement share the request state lock, so a completion cannot be delivered after deletion returns.event_typeis 0 for send and 1 for read, confirmed by the 11.00 completion kinds (+0x1600pairs mapped at0x9a4f).*timeoutreceives the remaining microseconds, following the forwarded kernel pointer; whether a zero timeout blocks is still an open kernel question recorded in the debt entry, an unregistered user event is not detected at submission, and a transport exception is rethrown fromsceHttp2WaitAsync.Evidence
The argument and timeout contract comes from the decrypted firmware 11.00
libSceHttp2.sprx:sceHttp2SendRequestAsyncat0x1940/internal0x4a60,sceHttp2ReadDataAsyncat0x1b20/0x4e20andsceHttp2WaitAsyncat0x1c20/0x9a00. The wait forwards the caller's pointer tosceKernelWaitSema(sema, 1, timeout)(0x4790) and remaps the kernel timeout0x8002003cto0x817b1079(0x9a79); the result and trailing-argument checks are at0x1d21,0x1ccaand0x1cd3, and the completion kind at+0x1600selectsevent_typethrough the table at0x271d0. Because the 11.00 submission bodies reject a non-null trailing pointer with0x817b11fewhile PPSA22408 passes one, the trailing pointer stays ignored and the debt entry records the version split.Tested
Linux (CachyOS), GCC 16.2.1.
guest_http2submits an asynchronous request whose body length does not match the declared content length, then checks the user event payload and thatsceHttp2WaitAsyncrethrows the worker's exception.guest_http2_transportdrives a real loopback HTTP/2 send and read through the asynchronous API, plus the async-failure, wait-versus-delete, two-waiter, parent-teardown, deletion-after-publication, optional-argument and expired-wait cases. The expired-wait case pins0x817b1079, and the null-timeout case stalls the response and checks that the wait returns only after the completion. The zero-timeout case is not pinned because its console behaviour is unknown.guest_http2,guest_http2_cookies,guest_http2_transportandguest_http2_early_responsepass in the Release build.Title: PPSA02195 polls
sceHttp2WaitAsyncwith*timeout == 0and aborted the request as soon as it received an immediate timeout; that remains the only observation and the case stays unimplemented until a console measurement settles it. It was run with other local changes on the same tree.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)git merge-treeon the current heads)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-27T00:01:16Z.
Review: CHANGES_REQUESTED
Reviewed exact head
b42c09562c218caa6e999205e43a6c08274b7ced. I found a blocking lifetime race in the async completion queue.[P1]
sceHttp2WaitAsyncmust not retain a deque reference across the condition-variable wait when deletion can erase it. AtExport.cpp:349-350,queuerefers directly to the mapped deque and the wait releasesg_completionsMutex.sceHttp2DeleteRequestcan then erase that entry at lines 163-164. A detached operation may subsequently runCompleteAsync, recreate the map entry, and notify; the waiter wakes and evaluatesavailableagainst the destroyed deque reference (or accesses it atqueue.front()), which is a use-after-free. A finite timeout can also wake it after deletion. Separately, the worker can publish a new completion after deletion, so erasing the existing queue does not actually drop pending completions as the PR description says.Please make request deletion, in-flight operations, and waiters share a stable per-request completion state (including a defined cancelled/deleted wake result), and ensure no completion can be enqueued after that state is retired. Add a regression that blocks a waiter, deletes the request while an operation is still in flight, then releases/completes the operation and verifies there is no hang, stale completion, or invalid access; run it under ASan/TSan where available.
I have not run this PR's tests locally yet; existing PR checks are policy-only for these changed paths and skip product builds. This request is based on the lock and lifetime interleaving above, not on an unrun test claim.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-27T01:28:06Z.
Review: CHANGES_REQUESTED
Reviewed current head
2ca67c36eb082641d502227da49d08ca193c9c6b. The completion-lifetime and exception-propagation changes address my earlier request, but theguest_http2fixture still expectssceHttp2WaitAsyncto return a numeric result for a request created bysceHttp2Init(1, 1, ...)without initializing an SSL context.Transport.cpprequires a usable SSL context and throwssceHttp2: SSL context or connection unavailable; the worker now correctly carries that exception toWaitAsync, so this fixture aborts rather than receiving the expected completion. An independent Linux run on this exact head reports the same failure. Please update this case to assert exception delivery, or provide a valid SSL context if a numeric completion is intended.I built
guest_http2_testslocally.ctest -R '^guest_http2$'aborts before reaching the assertion because this Xeon E5-1620 v2 lacks required CPU extensions; this is not a local reproduction of the fixture failure.git diff --checkpasses. Local conventions report the existing 1200-character debt entry length warning; hosted conventions passed on this head. Product build jobs are skipped by path policy.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-27T02:10:45Z.
Review: CHANGES_REQUESTED
Reviewed exact head
1e42382d8bcf4e1d1612395577bc5f78b5fd21e5. The updatedguest_http2case now uses the transport's declared-length check to exercise exception delivery, and changingAsyncFailuretoMode::Resetremoves its dependence on redirect support. Those address the prior fixture findings.[P1] Serialize event delivery with request retirement.
CompleteAsyncchecksstate->retiredand enqueues the completion while holdingstate->mutex, then releases the lock at line 69 and triggers the user event at line 71.sceHttp2DeleteRequestcan retire and erase the request in that gap. The worker then triggers an event after deletion even though the debt entry says later completions are dropped without triggering one. Please make retirement and event delivery mutually ordered (and add a regression for deletion after enqueue but before trigger); the existing stalled-worker deletion test only covers completion arriving after retirement.[P2] Coordinate the overlapping test/debt edits. The current merge-base check against open #11575, #11586, #11611, and #11617 reports content conflicts in
GuestHttp2Transport.cpp(and, for the first three,docs/dev/debt/libSceHttp2.md). CONTRIBUTING.md says to agree with overlapping PR authors on order and declare a prerequisite withDepends onwhen needed. Please coordinate the order and update the checklist/debt text so the combined landing is explicit. The pair with #11616 merges cleanly.The updated convention and label checks pass, and the report check passed. The product build jobs are skipped by path policy; I have not independently rerun the reported Release/ASan/TSan tests on this head.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T09:09:42Z.
Review: CHANGES_REQUESTED
Re-check — changes requested\n\nThe exact current head now fixes the earlier event-after-delete race: CompleteAsync holds the per-request state mutex through event triggering, RetireAsync takes the same mutex, and AsyncDeletePublished pauses after queue publication to verify deletion cannot return before delivery. This resolves my prior P1 finding.\n\nTwo remaining items:\n\n1. The checklist says Depends on: none while its explanation says #11586, #11617 and #11575 must land before #11611, and #11611 before this PR. CONTRIBUTING requires an explicit prerequisite when another open PR must land first. Please confirm the order with those authors and set Depends on #11611 (or revise the sequence and reciprocal checklists if these changes can land independently).\n2. The Windows report explains the observed async-send test timeout: localhost resolves to IPv6 first while the test server listens only on 127.0.0.1, and refusal can consume more than the test's 2-second wait. That plausibly explains the local failure without indicating a production defect, but it leaves a platform-sensitive test failure. Please make the fixture avoid the slow address-refusal path (or otherwise demonstrate the Windows test is stable) and report the focused Windows result.\n\nThe report's Linux focused tests are author-reported; I did not run tests locally. Hosted policy checks are still pending, and the automatic workflow does not run the full product tests.
Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-10-29T10:19:49Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
The asynchronous send, read and completion lifecycle builds and its tests pass, but
sceHttp2WaitAsyncmakes*timeout == 0block because of one title, while the firmware path the PR cites (and the in-treesceKernelWaitSema) returns a timeout at once.What I ran
bbfeca05579945eaa26042b8b366a1ec4fe9d333main:1b580f13cf7e3bcab980dbb41623eb78fa8eefebBUILD_TESTING=ON, in a clean worktree.Results
maingit diff --checkcheck_conventions.py --base origin/mainAll conventions checks passed.libsguest_http2*(7 tests)guest_http2_transport9.91 sguest_http2*repeated 3 timessceKernelWaitSemawith*time == 0on an empty semaphore0x8002003cafter 1 µsFocused tests
Semaphore probe
Negative control
I restored
Export.cppandHttp2.hppfrommainand kept the new tests:guest_http2fails:terminate called after throwing an instance of 'std::runtime_error' what(): sceHttp2SendRequestAsync not implemented(Subprocess aborted).guest_http2_transportno longer compiles:GuestHttp2Transport.cpp:612:5: error: « GuestSceHttp2Test » n'a pas été déclaré("has not been declared"), because the test hook lives in the production header.I restored the merged files afterwards.
Findings
Blocking
A zero wait timeout blocks only because of PPSA02195, against the cited firmware path. At
Export.cpp:429-433, a nonzero*timeoutgets a timed wait and every other case callswait(). The PR's own evidence says the 11.00 body passes the caller's pointer tosceKernelWaitSema(sema, 1, timeout)and maps0x8002003cto0x817b1079. The in-treesceKernelWaitSematreats a zero*timeas a deadline of now (Semaphore.cpp:125-127). My probe measured0x8002003cafter 1 µs. So the library composed from the PR's own sources returns0x817b1079at once for a zero timeout.The debt entry gives one title's behaviour as the only reason to block. CONTRIBUTING says to implement the general behaviour, not what one title needs. AGENTS.md says to throw and record a gap when the general behaviour is unknown.
The title evidence also does not separate the two hypotheses:
b32de8a741, an unmet wait calledNotImplemented_nid_no_patch, so an immediate abort there was a throw, not a timeout code.b32de8a741added blocking together with the unsourced0x817B1068.0x817b1079(e44e532dac) was replaced 34 s after it was committed.PPSA02195 may well retry on
0x817b1079and only have aborted on the earlier codes.GuestHttp2Transport.cpp:497-502then pins the blocking behaviour as correct.Suggested fix: restore the
e44e532dacbehaviour (a zero timeout polls and returns0x817b1079) and drop the "zero blocks" assertion. If you keep blocking, post a PPSA02195 log from a build where zero polls with0x817b1079, showing the title abort on that code.*timeoutis recorded as "not updated, unverified", but the cited path updates it. The same entry says the remaining time is not written back.e44e532dacstated that*timeoutreceives the remaining microseconds, and that follows from forwarding the pointer:Semaphore.cpp:127writes the remainder through it.bbfeca0557removed the write-back with no new evidence. Please write the remaining microseconds back ase44e532dacdid, or give the reason for the change.Non-blocking
sceHttp2WaitAsync.CompleteAsync(Export.cpp:66-82) stores the exception and still triggers the user event. A title that reacts to the event and then callssceHttp2GetStatusCodeorsceHttp2DeleteRequestnever sees theNotImplementedfrom the transport; the request just looks complete. That includes a second submission while one is in flight, which fails in the worker atTransport.cpp:536-538. Consider rethrowing a pending failure from the next synchronous call on that request, or fromDeleteRequest, so an unimplemented path cannot pass silently.GuestHttp2Transport.cpp:11-14includesprx/libkernel/include/Api.hpptwice; the added line 14 can go.Depends on: noneconflicts with the landing order in its own explanation. I have no new evidence on it.Not verified
sceKernelWaitSemawith a zero timeout; I only measured the in-tree implementation.To get this to a good state
*timeout == 0follow the citedsceKernelWaitSemapath (immediate0x817b1079), or show the PPSA02195 abort with that code.*timeout, or document why not.AsyncBlockingWaittest to match.Depends onas already requested.Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-10-29T12:19:43Z.
Review: CHANGES_REQUESTED
Re-checked — changes still requested
sceHttp2WaitAsyncnow writes the remaining microseconds back to*timeout, the duplicate include is gone andDepends onnames #11611. But*timeout == 0still blocks only because of PPSA02195, and no new evidence has been posted for it.What changed since my last review
main5454cd2e45, and one new commit was added:2a97417f63 fix(http2): report the remaining async wait timeout. Apart from the rebase, the diff againstbbfeca0557has three parts:sceHttp2WaitAsyncuses asteady_clockdeadline and writes the remaining time back.AsyncBlockingWaitchecks that an expired wait setsshortTimeoutto 0.Api.hppinclude is removed.*timeoutreceives the remaining time. It also mentions the in-treesceKernelWaitSemazero-timeout result next to the PPSA02195 claim.Depends on: #11611. The author's reply of 2026-10-29 12:11 keeps zero-timeout blocking. It says they did not get a log from a build where a zero timeout polls and returns0x817b1079.What I ran
2a97417f635a7fe55dd84f13cac889291f4c28d2main:5454cd2e455994d992aca39335ce60507eeda1ebBUILD_TESTING=ON, in a clean worktree.maingit diff --checkcheck_conventions.pydebt-length, see below)libsand the http2 test targetsguest_http2*(7 tests)guest_http2_transport10.16 sguest_http2*repeated 3 timesguest_http2_transportfails atexpired wait clears the timeoutNegative control output
Previous findings
Export.cpp:429-437still sends*timeout == 0to the untimedwait(), andGuestHttp2Transport.cpp:497-502still pins that behaviour.0x817b1079. As noted last time, the history only supports an abort under the earlier throwing path, before0x817b1079was returned.sceKernelWaitSema. In-tree, that call returns a timeout at once for zero (Semaphore.cpp:125-127). The new write-back follows that same call for nonzero values, so zero is now the only input where the PR departs from it.0x817b1079), or, if the behaviour is really unknown, throw for*timeout == 0and record it.*timeoutwrite-back. Resolved. Lines 430-433 compute a deadline, wait until it, and write back the remainder, or 0 once it has passed. This matchesSemaphore.cpp:125-127. The new assertion at line 495 fails without the change (negative control above). The debt entry was updated.GuestHttp2Transport.cppnow includesApi.hpponce.Depends on. Resolved in text: the checklist names #11611, which is open. The landing order is the author's owngit merge-treemeasurement; I did not re-measure it.New findings
Blocking
None.
Non-blocking
check_conventions.pywarns:docs/dev/debt/libSceHttp2.md:43: warning: [debt-length] Technical debt entry over 1000 characters ... 1028 characters. Fixing finding 1 will rewrite this entry anyway, so it can be trimmed then.TimedWait. Lines 430-433 reimplementTimedWait::DeadlineNanos/RemainingMicros(core/libs/prx/libkernel/Time/include/TimedWait.hpp:21-22), whichsceKernelWaitSemauses. The two would then round the same way. This is optional.Not verified
localhostfixture change is the author's report and milescoviello's earlier focused run; I did not run Windows.sceKernelWaitSemabehaves on a console with a zero timeout, and the firmware 11.00 offsets.libsand the http2 test targets.To get this to a good state
*timeout == 0return0x817b1079at once, as the citedsceKernelWaitSemapath does, and changeAsyncBlockingWaitto match. Alternatively, throw for zero and record it as unknown. Or post a PPSA02195 log from a build where zero polls with0x817b1079that shows the title aborting on that code.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T20:13:29Z.
Review: CHANGES_REQUESTED
Re-checked — new head, changes requested
The rebase and focused-test report are current, but the exact head still makes a zero timeout wait indefinitely without evidence that this matches PS5 behavior.
What I ran
a12b595d517fbdf48727ca079563c3e90c10acdc; base:fd9b3f62d43d6753d28a31a7c285e1f51e9c1b42.Results
*timeout != 0; zero reaches an unboundedwait.sceKernelWaitSemabuilds a deadline from the supplied timeout and writes back the remaining time; the author’s previous focused probe reported zero returns0x8002003cimmediately.guest_http2*testsUnedited relevant output
Negative control
Findings
Blocking
*timeout == 0reaches an unbounded condition-variable wait. The PR’s cited firmware path forwards the timeout pointer tosceKernelWaitSema, whose current in-tree implementation returns immediately for zero; the available PPSA02195 evidence shows a cancellation after a timeout but does not establish that an immediate0x817b1079result is unsafe. The behavior is therefore still unknown, while this change chooses blocking semantics. Please either follow the measured in-tree timeout behavior, throw and record the unknown behavior, or provide a console/title log showing PPSA02195 succeeds when zero returns0x817b1079.Non-blocking
The latest report says the Windows localhost fixture is fixed and focused tests pass. I did not independently run that suite. The worker-exception case remains a follow-up as the author states.
Sources
a12b595d517fbdf48727ca079563c3e90c10acdcfd9b3f62d43d6753d28a31a7c285e1f51e9c1b42Not verified
I did not independently run the local build, focused tests, ASan/TSan, Windows tests, or a PS5 console/title run. The hosted workflow skipped Linux product and specialized jobs.
To get this to a good state
Resolve the zero-timeout behavior with measured evidence or keep it unimplemented as unknown behavior, update the test/debt/description consistently, and request re-review. I will recheck the same behavior and focused tests on the new head.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T21:24:04Z.
Review: CHANGES_REQUESTED
Re-checked — new head, changes requested
The rebase and focused-test report are useful, but the new firmware disassembly confirms that zero-timeout behavior is decided in the unavailable kernel and does not establish that zero blocks.
What I ran
Reviewed exact head
44ef307e0272a311ed4f04cf20c14cff60452f44and livemainc40cef843681418b4d66df2939a92ba8ba6ba5d9on Linux x86-64 using Git and GitHub CLI. The merge preview is clean; the current head is based on9624d8c6bb9e96b7aa92b815f55690f69b0a88d5.git diff --checkpasses. I did not build or run C++ tests locally.Results
mainmainis not yet in this branchgit diff --checkguest_http2testssceKernelWaitSema; the dump does not include the kernel implementation, so it does not settle whether zero blocksUnedited merge-preview output
Findings
Blocking
*timeout == 0still selects an unbounded wait without evidence of the PS5 kernel behavior. The new disassembly showssceKernelWaitSemareceives the caller’s timeout pointer unchanged; it does not show what the encrypted kernel does with zero. The PPSA02195 observation and the author’s interpretation support the blocking choice but do not independently verify the console contract. Please provide a console measurement or other direct evidence for zero, or leave this case unimplemented and record it as unknown. Also update onto livemainc40cef843681418b4d66df2939a92ba8ba6ba5d9; since9624d8c6,mainchangedExport.cppat the separatesceHttp2SetMinSslVersionimplementation.Non-blocking
Sources
44ef307e0272a311ed4f04cf20c14cff60452f44c40cef843681418b4d66df2939a92ba8ba6ba5d9Not verified
I did not independently inspect the firmware binary, run the focused tests, build locally, or measure behavior on a PS5. The author’s disassembly and title observations are reported evidence, not reproduced here.
To get this to a good state
Update onto live
mainand resolve zero-timeout behavior with direct evidence or keep it unimplemented as unknown. I will recheck the exact new head and rerun the same relevant checks.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T22:27:46Z.
Review: APPROVED
Re-checked — new head, looks good
The zero-timeout behavior is now explicitly left unimplemented and documented as unknown, resolving the prior request not to assume it blocks.
What I ran
5a7eef9671dad8caf78fd4dd2127f30c13f2778e; PR base:ebb4075168e9d96a2b3f177d9e6cda6900326e27; livemain:4c8cff191609bc5f28bf9ee2f93672b531285aa4.mainsince its base.Results
b7e96091bc6b92eb7acba06a834b71961956d713guest_http2tests pass 7/7 on the exact head under Linux/GCC 16.2.1 Release. I did not run them locally.Unedited local check output
git diff --checkproduced no output and exited 0.Findings
Blocking
None found in the updated scope.
Non-blocking
The zero-timeout case remains intentionally unsupported until console behavior is measured; the PR records that limitation in its debt entry. The PR also remains dependent on #11611 as declared in its checklist.
Sources
Not verified
I did not build or run the C++ tests locally. Linux product CI was skipped; the focused Linux test result is author-reported.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-30T06:00:25Z.
Review: APPROVED
Re-checked — new head, looks good
The refreshed head is based directly on current
main, and the zero-timeout case now remains explicitly unimplemented until console behavior is established.What I ran
Reviewed exact head
04c86ff08bc7668c405e7b32a3ea40f42131e2a7against currentmain88e2d98f49c949380b45c9cfa266687e28d4443c; the merge preview is clean (55589932ece7e83a5160b518532418730188a5fd). Environment: Linux x86-64; no local build or tests run.Results
All conventions checks passed.88e2d98f455589932ece7e83a5160b518532418730188a5fdFindings
Blocking
None found. The unsupported zero-timeout behavior is now explicitly rejected and documented as unknown rather than assumed to block.
Non-blocking
The author-reported focused tests were not independently reproduced. Console behavior for zero timeout, kernel event registration, and the ignored trailing argument remains documented as unverified or version-dependent.
Sources
Not verified
I did not build locally, run CTest, inspect a PS5 kernel implementation, or test console behavior. The focused test results are author-reported, and the new hosted checks were pending at review time.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-30T07:04:11Z.
Review: APPROVED
Re-checked — new head, looks good
The current head preserves the previously reviewed HTTP/2 change, and the unresolved zero-timeout behavior remains explicitly unimplemented and documented.
What I ran
Reviewed exact head
672314a018ae471de5f50a946bfed6fd2e16c7d2against basef7f03daf52f11191174b1be089a56e268390a707. Environment: Debian Linux x86_64; no compiler or local build was used. I compared the old and current patch series, checked whethermainchanged the four PR-touched files since the prior reviewed base, and read the currentsceHttp2WaitAsyncsource.Results
NotImplemented_nid_no_patch(__func__)whentimeoutis non-null and*timeout == 0Unedited command output
Findings
Blocking
None found. The current diff matches the reviewed patch series, the intervening main commits do not change the files this PR touches, and zero-timeout behavior remains explicitly unimplemented rather than inferred.
Non-blocking
The focused test results are author-reported rather than independently reproduced on this exact commit. The current hosted checks were still pending at review time, and console behavior for a zero timeout remains unknown as documented.
Sources
Not verified
I did not build or run CTest locally, reproduce the focused HTTP/2 tests, or test console/kernel behavior. The author-reported test evidence is for the same reviewed patch series before this rebase; current hosted checks were pending.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T02:18:29Z.
Review: APPROVED
Re-checked — new head, looks good
The current HTTP/2 change passes the exact-head Windows changed-test job and the author reports 7/7 focused tests on Linux; I found no new blocker.
What I ran
4955621fb5713c3cb300178d5aca32f60e18c987against PR basec12e7e61a185261d837b6fb2ff1c92a07a00e5ff; livemainis014c19ab19defcd3d198481337f175d58883a50c, and the merge preview onto it is clean.The diff, conventions, ABI audit, and live-main merge preview passed. The Windows job completed its changed-guest-test build/run step successfully on this exact head. The author reports
ctest -j8 -R '^guest_http2'passed 7/7 on this exact head (Linux, Ubuntu 24.04, GCC 13.3, Release).Not verified
I did not run a local build or tests. The full declared stack was not integrated: #11611's current head is not included in this branch, and the PR description specifies that #11611 lands first. This approval covers the reviewed head; follow that landing order before merging.
Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-02T20:41:57Z.
Review: APPROVED
Re-checked — approved
The one blocking item from my last review is fixed.
sceHttp2WaitAsyncnow throws for*timeout == 0and the debt entry records that the behaviour is unknown. The debt entry has also been trimmed, and the branch now merges withmainafter #11575 landed.What changed since my last review
I last reviewed
2a97417f63. Since then:ed84628a24 docs(http2): trim the async wait debt entry: thesceHttp2WaitAsyncentry is now under 1000 characters.d920b437e9 fix(http2): leave the zero wait timeout unimplemented: a non-nulltimeoutpointing to 0 now callsNotImplemented_nid_no_patch(Export.cpp:430).AsyncBlockingWaitnow tests the null-timeout path and no longer pins the zero case.3519324da2: a merge ofmainthat resolves the conflicts with #11575.GuestHttp2Transport.cpp,Serverkeepsmain's(mode, location, redirectStatus)parameters and addsbindHostas the fourth. Every caller that passes a bind host (Success,Async,AsyncWithoutQueue,AsyncOptionalArguments,AsyncBlockingWait) uses the four-argument form. So the trap B-Howell described, whereServer(mode, "localhost")silently sets the redirect location instead, does not happen here.main's old async debt entry is replaced by this PR's two entries.What I ran
Head
3519324da2791b88b66f4ab67fbb4c0a962b8a8f,main9090972b7e91fd266819cbd77a8b058e177b5682, merged tree714f0f9da59be2f176efde868f0eb27cae0e7df0. Debian 13 VM, Xeon Gold 6136, GCC 14.2.0, Release, Ninja,BUILD_TESTING=ON.git diff --checkcheck_conventions.pyAll conventions checks passed.(the debt-length warning is gone)libs(script)unwrap_selfalso fails onmainguest_http2*(8 tests) ×3guest_http2_transport12.2 s,guest_http2_redirects13.0 sguest_http2andguest_http2_transportpass againNegative control
I restored
Export.cppandHttp2.hppfrommain:guest_http2aborts withsceHttp2SendRequestAsync not implemented.guest_http2_transport_testsdoes not build ('GuestSceHttp2Test' has not been declared, at the publish-hook calls). This matches ycbuzi's Windows control.My earlier run already covered the write-back assertion at
GuestHttp2Transport.cpp:852-857, and that code has not changed since.Previous findings
*timeout == 0now throws atExport.cpp:430. ThesceHttp2WaitAsyncdebt entry now records the question as unknown and no longer says the title "aborts". It now says the title "cancels the request after an immediate timeout", which matches the log lines the author posted. No test pins the zero case.*timeoutwrite-back. Resolved before this round, and the code is unchanged.Depends on. Resolved in text: it names #11611 and gives the landing order.TimedWait. Still open and optional.Export.cpp:434-437still computes the deadline and remainder withstd::chronoinstead ofTimedWait::DeadlineNanos/RemainingMicros, whichsceKernelWaitSemauses.New findings
Blocking
None.
Non-blocking
None. One note: B-Howell reports that RuneScape: Dragonwilds (PPSA34114), Mafia (PPSA14299) and PPSA02195 now stop at the zero-timeout throw. This is the intended result of leaving the case unimplemented. A console measurement of
sceKernelWaitSemawith a zero timeout would settle it in a follow-up.Not verified
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-12T01:36:36Z.
Review: APPROVED
Reviewed — looks good
The current async completion implementation and its regression cases address the previously reviewed lifecycle and timeout issues at head
b17933dfd42df9c63dc5c0c8df343e5b889352a1.What I ran
Reviewed the exact head against live
mainac94ac850371e12cde7048c3db59135e19a869c3; the merge preview is clean. GitHub’s PR object still reports based03dd7751e036cb3273c9e543059fc35190add11, so checks used the live branch tip. Environment: Debian Linux x86-64, Python 3.11.2, Git 2.39.5, GCC 12.2.0. I ran the repository precheck and inspected the full five-file diff, including the completion queue, retirement synchronization, wait behavior, tests and debt notes.Results
guest_http2suites passing; I did not run them locally.The precheck’s full results and raw output are in the saved report; the hosted check snapshot is from GitHub for this head.
Findings
Blocking
None found in the reviewed diff.
Non-blocking
The PR documents the known version/title difference for the trailing async
optionargument; the implementation and tests intentionally retain the behavior used by PPSA22408.Sources
Not verified
I did not run a local build or CTest, or test on a PS5. The Linux focused-test results are author-reported. Seven hosted jobs were skipped and provide no evidence for their respective platforms or configurations.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-14T07:08:43Z.
Review: COMMENTED
Reviewed — comments
Nothing blocks this review; the points below are optional.
What I ran
Reviewed head
148c3ba01644b418b69ded8105b3d07cac6a2375. No commands or tests were run; repository access was throughrepo_read.pytools. I readdescription.md,commits.md,manifest.json,diff.patch, and the changed repository filesExport.cppandTransport.cpp. The prepared listing shows all seven changed files as included, butfiles.jsonwas not available, so the reviewed-file inventory could not be independently confirmed.Results
files.jsonunavailableFindings
Blocking
None verified in the read code.
Non-blocking
sceHttp2ReadDataAsynccaptures the rawdatapointer into a detached worker and passes it toRequest::Read(core/libs/prx/libSceHttp2/Export.cpp:250,core/libs/prx/libSceHttp2/Export.cpp:364). The PR description discusses copied send bodies but does not state this read-buffer lifetime requirement.Not verified
Transport.hpp,Http2.hpp,GuestHttp2.cpp,GuestHttp2Transport.cpp, ordocs/dev/debt/libSceHttp2.md; behavior specific to those files is not verified.files.jsonwas unavailable from the review listing, so I could not verify whether every file marked for review was read.To get this to a good state
Nothing is required. Optional: document the async read-buffer lifetime requirement and add a focused test or contract note.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-15T03:33:54Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this change; the inspected async paths have targeted loopback coverage, but some changed files were not available for review.
What I ran
Read the prepared diff at head
ab1f2d5c977d80bba54f670cc8b56675ec25407eand targeted source ranges withrepo_read.py. No build or tests were run; the test results in the PR description are author-reported.Results
Findings
Blocking
None in the inspected code.
Non-blocking
None.
Not verified
Read:
description.md,commits.md,manifest.json,diff.patch; source ranges incore/libs/prx/libSceHttp2/Export.cpp,Transport.cpp,Transport.hpp,include/Http2.hpp,core/libs/tests/GuestHttp2.cpp,GuestHttp2Transport.cpp, anddocs/dev/debt/libSceHttp2.md.The manifest marks all seven changed files as reviewed and included, but the full text of
core/libs/prx/libSceHttp2/Export.cppwas unavailable through the review-file path; only targeted ranges were read.files.jsonwas also unavailable. No repository tests, build, console behavior, or author-reported test runs were independently verified.To get this to a good state
Nothing is required. Optional: review the full
Export.cppand run the reported Release tests before relying on the broader behavior claims.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-19T10:45:24Z.
Review: DISMISSED
Reviewed — changes requested
Changes are required before merge: prevent asynchronous reads from being submitted once request deletion or parent teardown has begun.
What I ran
Head:
06638cf07ddaa65816379e029159f0402ae8d598. I read the prepared description, commits, manifest, diff, and changed source at the pinned head throughrepo_read.py. No commands or tests were run; test results below are author-reported.Results
Findings
Blocking
core/libs/prx/libSceHttp2/Export.cpp:353andcore/libs/prx/libSceHttp2/Export.cpp:359:sceHttp2ReadDataAsyncobtains the request and its async state underg_handlesMutexinTransport, releases that lock, and only later incrementsinFlightunder the state mutex. If deletion or parent teardown removes the handle and retires the state in between, the read path still increments no in-flight count but launches a worker. That worker retains the transport and can callReadafter deletion has returned;CompleteAsyncthen drops its result because the state is retired. This contradicts the stated lifecycle guarantee and permits a read to write into the caller's buffer after deletion. Make validating the live state and registering the operation atomic with handle removal/retirement, and return the invalid-id error if deletion already started.Non-blocking
None.
Not verified
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, anddocs/dev/debt/libSceHttp2.md. No manifest-excluded changed files were listed.To get this to a good state
Synchronize async read submission with request deletion and parent teardown so no read worker can start after retirement. Add or adjust a regression test for the submission-versus-delete race, then rerun the relevant HTTP/2 tests on the new head.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T09:37:34Z.
Review: DISMISSED
Reviewed — changes requested
Changes are required before merge: fix asynchronous request deletion so that it wakes waiters with the documented aborted completion.
What I ran
Reviewed head
f2fd1aaef4ecd632caa83cca136a89239dea1abbagainst the prepared diff. No commands or tests were run. Read the description, commits, diff, and all six changed source and test files included in the manifest;docs/dev/debt/libSceHttp2.mdwas present in the diff but its full text was not reviewed.Results
Findings
Blocking
sceHttp2DeleteRequestcallsDropAsync, stops the transport, then callsAbortAsync(core/libs/prx/libSceHttp2/Export.cpp:296-298).DropAsyncsnapshots in-flight operations intoaborted, butAbortAsyncmarks the state retired and queues aborted completions without notifying waiters until after the lock is released; this is eventually okay for the notification itself. The concrete issue is thatRequest::Stopmay not promptly interrupt an active transport operation, so deletion can block beforeAbortAsyncwakes the waiter. The deletion path must publish/wake aborted completions before waiting for transport shutdown, while ensuring the read buffer is no longer written after deletion returns.Non-blocking
None.
Not verified
docs/dev/debt/libSceHttp2.mdwas not read; its diff was inspected.files.jsonwas not available through the reader.To get this to a good state
Publish aborted completions and wake blocked waiters as part of request deletion before transport shutdown can block; retain the guarantee that no async read writes its buffer after deletion returns. Then rerun the deletion and in-flight async tests.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T11:46:38Z.
Review: COMMENTED
Reviewed — comments
Nothing blocks this review, but the documented idle-wait result differs from the implementation and needs clarification.
What I ran
Reviewed head
8c98607585d120019e3df5e0e40d04cfeaaede59. I read the prepared description, commits, manifest, and full diff, then inspectedExport.cppandTransport.cppat the pinned head. No tests or build commands were run.Results
Findings
Blocking
None.
Non-blocking
sceHttp2WaitAsyncreturnsERROR_NOT_CONNECTEDwhen no completion is queued andInFlight() == 0, before consideringtimeout(core/libs/prx/libSceHttp2/Export.cpp:562). The debt entry says the idle case returns0x817b1065immediately for zero, finite, and null timeouts, but only says the null-timeout behavior follows the other measurements and is unmeasured (docs/dev/debt/libSceHttp2.md:1128). Please clarify the evidence and ensure the documentation matches the intended contract.Not verified
Export.cppandTransport.cppwere read at the pinned head.Transport.hpp,include/Http2.hpp,GuestHttp2.cpp,GuestHttp2Transport.cpp, and the debt file were not read as repository files; their diff hunks were inspected where relevant.To get this to a good state
Nothing is required. Optional: clarify the idle null-timeout evidence in the debt entry.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-25T10:12:55Z.
Review: COMMENTED
Reviewed — no blocking findings
The inspected asynchronous HTTP/2 paths show no verified blocking defect, but the review is incomplete because I did not run the reported checks or read every changed file in full.
What I ran
301e49b659435752a0477f6de21a7092a142b1e1.Results
Negative control
Could not run a negative control because no tests were run.
Findings
Blocking
None verified in the inspected code.
Non-blocking
None.
Sources
Inspected the prepared description, commits, manifest, diff, and targeted ranges in
Export.cppandGuestHttp2Transport.cpp. The included changed files areExport.cpp,Transport.cpp,Transport.hpp,include/Http2.hpp,GuestHttp2.cpp,GuestHttp2Transport.cpp, anddocs/dev/debt/libSceHttp2.md.Not verified
The full text of changed files was not read; only selected ranges from
Export.cppandGuestHttp2Transport.cppwere inspected. No files were listed as excluded in the prepared review-folder listing. The build and tests, runtime behavior outside the inspected paths, and console behavior were not independently verified.To get this to a good state
Nothing is required. Optional: run the reported Release tests and complete review of the changed files before treating this as a formal approval.
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.