Skip to content

NTS-surfaced test failures #118

@EdmondDantes

Description

@EdmondDantes

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No fields configured for Bug.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions