relinker: macOS loader tests time out under ctest -j because each new Mach-O file is assessed on its first launch #13208
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 Cool-Coder174 on 2026-10-30T06:23:20Z.
What happens
On macOS,
ctest -j 12on the relinker-only build fails a different set of native-execution tests on each run withsubprocess.TimeoutExpired; each of them passes when run alone. macOS assesses every new Mach-O file the first time it is executed or loaded, and the queued assessments push single runs past the tests' 10 s run timeouts.Title, test or build step
macos_trace_imports,macos_guest_weak_imports,macos_guest_weak_exports,macos_executable_exports(relinker-only build)AnyPS5 commit
main5ecef095band102c4f95a, nothing merged on topSystem
macOS 26.6.2 (25G83), Intel Core i9-9880H (8 cores), Apple clang 21.0.0, CMake 4.0.1, Ninja, Python 3.11.6. No third-party security software; Apple's
syspolicyd, XProtect andamfidonly.Steps to reproduce
Three runs on
5ecef095bfailed 2, 4 and 1 tests:macos_executable_exports,macos_guest_weak_exports,macos_guest_weak_imports,windows_fixed_base,select_tests_FixtureBuildTests,performance_compare. One of the runs overlapped a CMake configure.Log
log show --info --predicate 'subsystem == "com.apple.syspolicy.exec"'for the first run of a new file:What was checked
dlopenof a new dylib waits for the assessment: 0.5 to 0.75 s for an empty program, about 2 s for a converted module. Later runs of the same file take 0.01 s.codesign -s -).macos_trace_imports,macos_guest_weak_importsandmacos_guest_weak_exportscompile their shared libraries once and write a byte copy into every case, so each case is assessed again. Assessments per test run, counted from thenot exemptlines: 24, 13 and 8. With hard links instead of copies: 10, 10 and 7.macos_trace_importstakes 13 s alone and 54 to 55 s under-j 12, over the 30 s limit in CONTRIBUTING.md. With hard links: 6 s alone, 21 to 32 s under-j 12.-j 12; the third failedmacos_executable_exports(first run of its converted output over the 10 s run timeout) andperformance_compare(20 s limit under load, no new Mach-O file involved).not exempton macOS 26.6.2, also after relaunching it. The responsible process was confirmed withresponsibility_get_pid_responsible_for_pid.