Repository navigation
Description
Tracking issue for three test failures surfaced once the NTS build was fixed
(commit a167a92 — before that, NTS jobs failed at build and never ran tests,
so these were latent). None are regressions from the spawn_thread shutdown
fix; all are pre-existing.
Run that exposed them: https://github.com/true-async/php-async/actions/runs/25852397574
1. cancel_during_io — getaddrinfo struct leak (NTS)
fuzzy-tests/_generated/cross_topic/cancel_during_io__00_cancel_a_coroutine_blocked_on_tcp_accept.phpt
fails on LINUX_X64_DEBUG_NTS with:
libuv_reactor.c(3010) : Freeing 0x... (288 bytes) ...
=== Total 1 memory leaks detected ===
This is the second half of #111. da62db4 fixed the leak of the libuv
addrinfo result buffer (event->result). The 288-byte block at
libuv_reactor.c:3010 is the pecalloc of the async_dns_addrinfo_t
event struct itself, which still leaks: in libuv_dns_getaddrinfo_dispose,
the !LIBUV_DNS_F_CALLBACK_DONE path sets LIBUV_DNS_F_DISPOSE_PENDING,
uv_cancels and returns without pefree. It relies on on_addrinfo_event
firing again to re-enter dispose and free the struct — but if the reactor is
torn down before that libuv callback fires, the struct leaks.
2. thread_pool/cancel — flake under tracing JIT (ZTS)
fuzzy-tests/_generated/thread_pool/cancel__00_submit_then_cancel_every_future_settles_cleanly.phpt
failed once on LINUX_X64_RELEASE_ZTS under the "Test Tracing JIT" step.
Passes 5/5 locally (ZTS debug + tracing JIT). Suspected flake; needs
repeated runs to characterise.
3. curl progress-callback exception (macOS)
tests/curl/035-progress_exception.phpt (and 056-multi_progress_exception.phpt)
fail on MACOS_ARM64_*_NTS with Fatal error: Uncaught RuntimeException: Progress callback error — the script dies before Done. Also failed on
macOS ZTS in the very first run, so it is macOS-specific and pre-existing.
An exception thrown from the CURLOPT_XFERINFOFUNCTION callback is not being
delivered to the awaiter on macOS.
Iteration workflow
.github/workflows/debug-bugfix.yml — manually-triggered (workflow_dispatch),
builds only the platform/build combos that reproduce each failure (Linux NTS
- ASAN, Linux ZTS + tracing JIT, macOS NTS) and runs just these four tests
with--repeat 5. Trigger with:
gh workflow run "Debug Bugfix (manual)" --repo true-async/php-async --ref main
Activity
ci: add manually-triggered Debug Bugfix workflow (#118)
EdmondDantes commentedon May 14, 2026
Confirmed pre-existing — not regressions. Commit
d1be46b(adds only thedebug-bugfix.ymlworkflow file, zero code changes — byte-identical codeto
a167a92) still fails CI oncurl/035-progress_exceptionand056-multi_progress_exceptionon macOS (NTS and ZTS). So #3 is adeterministic pre-existing macOS bug.
The NTS build fix only made the NTS jobs run (they previously failed at the
build step and never reached the test phase), which surfaced these latent
failures.
Status from the first
Debug Bugfixrun + local repro:cancel_during_ioleak — did NOT reproduce under Linux NTS + ASAN(×5), nor locally (×many). Very environment/timing specific.
thread_pool/cancel— reproduced as a segfault (Termsig=11)under RELEASE ZTS + tracing JIT, ~0.5% rate; not catchable under gdb (race
masked) and not caught in 480 local parallel runs. thread_pool already had
documented pre-existing shutdown races.
curl/035+056— deterministic on macOS, see above.debug-bugfix.ymlupdated: macOS bison PATH fix,--repeatraised to 30.ci: fix macOS bison PATH in debug-bugfix; bump --repeat to 30 (#118)
ci: capture core dumps + gdb backtrace in debug-bugfix (#118)
ci: ASAN+USE_ZEND_ALLOC=0 for ZTS_JIT job, fix macOS iconv (#118)
ci: parametrize debug-bugfix with php_async_ref/php_src_ref for bisec…
fix: lock channel mutex in thread_pool_drain_tasks (#118)
ci: debug-bugfix — no-JIT vs JIT passes + richer core dump for #1 (#118)
ci: LINUX_ZTS_JIT back to non-ASAN for proper core dump (#118)
ci: rr record --chaos + reverse-debug for #1 (#118)
ci: debug-bugfix — test #1 under off/function/tracing JIT (#118)
test: #118 — submit a scope-less closure to isolate shared-scope hypo…
ci: #118 — hot-maxed tracing pass + dump opcodes/handlers/SHM range f…
Revert "test: #118 — submit a scope-less closure to isolate shared-sc…
fix: detach per-op_array extension slots when copying op_array to a t…
#118 docs+changelog: tracing-JIT stale FP-relative spill writeup
[-]CI: NTS-surfaced test failures — cancel_during_io getaddrinfo struct leak, thread_pool/cancel flake, curl progress-exception[/-][+]CI: NTS-surfaced test failures[/+][-]CI: NTS-surfaced test failures[/-][+]NTS-surfaced test failures[/+]#118: libuv_reactor_shutdown — wait for threadpool cancel-completions
#118: CHANGELOG — xferinfo/progress callback exception delivery (macO…
ci: #118 install libiconv via brew so macOS configure finds it
Merge pull request #120 from true-async/118-nts-surfaced-test-failures
EdmondDantes commentedon May 15, 2026
All three NTS-surfaced test failures are now fixed and verified end-to-end.
Verification:
Follow-up (separate, non-blocking): `curl_fnmatch` (`CURLOPT_FNMATCH_FUNCTION`) and `curl_ssh_hostkeyfunction` still lack the same exception-handoff pattern. No FTP/SSH async integration or tests exist for them today; will revisit when those paths gain async support.
#143 fuzzy-tests: chaos coverage gaps — iterate / remote_future / pro…