Repository navigation
Closed
Description
Follow-up to #125 / #127 / #129 / #136. After those, fuzzy-tests/ covers 167/167 of the documented API and most Layer 2 (protocol) faults — but several reactor paths still have no chaos coverage and only happy-path .phpt tests. This issue tracks the remaining gaps.
Layer 1 IO (carried over from fuzzy-tests/IO_PLAN.md)
High priority — race surface where UAF / leak is most likely:
-
io/cancel_during_connect.feature— TCP connect to a blackhole (192.0.2.1:81, RFC 5737), killer cancels mid-wait. Reactor must release the connect request without UAF. -
io/stream_close_during_read.feature— coroutine A blocked infread, coroutine Bfcloses the same handle. Race on the reactor request list — orthogonal to direct cancel.
Medium — correctness invariants:
-
io/concurrent_readers.feature— N readers on one pipe, cancel half. Invariantreceived_total + recv_failed_total == N. -
io/stream_select_chaos.feature—stream_selectover a set; data arrives mid-select; cancel the selecting coroutine. Not exercised by anything beyond fixed-output.phpt. -
io/connect_with_timeout.feature— TCP connect to unreachable with explicit timeout; no leaked watcher.
Low — file/IO consistency:
-
io/file_concurrent_writes.feature— 10 coroutines writing distinct payloads to one file. Chaos regression for the 083 /php_stdiop_writefix (I/O chaos follow-up: write-path toxics, real RST, forked peer, failure-freeze #129); right now only the single fixed-outputtests/io/083pins that. -
io/dns_slow.feature— async DNS resolver under slow / timing-out upstream; resolver must stay interruptible. -
io/evil_peer_garbage.feature— well-formed framing with garbage payloads; client reports parse error, no crash.
Other reactor surfaces with no chaos coverage
- UDP —
tests/socket/028–030happy-path only. Reactor UDP path never exercised under a randomised scheduler. - SSL/TLS — handshake under Toxiproxy slicer / latency / reset. Today only
tests/stream/025–027async-TLS happy-path. - FileSystemWatcher — event stream + cancel/close race. Class is in COVERAGE (3/3) but no chaos feature.
-
Async\signal()regression (signal(): delivery is non-deterministic in multi-thread programs #109) — fix landed (zend_signal_activate/ deactivate skip when reactor enabled). No chaos regression test; the original bug was a multi-thread race on concurrentsignal()+ cancel. - Zombie-timer loop (Zombie coroutine in a long delay() keeps the event loop alive until the timer expires #132) — currently a design question with no failing test. A
disposeAfterTimeoutscope with a child parked in a longdelay()would pin the behaviour and become the regression for the eventual fix.
DB / protocol follow-ups (came up during #136)
-
pdo_pgsqlLISTEN/NOTIFY + COPY IN/OUT underreset_peer. Today only synchronous COPY is hit. - mysqlnd
E_WARNINGon pool dropped-connect —FINDINGS.mdflags it as a loose end (raw warning leaks under ERRMODE_EXCEPTION in the pool path only). A failing-tagged scenario would close it when the fix lands. - Pool
max_size+ Toxiproxyreset_peer— race between retiring a broken connection and a concurrentacquireunder the limit. Todaypdo_pool_max_size_enforced.phptis happy-path only. - Prepared-statement cache (PDO MySQL pool, 050–054) — LRU eviction racing cancel mid-prepare; current 050–054 are happy-path.
Suggested first pass
io/stream_close_during_read.feature+io/concurrent_readers.feature— directly target the structural class that produced I/O chaos follow-up: write-path toxics, real RST, forked peer, failure-freeze #129 (broadcast event on the handle).io/cancel_during_connect.feature+io/connect_with_timeout.feature— connect-watcher UAF/leak is not exercised by anything today.io/file_concurrent_writes.feature— chaos regression for the 083 fix.signal_chaos.feature— the only php-src fix shipped without a chaos backstop.
Metadata
Metadata
Assignees
Labels
testsTest coverage task
Activity
#138 scheduler: stop_waker_events sets events_stopped bit, start rese…
#138 fuzzy-tests: shared-pipe IO chaos (close races + N-reader cancel…
#138 ext/async: delegate stop_waker_events to zend_async_waker_stop_e…
#138 fuzzy-tests: connect-watcher chaos coverage
#138 fuzzy-tests: IPv6 connect-watcher chaos coverage
#138 fuzzy-tests: concurrent shared-file writes (php_stdiop_write bac…
#138 fuzzy-tests: Async\signal() chaos coverage (#109 backstop)
#138 fuzzy-tests: TLS handshake chaos coverage
#138 fuzzy-tests: stream_select() chaos coverage
#138 fuzzy-tests: UDP recvfrom chaos coverage
#138 fuzzy-tests: FileSystemWatcher chaos coverage
#138 fuzzy-tests: async DNS resolve chaos coverage
#138 fuzzy-tests: PDO pool stmt cache LRU chaos coverage
#138 fuzzy-tests: bounded pool + mid-flight TCP reset chaos
#138 fuzzy-tests: harden TLS cancel race against debug-ZTS-FUZZ
#138 fuzzy-tests: drop CI-flaky TLS cancel-timing outline
Merge pull request #140 from true-async/138-chaos-test-coverage-gaps-…
#143 fuzzy-tests: SSL accept-side chaos (concurrent handshakes + cancel)
#143 fuzzy-tests: chaos coverage gaps — proc_open, curl_multi, feof, …