fix(libSceHttp2): return DNS lookup errors #17570

Merged
lisn0 merged 3 commits from upstream-pr/17570 into main 2026-11-13 10:17:19 +00:00
lisn0 commented 2026-11-08 22:42:20 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by lisn0 on 2026-11-08T22:42:20Z.


What

Return 0x804101e6 when DNS lookup fails instead of throwing, including after the configured retries. Preserve the socket error mapping that returns 0x8041013d for a refused connection. Add a nonexistent-host transport regression and update the retry test.

A native PS5 HTTP probe on firmware 13.590.001 confirmed 0x804101E6 for NXDOMAIN and 0x8041013D for connection refusal, both as synchronous return values and as asynchronous completion results. The probe source and logs are in #17735. Async send and completion are implemented separately in #11630.

Tested

A contributor title test also reached the LEGO Batman: Legacy of the Dark Knight (PPSA16833) menu in a 600-second no-network run with this change and #11630. With #11630 alone, startup stopped at the DNS lookup error. See the report for the exact build and title prerequisites.

Linux x86-64, GCC 16.2.1, Release:

  • HTTP2 focused suite on the updated branch: 14 tests passed.

  • Before merging current main, the relinker-only build and its 812 tests passed. The full runtime build succeeded; full CTest reported three failures out of 4,580 tests.

  • In focused reruns, the earlier branch head and its upstream parent both passed guest_stream_close and avplayer_http_patched_modules, and both segfaulted in agc_driver_tessellation. The initial full run timed out in the first two tests; the cause was not established. The tessellation failure matches the RADV/Mesa version range described in #5444, but its stack was not captured in these runs.

  • The earlier branch head passed all 14 HTTP2 tests twice, including guest_http2_transport.

  • python3 tools/check_conventions.py --base upstream/main passed. The overlap tool could not compare shared files in #14212 and #16231; manual review found debt formatting and async completion work respectively, with no duplicate DNS mapping.

  • Linux x86-64 Release integration run: main da47ac971c plus this PR at 06457e01f1, #11630 at b17933dfd4, and #17735 at 6a366fb743. The combined validation commit passed all 14 focused HTTP/2 tests and three additional consecutive runs of guest_http2_transport. The transport regression checked that async completion carries the NXDOMAIN and refusal codes, and that a 100 ms overall timeout on a stalled loopback request produces 0x817B1068 within the test timing bounds.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5215855936 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/17570). Originally posted by [lisn0](https://github.com/lisn0) on 2026-11-08T22:42:20Z. --- ### What Return `0x804101e6` when DNS lookup fails instead of throwing, including after the configured retries. Preserve the socket error mapping that returns `0x8041013d` for a refused connection. Add a nonexistent-host transport regression and update the retry test. A [native PS5 HTTP probe](https://github.com/boykopovar/AnyPS5/pull/17570#issuecomment-6741390369) on firmware 13.590.001 confirmed `0x804101E6` for NXDOMAIN and `0x8041013D` for connection refusal, both as synchronous return values and as asynchronous completion results. The probe source and logs are in #17735. Async send and completion are implemented separately in #11630. ### 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. --> A [contributor title test](https://github.com/boykopovar/AnyPS5/pull/17570#issuecomment-6735564186) also reached the LEGO Batman: Legacy of the Dark Knight (PPSA16833) menu in a 600-second no-network run with this change and #11630. With #11630 alone, startup stopped at the DNS lookup error. See the report for the exact build and title prerequisites. Linux x86-64, GCC 16.2.1, Release: - HTTP2 focused suite on the updated branch: 14 tests passed. - Before merging current main, the relinker-only build and its 812 tests passed. The full runtime build succeeded; full CTest reported three failures out of 4,580 tests. - In focused reruns, the earlier branch head and its upstream parent both passed `guest_stream_close` and `avplayer_http_patched_modules`, and both segfaulted in `agc_driver_tessellation`. The initial full run timed out in the first two tests; the cause was not established. The tessellation failure matches the RADV/Mesa version range described in #5444, but its stack was not captured in these runs. - The earlier branch head passed all 14 HTTP2 tests twice, including `guest_http2_transport`. - `python3 tools/check_conventions.py --base upstream/main` passed. The overlap tool could not compare shared files in #14212 and #16231; manual review found debt formatting and async completion work respectively, with no duplicate DNS mapping. - Linux x86-64 Release integration run: main `da47ac971c` plus this PR at `06457e01f1`, #11630 at `b17933dfd4`, and #17735 at `6a366fb743`. The [combined validation commit](https://github.com/lisn0/AnyPS5/commit/b9989c5cb99bded35d09b7e4c953d9ae44044e35) passed all 14 focused HTTP/2 tests and three additional consecutive runs of `guest_http2_transport`. The transport regression checked that async completion carries the NXDOMAIN and refusal codes, and that a 100 ms overall timeout on a stalled loopback request produces `0x817B1068` within the test timing bounds. ### 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: none <!-- #PR, or none --> - [x] Fixes: none <!-- issue it closes as Fixes #N, or none --> - [x] Unblocks: none <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> - [x] GPUs tested: n/a <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> - [x] AI-assisted: yes <!-- yes / no -->
