test(net): guest_sce_net exceeds its timeout on slow host DNS #9609

Closed
opened 2026-10-22 04:15:45 +00:00 by UnhealthyKraken · 2 comments
UnhealthyKraken commented 2026-10-22 04:15:45 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by UnhealthyKraken on 2026-10-22T04:15:45Z.


On clean upstream d9c99c9ba4dbcbb0a724bad5064e7cb9b1e5f9ef, the Windows guest_sce_net test exceeds its 20-second CTest limit because its resolver failure checks perform real host DNS lookups. The unchanged executable completes successfully when run directly with a bounded 90-second diagnostic allowance: exit 0 after 36.766 seconds. This does not establish a deadlock or a PS5 resolver contract violation.

Reproduction: Windows x86-64, GCC 15.2 Release, BUILD_TESTING=ON; build libs, patched_libraries_tests and guest_sce_net_tests, then run:

ctest --test-dir build -R "^(patched_libraries|guest_sce_net)$" --output-on-failure

The patched-library loader passes all 360 libraries. guest_sce_net times out at 20.02 seconds both in a restricted environment and with normal Windows permissions (20.12 seconds total CTest duration in the latter). A direct run of the same executable with the same unpatched DLL directory on PATH passes; all four expected forward-resolution failure messages are printed.

An independent native Winsock probe using the same getaddrinfo(name, nullptr, hints, &results) form measured:

Name Family Winsock result Seconds
localhost AF_INET 0 0.006623
localhost AF_INET6 0 0.000437
guest-sce-net.invalid. AF_INET 11001 11.139735
guest-sce-net.invalid. AF_INET6 11001 11.140933
guest-sce-net.invalid AF_INET 11001 11.158273
guest-sce-net.invalid AF_INET6 11001 11.148990

The measurements are from separate runs, so these timings should not be added to reconstruct the test duration. They show that even an absolute invalid name can take over 11 seconds in the host resolver on this network. No DNS settings, hosts file, game environment or production code was changed.

Relevant source: GuestSceNet.cpp:1782 and :1824 use the absolute name; :1836 still uses the relative guest-sce-net.invalid. lookup_host in libSceNet/Export.cpp:2040 delegates to synchronous host getaddrinfo. The resolver wrappers ignore timeout/retry; existing technical debt records this limitation for the IPv6 call and synchronous resolver abort behavior.

Prior work: merged #4406 made an earlier failure check absolute to avoid host search-domain wildcard answers and explicitly called out #3728 as needing the same change. That search-domain issue is separate from the observed latency of absolute lookups. Open #9506 changes configured DNS-server reporting, not this test's host getaddrinfo dependency. Current all-state issue/PR title/body searches and relevant diffs did not identify a dedicated fix for the timeout; that search is not proof that no overlapping work exists.

The test needs bounded, deterministic failure-path coverage that preserves output-sentinel, resolver-error and abort-state assertions without relying on external DNS latency. Simply raising the timeout conflicts with the contribution rule that tests finish within 30 seconds. Adding the missing trailing dot would address search-domain dependence but would not by itself establish bounded execution. A resolver test seam or equivalent controlled native boundary needs design/review; no production workaround or fabricated resolver result is proposed here.

