Skip to content

fix(http2): allow completion waits without an event queue - #3925

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
eliasbruno124-dev:fix/http2-direct-wait
Oct 14, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
eliasbruno124-dev:fix/http2-direct-wait

Conversation

@eliasbruno124-dev

@eliasbruno124-dev eliasbruno124-dev commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

What

TLOU Part II Remastered (PPSA15508, 01.002.000) calls sceHttp2SendRequestAsync with null kqueue and extra options, then collects the result through sceHttp2WaitAsync. Rejecting the absent queue stops that sequence.

Queue the existing offline completion before returning when no event queue is supplied. Request-ID validation from #3535 still runs first; a supplied queue still receives its notification. Extra options and failed event delivery retain their existing failure paths. This does not enable networking or report a successful network request.

The existing asynchronous-request debt entry is updated once in docs/dev/debt/libSceHttp2.md. Console timing, error precedence and the completion's event_type remain unmeasured.

Tested

Windows 11 x64, WinLibs GCC 15.2.0, Release:

  • Rebased onto 0aa4cb1c as 28bcd6be5. Full incremental build, libs, guest_http2, guest_http and guest_memory_pool_stats pass, with a 30-second per-test limit.
  • The direct-wait regression fails at sceHttp2SendRequestAsync not implemented with the exact main Export.cpp and passes after restoring the correction. Baseline and candidate HTTP2 source/test files are unchanged by the final rebase.
  • Cases cover direct waiting, unknown/wrong-kind/deleted IDs, independent requests, multiple completions and deletion cleanup, alongside the existing event-queue cases.
  • Conventions, including this PR title/body, and git diff --check pass. Linux was not tested.

The October 13 paired title run is recorded in Game bring-up #5468: main dacd7852, #3897 at 0a91eb31, and #3925 at 35cf2fd09, with the current relinker from that base. Only the HTTP2 library differed between runs. Baseline aborted at send; the candidate returned 0 from send and wait, delivered the existing offline completion 0x80436063, then stopped at a null read at game.exe+0x1c60f2. #3965 addresses that later stack issue and was not included.

Resolved VideoOut open/flip breakpoints recorded zero calls through termination: the title still stops before the first frame. The separate generated layout retained resource names but is not proof of direct original-folder launching. No menu, gameplay or frame-time result is claimed. The later rebase changes NGS2/PosixForWebKit, not HTTP2; the title report remains pinned to its actual tested runtime.

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; no silent stubs added
  • No notes, investigation files or images added to the repository
  • New third-party code is a submodule built from source (none added)
  • Generic behaviour, not specific to one title
  • Depends on: fix(ssl): retain loaded certificate authorities #3897 for the title-validation path; no code dependency
  • Unblocks: PPSA15508 The Last of Us Part II Remastered (PPSA15508) #5468 (the HTTP2 startup stop; not full playability)
  • GPUs tested: n/a (HTTP2 library correction)
  • AI-assisted: yes

@oneandonlydean

Copy link
Copy Markdown
Collaborator

Conflicts with main in core/libs/prx/libSceHttp2/Export.cpp and docs/dev/TechnicalDebt.md after #3535; please rebase.

@adriadam10 adriadam10 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This conflicts with main in core/libs/prx/libSceHttp2/Export.cpp and docs/dev/TechnicalDebt.md after #3535 (merged), and "Allow edits from maintainers" is off, so we can't rebase it for you.

  • Please rebase onto current main. In CompleteAsync, #3535 changed the surrounding code: re-check that the null-kqueue early return still happens after the completion is queued and that the id validation from #3535 still runs first.
  • Merge the libSceHttp2 asynchronous requests entry in docs/dev/TechnicalDebt.md with main's current text instead of adding a second line for the same entry.
  • Re-run guest_http2 after the rebase; the new direct-wait case should still fail without the Export.cpp change.

Happy to review again once it is rebased.

@eliasbruno124-dev

Copy link
Copy Markdown
Contributor Author

Rebased in 35cf2fd onto dacd785. Request-ID validation from #3535 runs before completion queuing, and the null-kqueue return follows the enqueue. The debt resolver updates the existing entry once in docs/dev/debt/libSceHttp2.md.

The full Windows Release build and guest_http2, guest_http and guest_memory_pool_stats pass; final test times are 0.09 s, 0.36 s and 0.09 s. Conventions and diff checks pass. The new direct-wait case fails at sceHttp2SendRequestAsync not implemented with the baseline Export.cpp and passes after restoring the correction. The final rebase changed neither that baseline nor the correction/test sources. Linux was not tested.

Maintainer edits remain disabled at the fork owner's request; I will keep the branch updated. The original-title comparison remains the dated October 11 evidence in the description, not a new gameplay result.

Prepared with AI assistance.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 13, 2026
@milescoviello

Copy link
Copy Markdown
Contributor

A title this unblocks: Crimson Desert (PPSA25286). Ubuntu 24.04, GCC 13.3, Release, RTX 4070 Ti, main a0f5916 with #5464 (its earlier sceKernelStat stop), relinked with --to-intel.

  • Without this PR it stops about a second after start:
    [libc] unhandled exception 'St13runtime_error' thrown from 0x...
      what():  sceHttp2SendRequestAsync not implemented
    
  • With this PR merged on top (35cf2fd, clean merge) it gets past that call and runs for 12 s. It then stops on a separate shader recompile error (GetImageResource dword 0 is not a valid runtime value).

AI-assisted: yes

@oneandonlydean oneandonlydean self-assigned this Oct 14, 2026
@oneandonlydean
oneandonlydean dismissed adriadam10’s stale review October 14, 2026 05:19

Met on 28bcd6b: every point of this review is addressed; full build green on this head.

@oneandonlydean
oneandonlydean merged commit c9ee728 into boykopovar:main Oct 14, 2026
8 of 9 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.

4 participants