gabichuuuuu commented 2026-11-08 23:28:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by gabichuuuuu on 2026-11-08T23:28:05Z.

Review: COMMENTED


Windows run of head 709329ac6e, merged onto main 286b14d2f7 in one tree with 41 other small open PRs that touch different files. Setup: Windows 11, WinLibs GCC 15.2 r7 (x86_64-ucrt-posix-seh, the CI toolchain), Release, BUILD_TESTING=ON.

  • guest_http2_auth_status with --repeat until-fail:5: 5 / 5 pass.
  • guest_http2_dns_first with --repeat until-fail:5: 5 / 5 pass.
  • guest_http2_early_response with --repeat until-fail:5: 5 / 5 pass.
  • guest_http2_gzip_headers with --repeat until-fail:5: 5 / 5 pass.
  • guest_http2_gzip_members with --repeat until-fail:5: 5 / 5 pass.
  • guest_http2_http1 with --repeat until-fail:5: 5 / 5 pass.
  • guest_http2_http1_cookies with --repeat until-fail:5: 5 / 5 pass.
  • guest_http2_redirects with --repeat until-fail:5: 5 / 5 pass.
  • guest_http2_ssl_callbacks with --repeat until-fail:5: 5 / 5 pass.
  • guest_http2_system_roots with --repeat until-fail:5: 5 / 5 pass.
  • guest_http2_transport with --repeat until-fail:5: 5 / 5 pass.
  • Negative control, with main's Transport.cpp and this PR's test: 5 / 5 runs fail.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5820176281 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/17570#pullrequestreview-5820176281). Originally posted by [gabichuuuuu](https://github.com/gabichuuuuu) on 2026-11-08T23:28:05Z. **Review:** COMMENTED --- Windows run of head `709329ac6e`, merged onto `main` `286b14d2f7` in one tree with 41 other small open PRs that touch different files. Setup: Windows 11, WinLibs GCC 15.2 r7 (`x86_64-ucrt-posix-seh`, the CI toolchain), Release, `BUILD_TESTING=ON`. - `guest_http2_auth_status` with `--repeat until-fail:5`: 5 / 5 pass. - `guest_http2_dns_first` with `--repeat until-fail:5`: 5 / 5 pass. - `guest_http2_early_response` with `--repeat until-fail:5`: 5 / 5 pass. - `guest_http2_gzip_headers` with `--repeat until-fail:5`: 5 / 5 pass. - `guest_http2_gzip_members` with `--repeat until-fail:5`: 5 / 5 pass. - `guest_http2_http1` with `--repeat until-fail:5`: 5 / 5 pass. - `guest_http2_http1_cookies` with `--repeat until-fail:5`: 5 / 5 pass. - `guest_http2_redirects` with `--repeat until-fail:5`: 5 / 5 pass. - `guest_http2_ssl_callbacks` with `--repeat until-fail:5`: 5 / 5 pass. - `guest_http2_system_roots` with `--repeat until-fail:5`: 5 / 5 pass. - `guest_http2_transport` with `--repeat until-fail:5`: 5 / 5 pass. - **Negative control,** with `main`'s `Transport.cpp` and this PR's test: 5 / 5 runs fail.
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!17570
No description provided.