Skip to content

feat(libSceHttp2): create WebSocket requests and answer them as a PS5 does before they connect - #11470

Merged
oneandonlydean merged 11 commits into
boykopovar:mainfrom
frankea:feat/http2-websocket-requests
Nov 6, 2026
Merged

oneandonlydean merged 11 commits into
boykopovar:mainfrom
frankea:feat/http2-websocket-requests

Conversation

@frankea

@frankea frankea commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

What

Onimusha (PPSA27836) imports sceHttp2WebSocketCreateRequest, sceHttp2WebSocketSetPingInterval, sceHttp2WebSocketSetPingTimeout, sceHttp2WebSocketSendTextMessageAsync, sceHttp2WebSocketSendDataMessageAsync and sceHttp2WebSocketCloseAsync, and all six threw. They now answer as a PS5 does for a WebSocket request that has not connected, the only state this offline library has:

  • sceHttp2WebSocketCreateRequest checks its arguments, zeroes the receive buffer, checks the template and the URL, and returns a request id from the same registry as sceHttp2CreateRequestWithURL, so sceHttp2DeleteRequest and template deletion handle it. Like that function on main, the request takes the template's SSL context, capacity, version and settings, with method GET and the URL. The URL goes through sceHttpUriParse, so libSceHttp2 now links libSceHttp; the scheme must be ws or wss.
  • sceHttp2WebSocketSetPingInterval and sceHttp2WebSocketSetPingTimeout check their values and drop them (listed under Silent stubs).
  • Text and data sends and sceHttp2WebSocketCloseAsync return 0x817B1065 (not connected) for a WebSocket request and 0x817B1100 for any other id. Before the id is looked up, a set option, a null text or data, and a close reason without a status return 0x817B11FE.
  • sceHttp2SendRequestAsync throws for every valid request on main (its "asynchronous requests" debt entry), WebSocket requests included. On the PS5 the handshake fails offline like any other request, but the library also calls the request's error callback with the request id, from its own thread (measured below); the WebSocket debt entry records that.

Measurement: PS5 on firmware 13.40, inside Gran Turismo 7 (PPSA01317), on 2026-10-26. A payload attached to the game with ptrace, created its own libnet pool, SSL context, Http2 context and template, called the game's libSceHttp2 exports, and deleted everything afterwards. Connections went to a closed port on a LAN host and to an unresolvable .invalid name.

sceHttp2WebSocketCreateRequest
  null text callback, null error callback, null buffer, size 0, option set  -> 0x817b11fe, buffer untouched
  unknown template                                                          -> 0x817b1100, buffer zeroed
  null URL                                                                  -> 0x80433060, buffer zeroed
  "http://host:9/probe", ""                                                 -> 0x817b1061
  "ws:/bad", "ws://host:9/probe", "wss://host:9/probe", "ws://x.invalid/"   -> request id (0x6000000n)
sceHttp2WebSocketSetPingInterval   0 -> 0; 999999 -> 0x817b11fe; 1000000, 0xffffffff -> 0
sceHttp2WebSocketSetPingTimeout    0, 999999 -> 0x817b11fe; 1000000, 0xffffffff -> 0
                                   both: id 0x7777 or a plain request -> 0x817b1100
sceHttp2WebSocketSendTextMessageAsync  before connecting -> 0x817b1065; option set -> 0x817b11fe; id 0x7777 or a plain request -> 0x817b1100
sceHttp2WebSocketSendDataMessageAsync  before connecting -> 0x817b1065
sceHttp2WebSocketCloseAsync            (1000, "bye") or (NULL, NULL) before connecting -> 0x817b1065; (NULL, "bye") -> 0x817b11fe; option set -> 0x817b11fe
sceHttp2SendRequestAsync on a WebSocket request -> 0, again while pending -> 0x817b1021
  sceHttp2WaitAsync completion: 0x8041013d (refused) or 0x804101e6 (unresolvable host); sends and closes then return that code
  error callback: called with the request id in both cases

