Repository navigation
feat(net): implement synchronous resolver abort state - #2281
Closed
joelfernandes23 wants to merge 2 commits into
Closed
joelfernandes23 wants to merge 2 commits into
joelfernandes23 wants to merge 2 commits into
Conversation
Contributor
|
Two follow-ups from the exact diff/checks:
|
This was referenced Oct 9, 2026
|
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.
|
This was referenced Oct 9, 2026
Collaborator
|
Closing: no title is shown calling |
9 tasks done
12 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
sceNetResolverAbortcurrently throws. Give it the(resolver ID, flags)signature and implement abort state for the existing synchronous resolvers. An idle abort can preserve one cancellation independently for the next NTOA or ATON lookup. An active abort records EINTR and prevents that lookup from publishing its output or clearing its interrupted error state.Resolver destruction also suppresses late output. Host lookups use temporary output storage, and completion checks cancellation under the same lock that protects result delivery. A second simultaneous lookup on the same resolver returns resolver EBUSY, including after abort while the cancelled host call is still running. Reuse becomes available only once that call completes. Unknown abort bits and unsupported nonzero start flags throw.
Limitation: this does not interrupt host
getaddrinfoorgetnameinfo. The cancelled synchronous caller returns only after the host call finishes. Timeout/retry remain unimplemented; no asynchronous resolver or epoll support is added.The signature, preservation bits, active-abort status and busy code follow shadPS4 net.cpp, net_resolver.cpp, and its net types/error definitions. These are PS4 reimplementation references, not PS5 measurements. The in-flight-destroy EBADF return and remaining uncertainties are recorded in TechnicalDebt.
Checked open PRs for resolver work and the exact export before starting. #2195 implements
sceNetResolverStartNtoaMultipleRecords, which this change leaves unimplemented; both branches touch the existing network test and export file, so they may need textual reconciliation. No dependency on that PR.Tested
Windows 11 Pro 10.0.26200, Ryzen 7 7700X, RX 7900 XT, AMD driver 32.0.31041.1004. WinLibs GCC 15.2.0 UCRT/POSIX/SEH r7, Release, BUILD_TESTING=ON, SPIRV-Tools OFF. Main
d70b89989473ba1f6ae13e44e079e67f1f8a44b0; local implementation commitb762bcb0b2d40577552c14b78f622467682f20ce.guest_sce_netchecks the actual exports: invalid/destroyed IDs, idle abort, independent one-shot preservation, unchanged output on interruption, forward/reverse resolution, multi-record preservation, errno/error state, and rejected flags.sceNetResolverAbort not implemented), then passes with the implementation.net_resolver_stateuses controlled blocking work to verify active forward/reverse cancellation, resolver busy state, destruction, cancellation taking precedence over a late host error, rejected flags during a lookup, exception cleanup, busy rejection of both lookup kinds until cancelled host work finishes, and successful reuse after completion. These tests exercise the state implementation used by the exports without depending on DNS latency.guest_video_out_wqhd_detection_no_vulkan.Not tested on Linux, PS5 hardware or a title. Prompt host DNS cancellation is not claimed.
Checklist
Based on main; no duplicate open PR for this export found
One topic per PR
No code comments added
Unsupported paths throw; no silent stubs added
Investigation notes and logs remain outside the repository
No new third-party code
Generic behavior, not specific to one title
Depends on: none
AI-assisted: yes
The reviewed busy-state regression fails before the follow-up with
aborted host lookup allowed Ntoa reuse before completion; it passes after retaining the active operation until host completion. Both lookup directions and repeated aborts are covered.