feat(net): implement synchronous resolver abort state #2281
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2281"
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 joelfernandes23 on 2026-10-09T14:29:41Z.
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.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T14:33:44Z.
Two follow-ups from the exact diff/checks:
AI-assistedtemplate question. Please addAI-assisted: yesornoand rerun it.State::Abortclearsactiveimmediately, while the documented limitation says the host DNS call continues until completion. A newRuncan therefore begin on the same resolver while the canceled host lookup is still running;CheckOldCompletionWhileReusedLookupRunsexplicitly permits this. That conflicts with the PR description that a second simultaneous lookup returns resolverEBUSY. Please keep the resolver busy until the old host call returns, or cite evidence that the console allows reuse during an in-flight canceled synchronous lookup and make the stated contract/tests match.Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-09T14:34:54Z.
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.
main)docs/dev/TechnicalDebt.mdL367docs/dev/TechnicalDebt.mdL367docs/dev/TechnicalDebt.mdL367core/libs/prx/libSceNet/CMakeLists.txtL11-12core/libs/tests/GuestSceNet.cppL83docs/dev/TechnicalDebt.mdL59Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-09T20:11:20Z.
Closing: no title is shown calling
sceNetResolverAborton main, and library functions go in when one does. Please reopen with the title ID and the log line where it stops if you find one.Pull request closed