AI-assisted: yes. Measurements were run locally; no console firmware behavior was measured, and no firmware files or proprietary captures are attached.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5972945116 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/9609). Originally posted by [UnhealthyKraken](https://github.com/UnhealthyKraken) on 2026-10-22T04:15:45Z. --- On clean upstream `d9c99c9ba4dbcbb0a724bad5064e7cb9b1e5f9ef`, the Windows `guest_sce_net` test exceeds its 20-second CTest limit because its resolver failure checks perform real host DNS lookups. The unchanged executable completes successfully when run directly with a bounded 90-second diagnostic allowance: exit 0 after 36.766 seconds. This does not establish a deadlock or a PS5 resolver contract violation. Reproduction: Windows x86-64, GCC 15.2 Release, `BUILD_TESTING=ON`; build `libs`, `patched_libraries_tests` and `guest_sce_net_tests`, then run: ``` ctest --test-dir build -R "^(patched_libraries|guest_sce_net)$" --output-on-failure ``` The patched-library loader passes all 360 libraries. `guest_sce_net` times out at 20.02 seconds both in a restricted environment and with normal Windows permissions (20.12 seconds total CTest duration in the latter). A direct run of the same executable with the same unpatched DLL directory on PATH passes; all four expected forward-resolution failure messages are printed. An independent native Winsock probe using the same `getaddrinfo(name, nullptr, hints, &results)` form measured: | Name | Family | Winsock result | Seconds | | --- | --- | --- | --- | | localhost | AF_INET | 0 | 0.006623 | | localhost | AF_INET6 | 0 | 0.000437 | | guest-sce-net.invalid. | AF_INET | 11001 | 11.139735 | | guest-sce-net.invalid. | AF_INET6 | 11001 | 11.140933 | | guest-sce-net.invalid | AF_INET | 11001 | 11.158273 | | guest-sce-net.invalid | AF_INET6 | 11001 | 11.148990 | The measurements are from separate runs, so these timings should not be added to reconstruct the test duration. They show that even an absolute invalid name can take over 11 seconds in the host resolver on this network. No DNS settings, hosts file, game environment or production code was changed. Relevant source: `GuestSceNet.cpp:1782` and `:1824` use the absolute name; `:1836` still uses the relative `guest-sce-net.invalid`. `lookup_host` in `libSceNet/Export.cpp:2040` delegates to synchronous host `getaddrinfo`. The resolver wrappers ignore timeout/retry; existing technical debt records this limitation for the IPv6 call and synchronous resolver abort behavior. Prior work: merged #4406 made an earlier failure check absolute to avoid host search-domain wildcard answers and explicitly called out #3728 as needing the same change. That search-domain issue is separate from the observed latency of absolute lookups. Open #9506 changes configured DNS-server reporting, not this test's host `getaddrinfo` dependency. Current all-state issue/PR title/body searches and relevant diffs did not identify a dedicated fix for the timeout; that search is not proof that no overlapping work exists. The test needs bounded, deterministic failure-path coverage that preserves output-sentinel, resolver-error and abort-state assertions without relying on external DNS latency. Simply raising the timeout conflicts with the contribution rule that tests finish within 30 seconds. Adding the missing trailing dot would address search-domain dependence but would not by itself establish bounded execution. A resolver test seam or equivalent controlled native boundary needs design/review; no production workaround or fabricated resolver result is proposed here. AI-assisted: yes. Measurements were run locally; no console firmware behavior was measured, and no firmware files or proprietary captures are attached.
MarcZX10 commented 2026-10-22 13:16:53 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T13:16:53Z.


I checked current upstream main 3ca07d086d5f44fbe3c00370e7f03953ab46ca1b: guest_sce_net still has a 20-second CTest timeout, its failure cases call the absolute .invalid. host name, and lookup_host still delegates synchronously to host getaddrinfo. The report therefore still applies to current source, not only the older d9c99c9 snapshot. #9506 is about configured DNS-server reporting and does not alter this path. A deterministic resolver boundary/test seam remains the right design question; simply raising the test timeout would violate the repository’s 30-second test budget.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6341712162 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/9609#issuecomment-6341712162). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T13:16:53Z. --- I checked current upstream main `3ca07d086d5f44fbe3c00370e7f03953ab46ca1b`: `guest_sce_net` still has a 20-second CTest timeout, its failure cases call the absolute `.invalid.` host name, and `lookup_host` still delegates synchronously to host `getaddrinfo`. The report therefore still applies to current source, not only the older `d9c99c9` snapshot. #9506 is about configured DNS-server reporting and does not alter this path. A deterministic resolver boundary/test seam remains the right design question; simply raising the test timeout would violate the repository’s 30-second test budget.
UnhealthyKraken commented 2026-10-22 14:20:24 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by UnhealthyKraken on 2026-10-22T14:20:24Z.


That source check is consistent with the original Windows reproduction: the delay is in synchronous host resolution, and an absolute .invalid. name does not provide a deterministic execution time. I am keeping this issue open for a resolver boundary/test seam; #9506 does not resolve it. I have not raised the timeout or counted the timing-out CTest case as passing. The original direct executable result and CTest timeout remain separate evidence.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6343064269 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/9609#issuecomment-6343064269). Originally posted by [UnhealthyKraken](https://github.com/UnhealthyKraken) on 2026-10-22T14:20:24Z. --- That source check is consistent with the original Windows reproduction: the delay is in synchronous host resolution, and an absolute `.invalid.` name does not provide a deterministic execution time. I am keeping this issue open for a resolver boundary/test seam; #9506 does not resolve it. I have not raised the timeout or counted the timing-out CTest case as passing. The original direct executable result and CTest timeout remain separate evidence.
Sign in to join this conversation.
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#9609
No description provided.