Second run on 2026-10-30, same console and harness, Gran Turismo 7 01.700.000: the three calls went to ids 0x7777 and -1, a plain request, and a WebSocket request that had not connected (the payload created both requests and deleted them afterwards). Each call ran three times on each id. All 144 calls returned the values below, and none returned the stack check's 0x817b1076.

sceHttp2WebSocketSendTextMessageAsync  (NULL, 0, NULL, NULL), (NULL, 0xff, &asyncOption, NULL), ("hi", 0, NULL, &option)                                    -> 0x817b11fe
sceHttp2WebSocketSendDataMessageAsync  (NULL, 2, 0, NULL, NULL), (NULL, 0, 0, NULL, NULL), (NULL, -1, 0xff, &asyncOption, NULL), ("hi", 2, 0, NULL, &option)  -> 0x817b11fe
sceHttp2WebSocketCloseAsync            (NULL, "bye", 0, NULL, NULL), (&status, NULL, 0, NULL, &option)                                                      -> 0x817b11fe
all three, valid arguments             0x7777, -1 or a plain request -> 0x817b1100; the WebSocket request -> 0x817b1065

The callback check used libc srand as the error callback: after the wait, the game's next rand() matched the first rand() after srand(request id) and not the one after the seed set before the call.

Read from libSceHttp2.sprx (13.40, decrypted from the game's process; not shared) and not measured: null data and close callbacks are refused like the other two; the template is checked before the URL and a ping value before the request id; the sends do not check their flags, data size or async option before the connection check; the scheme comparison ignores case. The debt entry lists all but the first. The module tests a null text or data in the same branch as the option check (text 0x27e80, data 0x281e0, lookup 0x4e90), so the order between those two cannot be observed. BunnyFl's read and native run of the 13.42 module found the same null text/data order that the second run measured.

Tested

Windows 11 (build 26200), MinGW GCC (WinLibs 15.2) Release build with BUILD_TESTING=ON, each test run three times (ctest --repeat until-fail:3).

  • Head 324c6dd only changes the WebSocket debt entry, which now lists the null text/data order as measured. The code is that of da8fbc6.
  • Null text or data before the request id (head da8fbc6, main 9f748f4 merged, no conflicts): the 13 ctest entries of the libSceHttp2, libSceHttp and libSceHttpCache test executables (ctest -R ^guest_http) pass 13/13, each run three times, and so does main 9f748f4. Control, this head with the two send functions' old checks: guest_http2 aborts on a failed Require, and the other 12 pass. Control, main 9f748f4 with only this PR's GuestHttp2.cpp: guest_http2 aborts with sceHttp2WebSocketCreateRequest not implemented, and the other 12 pass.
  • Refreshed onto main bb04a4f (head c1b635f). The merge takes main's transport, request fields and asynchronous-request throws. It drops this PR's checks that sceHttp2SendRequestAsync throws on a WebSocket request and completes on a plain one, since that is a valid path that is not implemented. guest_http2_teardown_tests, which builds Export.cpp itself, now links libSceHttp for the URL parse. The 13 ctest entries of the libSceHttp2 and libSceHttp test executables pass 13/13, each run three times, and so does main bb04a4f.
  • Refreshed onto main ca6e29e (head 7231c2a; no conflicts): the five ctest entries below pass 5/5, and so does main ca6e29e.
  • guest_http2_tests gains a WebSocket section: every argument check, with the receive buffer untouched or zeroed as on the console; bogus template and null URL; http and empty URLs; ws:/bad, wss and upper-case WS accepted; both ping ranges; ids 0, -1, 0x7777, a plain request, the template and the context; the value checked before the id; a null text or data refused before the id, for every one of those ids and for a WebSocket request that has not connected; sends and closes before connecting; deletion directly and through its template. One existing line, which expected sceHttp2WebSocketSetPingInterval(0, 1000000) to throw, now checks that a plain POST request gets 0x817B1100.
  • The five ctest entries that load libSceHttp2 or libSceHttp (guest_http2, guest_http, guest_http_response_header, guest_http_options, guest_memory_pool_stats):
    • This PR (939769ae4 on main bf77a9e; the pushed commit differs from it only in the debt text): 5/5.
    • Control: main bf77a9e with only this PR's GuestHttp2.cpp: guest_http2 fails (sceHttp2WebSocketCreateRequest not implemented), the other four pass.
    • main bf77a9e: 5/5.
  • Not run on Linux. tools/check_conventions.py --base origin/main passes.

Overlap

No open PR implements these six functions. #9598, #10167, #10534, #10536 and #11145, which changed libSceHttp2 next to this branch, are in main now, and this branch merges 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: none
  • Fixes: none
  • Unblocks: none known (PPSA27836 imports the six functions; not run)
  • GPUs tested: n/a (no GPU code)
  • AI-assisted: yes (Claude Code)

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Progress report (492ed5c → 71749a8)

📈 System libraries: 29.45% (+0.01%, +6 implemented functions)

✅ 6 implemented
Library Name
libSceHttp2 sceHttp2WebSocketCloseAsync
libSceHttp2 sceHttp2WebSocketCreateRequest
libSceHttp2 sceHttp2WebSocketSendDataMessageAsync
libSceHttp2 sceHttp2WebSocketSendTextMessageAsync
libSceHttp2 sceHttp2WebSocketSetPingInterval
libSceHttp2 sceHttp2WebSocketSetPingTimeout

Changed libraries (implemented exports)

Library Before After Change
libSceHttp2 18/71 (25.35%) 24/71 (33.80%) +8.45%

@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.

I reviewed the WebSocket request and pre-connect behavior on exact head 3d7e2d2dcb43d0d1dd4a9a6833ad6a31b36dec2c. I found no concrete implementation defect in the request-handle ownership, URI scheme check, ping range validation, or pre-connect return paths. The PR reports a focused Windows suite repeated three times and a control run that fails only the new WebSocket case before the change. I did not independently run the Windows suite; hosted Linux/Windows product jobs are skipped.

Before approval, please sync this branch to current main (b0f1183ca12b) as required by CONTRIBUTING.md. The current branch is based on bf77a9e9cba4; the intervening commits do not touch the changed HTTP2 implementation/test/debt paths, and the merge-tree preview is clean. Current-main conventions and git diff --check pass.

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 11630 core/libs/prx/libSceHttp2/Export.cpp L9-10, L22-23, L37
PR 15944 core/libs/prx/libSceHttp2/Export.cpp L23
PR 15996 core/libs/prx/libSceHttp2/Export.cpp L23
PR 16231 core/libs/prx/libSceHttp2/Export.cpp L9-10, L22-23, L37

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 13486 core/libs/prx/libSceHttp2/CMakeLists.txt
core/libs/prx/libSceHttp2/Export.cpp
core/libs/tests/GuestHttp2.cpp
docs/dev/debt/libSceHttp2.md
PR 14212 docs/dev/debt/libSceHttp2.md
PR 16292 core/libs/prx/libSceHttp2/Export.cpp
core/libs/tests/GuestHttp2.cpp
docs/dev/debt/libSceHttp2.md

@frankea

frankea commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

@MarcZX10 Merged main ca6e29e (head 7231c2a, no conflicts). The five ctest entries that load libSceHttp2 or libSceHttp pass 5/5 three times on the merge and on main ca6e29e: the first bullet under Tested.

AI-assisted: yes (Claude Code)

@oneandonlydean

Copy link
Copy Markdown
Collaborator

Thanks, the pre-connect errors, argument order/zeroing, scheme parsing and deletion coverage look good.

One change, please: remove the new assertion in GuestHttp2.cpp that sceHttp2SendRequestAsync on a valid WebSocket request must throw. That's a valid but unimplemented handshake, and tests shouldn't pin unsupported paths as throws. Keep the production handshake limit and its debt entry; no handshake implementation is being asked for.

The branch also conflicts with main now (libSceHttp2 CMake, Export.cpp, GuestHttp2.cpp and the debt file), so it will need a rebase.

@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.

Re-review — changes requested

Two items remain before this PR is ready.

Findings

[P2] Do not pin a valid, unimplemented handshake to a throw

In GuestHttp2.cpp, the WebSocket request test expects sceHttp2SendRequestAsync(request, nullptr, 0, nullptr, &tag) to throw. This is a valid WebSocket request exercising the unimplemented handshake path. The production limitation and debt entry can remain, but the test should not require an unsupported path to throw. Please remove that assertion, as the reviewer requested, while retaining the supported pre-connect behavior tests.

[P2] Integrate current main and rerun the focused tests

The exact head 7231c2a2d66b95fda621ee713c3f4e661182213f is based on ca6e29e8363e3d10e9e6482bede3d19d6b9f0e6e. Current main is 4c7d275bef89d309313d16bc2bc05d37a1b50be2; the merge preview conflicts in libSceHttp2/CMakeLists.txt, Export.cpp, GuestHttp2.cpp, and docs/dev/debt/libSceHttp2.md. Please integrate current main, resolve those conflicts, and rerun the five focused CTest entries on the updated base and change.

Checks

  • git diff --check: clean.
  • tools/check_conventions.py: passed against current main.
  • Hosted product Linux/Windows jobs are skipped; the prior author-reported 5/5 runs are on the older ca6e29e merge.

I did not run a local build or CTest.

…requests

# Conflicts:
#	core/libs/prx/libSceHttp2/CMakeLists.txt
#	core/libs/prx/libSceHttp2/Export.cpp
#	core/libs/tests/GuestHttp2.cpp
#	docs/dev/debt/libSceHttp2.md
@frankea

frankea commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

@MarcZX10 @BunnyFl Thanks. Head da8fbc6 rejects a null text or data with 0x817B11FE before the request id is looked up, and guest_http2_tests pins that order.

Firmware 13.40: I read the same three functions in my own 13.40 libSceHttp2.sprx (decrypted from Gran Turismo 7's process; not shared). The module has the layout BunnyFl describes for 13.42. The wrappers call 0x27e80, 0x281e0 and 0x28610, and the request lookup is 0x4e90, which returns 0x817b1100 when the id is not in the request list. The text send tests option and text in one branch before the lookup (27e98: test %r8,%r8, 27eac: test %rsi,%rsi, 27ebc: mov $0x817b11fe,%eax, 27ec1: jne 0x27fde, then 27ecf: call 0x4e90). The data send does the same with option in r9 and data in rsi (281f8–28220, then 28232: call 0x4e90). CloseAsync checks option first (2863d), then a reason without a status (28646–28656), then calls the lookup (28675). After the lookup, the 13.40 checks run in the order BunnyFl gives: 0x817b1021, 0x817b1100 for a request that is not a WebSocket, 0x817b1080, the stored error, then 0x817b1065. Only after those does the module copy the async option, and the text send calls strlen (27f53: call 0x29fb0, the strlen import). Flags, data size and the async option are not checked before 0x817b1065. All of this comes from the disassembly and was not measured: my 2026-10-26 run inside the game never passed a null text or data, so BunnyFl's native run of the 13.42 module is the only run of that case.

Changes:

  • sceHttp2WebSocketSendTextMessageAsync and sceHttp2WebSocketSendDataMessageAsync return 0x817B11FE for a non-null option or a null text/data before the request id is looked up. sceHttp2WebSocketCloseAsync keeps its order (option, then a reason without a status, then the id). Flags, data size and the async option stay unchecked, as in the module, which also answers the earlier review's question about them.
  • guest_http2_tests sends four null-message calls: null text with flags 0, null text with flags 0xff and an async option, null data with size 2, and null data with size 0, flags 0xff and an async option. They go to ids 0, -1 and 0x7777, a plain request, the template, the context, a deleted WebSocket request, a WebSocket request whose template was deleted, and a WebSocket request that has not connected. All of them expect 0x817B11FE. With valid arguments, the same ids still get 0x817B1100, and the unconnected WebSocket request still gets 0x817B1065.
  • The WebSocket debt entry now lists, as read from the 13.40 module and not measured on a console: the null text/data check comes before the request id, and a send's flags, data size and async option are not checked before the connection check.
  • Merged main 9f748f4 (no conflicts).

Windows 11, MinGW GCC 15.2 Release, RTX 4090 box. The 13 ctest entries of the libSceHttp2, libSceHttp and libSceHttpCache test executables (ctest -R ^guest_http), each run three times:

  • This head da8fbc6: 13/13.
  • Control, this head with the two send functions' old checks: guest_http2 aborts on a failed Require (exit 0xc0000409), and the other 12 pass. Only the two send functions differ from this head.
  • Control, main 9f748f4 with only this PR's GuestHttp2.cpp: guest_http2 aborts with sceHttp2WebSocketCreateRequest not implemented, and the other 12 pass.
  • main 9f748f4: 13/13.

AI-assisted: yes (Claude Code)

@frankea

frankea commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

@MarcZX10 @BunnyFl Follow-up: I measured the null checks on my 13.40 PS5 today, inside Gran Turismo 7 (PPSA01317) with the in-game remote-call harness. The console rejects a null text or data before the request id, as this head does. My earlier reply only had the disassembly for this case.

Each call ran 3 times against four ids. 0x7777 and -1 are not ids. "Plain" is a non-WebSocket request and "WebSocket" a WebSocket request that never connected. The probe created both requests and deleted them afterwards, and it sent nothing to ids the game owns. 144 calls, all 3/3, no 0x817B1076:

Call 0x7777, -1, plain WebSocket, not connected
SendTextMessageAsync(id, NULL, 0, NULL, NULL) 0x817B11FE 0x817B11FE
SendTextMessageAsync(id, NULL, 0xff, &asyncOption, NULL) 0x817B11FE 0x817B11FE
SendTextMessageAsync(id, "hi", 0, NULL, &option) 0x817B11FE 0x817B11FE
SendDataMessageAsync(id, NULL, 2, 0, NULL, NULL) 0x817B11FE 0x817B11FE
SendDataMessageAsync(id, NULL, 0, 0, NULL, NULL) 0x817B11FE 0x817B11FE
SendDataMessageAsync(id, NULL, -1, 0xff, &asyncOption, NULL) 0x817B11FE 0x817B11FE
SendDataMessageAsync(id, "hi", 2, 0, NULL, &option) 0x817B11FE 0x817B11FE
CloseAsync(id, NULL, "bye", 0, NULL, NULL) 0x817B11FE 0x817B11FE
CloseAsync(id, &status, NULL, 0, NULL, &option) 0x817B11FE 0x817B11FE
control SendTextMessageAsync(id, "hi", 0, NULL, NULL) 0x817B1100 0x817B1065
control SendDataMessageAsync(id, "hi", 2, 0, NULL, NULL) 0x817B1100 0x817B1065
control CloseAsync(id, &status, "bye", 0, NULL, NULL) 0x817B1100 0x817B1065

Head da8fbc6 returns the same value for every row. Not measured: whether flags, data size or the async option are checked before 0x817B1065 when the message pointer is valid, since every control used flags 0, size 2 and no async option. That part is still from the disassembly only.

AI-assisted: yes (Claude Code)

@xXPBSXx

xXPBSXx commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

#14236 appends a sentence to the sceHttp2Init entry in docs/dev/debt/libSceHttp2.md, on the line right after the WebSocket entry that this pull request rewrites, so the two conflict as text although they do not touch each other's content. This one goes first: #14236 declares Depends on: #11470 and will be brought up to date after this one is merged. Nothing needs to change here.

AI-assisted (Claude Code).

@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.

Re-checked — new head, changes requested

The null text/data validation was added, but unsupported dataSize, flags, and async-option combinations still return ERROR_NOT_CONNECTED without evidence that firmware validates them that way.

What I ran

Reviewed head 324c6ddfe2e7439334de792f31110652e2f3bd2e against PR base 9f748f4d8e36ce3714f3b95f3386316e110a9b22; the merge preview against current main cf79276fee2f042feb6a7c71d0d6a27e9cfe2592 is clean. Environment: Debian Linux x86-64, Python 3.11.2; no local build or tests.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 11470
git diff --check 9f748f4d8e36ce3714f3b95f3386316e110a9b22...324c6ddfe2e7439334de792f31110652e2f3bd2e

Results

Check Result
Diff and conventions Passed.
Current-main merge preview Clean.
Hosted checks Eligibility, conventions, portability, labels, report and Windows passed; Linux and specialized product jobs were skipped.
Focused tests Author reports 13/13 HTTP/HTTP2 tests passing three times on Windows for the preceding code head; this latest head only updates the debt entry. I did not reproduce them locally.
Optional ABI/test-quality helpers The isolated PR snapshot lacks these scripts, so those optional checks could not run.

Findings

Blocking

Unmeasured validation before the pre-connect result. In sceHttp2WebSocketSendDataMessageAsync, dataSize, flags, and asyncOption are ignored; sceHttp2WebSocketSendTextMessageAsync ignores flags and asyncOption; sceHttp2WebSocketCloseAsync also ignores flags and asyncOption. For a live WebSocket handle, these calls return ERROR_NOT_CONNECTED even for combinations whose firmware validation order is not established in the report. The tests cover null message pointers, option, and selected status/reason cases, but do not pin these remaining inputs. Please add firmware/console evidence and tests for their precedence, or preserve the unverified input cases on the unimplemented/debt path.

Non-blocking

The declared #14236 ordering is documented; no source overlap issue was found on this head.

Sources

Not verified

I did not independently reproduce the firmware measurements or run a local build/CTest. Linux and specialized hosted jobs were skipped.

To get this to a good state

Establish and test the validation order for dataSize, flags, and async options, or leave those unmeasured combinations unimplemented with debt notes. I’ll rerun the same no-build checks and review the updated head.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 1, 2026
@B-Howell

B-Howell commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

I tested head 324c6ddfe2 on current main (29c7100427). It conflicts again in two places, and both conflicts are additive:

To test, I kept both sides of the test file and took main's sceHttp2Init entry. Export.cpp and CMakeLists.txt merged without conflicts.

Tests: ctest -R '^(guest_http.*|debt_split|conventions_debt_length|conventions_doc_links)$' --repeat until-fail:3. In the control arm, libSceHttp2/Export.cpp and libSceHttp2/CMakeLists.txt come from main and the tests are kept.

arm Windows 11, WinLibs GCC 15.2.0, Release (18 tests) Ubuntu 22.04 (WSL2), GCC 11.4, Release (17 tests; no guest_http2_dns_first)
main 18/18, x3 17/17, x3
main + this PR 18/18, x3 17/17, x3
control guest_http2 aborts (sceHttp2WebSocketCreateRequest not implemented); the other 17 pass guest_http2 aborts, same message; the other 16 pass

One thing for the rebase: after the merge, docs/dev/debt/libSceHttp2.md has two ping entries that contradict each other. One is this PR's Silent stubs line, which says the setters "check their values as a PS5 does and drop them". The other is main's WebSocket ping settings entry (from #9137), which says "The protected implementations remain unchanged", meaning they still throw. With this PR that second entry would be stale. Its signature facts (32-bit request id and microsecond values) could go into the WebSocket entry.

python tools/check_conventions.py --base 29c7100427 passes on the head.

Not tested: I have no new console evidence for the open review point (flags, data size and async option before 0x817B1065 with a valid message pointer).

AI-assisted: yes (Claude Code)

@oneandonlydean

Copy link
Copy Markdown
Collaborator

Hi frankea, 324c6ddfe2 conflicts with current main again, in two places. Both are additive:

B-Howell's run above, with both sides of the test file kept and main's sceHttp2Init entry taken, passes on Windows and Linux. The control fails as it should.

One thing to watch when you resolve the debt file: this PR deletes main's old "WebSocket ping settings" entry ("The protected implementations remain unchanged"), because your setters now check and drop their values. A keep-both resolution brings that entry back, and it would then contradict your Silent stubs line. Please keep the deletion, and move its signature facts (32-bit request ID, microsecond values) into your WebSocket entry if you want to keep them.

Could you rebase or merge main with that resolution? Nothing else from me on this head.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 5, 2026
@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ AMD GPU test: passed

PR head 304cec4 merged onto main 4639eff · tested 2026-11-05 08:48 UTC · 24 min

GPU AMD Radeon RX 6300 (RADV NAVI24), driver Mesa 25.2.8-0ubuntu0.24.04.4, Vulkan 1.4.318
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-42-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 1,169 passed · 5 failed (0 new, 4 also fail on main, 1 unstable on main) · 9 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 1,183 of 3,962 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (571 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s, ⚠️ public_headers 47.7 s, ⚠️ agc_driver_image_sample_unnormalized 30.3 s
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 9 of the last 10 main runs
Failing on main too (4, not counted against this PR)
agc_driver_image_table
agc_driver_native_depth_bda_clear
agc_driver_native_multisample_depth
agc_driver_submit_progress
Validation IDs already present on main (4 IDs in 488 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (488 tests): agc_driver_address_draw_space_reuse, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 480 more
VUID-vkCmdCopyImage-srcImage-01548 (4 tests): agc_driver_depth_clear_hle, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (4 tests): agc_driver_depth_clear_hle, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (2 tests): agc_driver_prepared_exports, agc_driver_srgb8_color_target
Skipped (9)
agc_driver_copied_writer_label_order: skipped, the device reports a minStorageBufferOffsetAlignment of 4, so the dispatch binds its record at +0x1004 in place and nothing is written back; the test needs an alignment above 4
agc_driver_float16_unused_nan_payloads: skipped, the device has no native f16 conversions with RTE rounding and kept f16 denormals
agc_driver_gcn_display_present: skipped, no display: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
agc_driver_linear_target_direct_write_completion: skipped, the device does not keep host imports write-watched, so no completion stamp over the target is tracked
agc_driver_ngg_vertex_wave_reduction: skipped, s3 describes a 32-lane wave only on 32-lane subgroups, and the device has 64 lanes
agc_driver_recorded_draw_staging: skipped, the device does not keep host imports write-watched, so the target is never resident
agc_driver_scattered_runs: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
Reproduce
git fetch origin 304cec4b81eee1bda63b2c6c5cff56504c3464ae 4639eff7f4c23325a916875a0e37f1e312fa18f4
git checkout 4639eff7f4c23325a916875a0e37f1e312fa18f4 && git merge --no-ff 304cec4b81eee1bda63b2c6c5cff56504c3464ae
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 12 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 16 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

…requests

# Conflicts:
#	core/libs/prx/libSceHttp2/Export.cpp
#	core/libs/tests/GuestHttp2.cpp
@frankea

frankea commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

@oneandonlydean thanks for merging main on 11/05 and for the closing-brace fix. main moved again, so 71749a8 merges main 7383be1 on top of your head (no conflicts this time); the debt file keeps your resolution, without main's old "WebSocket ping settings" entry. On an Apple M5 Max (x86-64 under Rosetta 2), the 21 ^guest_http ctest entries pass 3 times in a row.

@MarcZX10 on the flags, data size and async option: I have a probe ready that runs those inputs with a valid message on a WebSocket request that never connected, on 13.40 inside GT7 as before (non-zero flags, an async option, data sizes 0, 1, 0x7fffffff and -1, close with a NULL status and reason and with status 0, 999, 5000 and 0xffff). I'll post the results and adjust the code or the debt entry to them as soon as the console is back up.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 6, 2026
@oneandonlydean
oneandonlydean dismissed MarcZX10’s stale review November 6, 2026 19:26

Answered on the live head 71749a8. The debt entry in docs/dev/debt/libSceHttp2.md gives the evidence asked for: read from libSceHttp2.sprx (firmware 13.40), a send does not check its flags, data size or async option before the connection check, and on a PS5 (13.40, inside PPSA01317) text and data sends and sceHttp2WebSocketCloseAsync return 0x817B1065 before the handshake. Export.cpp:453-473 follows that: only option, a null text/data and a reason without a status return INVALID_VALUE, then INVALID_ID or NOT_CONNECTED. Requests never connect, so every path is an error before connect and the open question is only which error code an unusual flag combination gets; that is recorded on the debt path, as the review offered.

@oneandonlydean
oneandonlydean merged commit 7e1a981 into boykopovar:main Nov 6, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants