Repository navigation
Description
Audit of ext/async/fuzzy-tests/ vs deterministic ext/async/tests/ after #138 (Layer 1 IO + DB) closed. The following surfaces have hand-written phpt coverage and known race-prone APIs but no chaos coverage:
High priority — whole subsystems missing
1. exec/ — proc_open / exec / shell_exec / system / passthru
24 deterministic tests under ext/async/tests/exec/, including a previously-fixed UAF (011-proc_open_handle_reuse_uaf.phpt). No chaos features exist. Race surface:
proc_close()racing parkedfread()on child stdout/stderr (mirrorsio/stream_close_during_read.feature)- N concurrent
proc_openwith shared cancel - Kill-by-signal during pipe read
- proc_open + child stdin write under back-pressure (mirrors I/O chaos follow-up: write-path toxics, real RST, forked peer, failure-freeze #129 write-path)
2. CURL multi-handle
Existing curl/http_chaos.feature (#136) covers only single-handle curl_exec. curl_multi_* integration (ext/curl/curl_async.c — same file as the chunked bug fix) has 4 deterministic tests (curl/003,010) and no chaos. Worth: cancel during curl_multi_select, multiple handles + EvilPeer toxics, multi-handle close during in-flight transfers.
3. socket/ extension (POSIX sockets, distinct from streams)
Only 4 deterministic tests (socket/001–004, all IPv6 happy-path). The socket_*() API path through xp_socket.c / network_async.c is separate from streams and has zero chaos coverage. socket_recvfrom/socket_sendto/socket_connect under cancel.
Medium priority — known race-prone APIs
4. feof semantics under chaos
stream/038–044 — 7 deterministic feof tests, listed as TODO in IO_PLAN.md table. Peer-close vs local-read with cancel; feof-after-recv race.
5. flock on event loop
Single deterministic test io/081-flock_non_blocking_event_loop.phpt. Under chaos: N coroutines racing for the same file lock + cancel/timeout.
6. SSL accept-side
stream/025–027 cover SSL accept. tls_connect.feature (#138) covers client only. Accept-side cancel + concurrent handshakes is missing.
7. pgsql LISTEN/NOTIFY
Already tracked in project_138_chaos_coverage (memory). Needs live PostgreSQL.
Low priority — already in PLAN.md
Core primitive gaps (coroutine/finally, scope/dispose, future/error, channel/deadlock_detection, thread_channel/multi_thread, cross_topic/shutdown_with_pending) are already itemised in fuzzy-tests/PLAN.md TODO list.
Suggested order
exec/proc_open_chaos.feature— biggest white zone + proven UAF classcurl/curl_multi_chaos.feature— same hot file as the I/O chaos: protocol-level coverage for CURL and database drivers #136 chunked bugio/feof_chaos.featureio/flock_chaos.featurestream/ssl_accept_chaos.feature
This issue is the umbrella; per-feature PRs reference it as #143 ….
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
[-]Chaos test coverage gaps: proc_open/exec, curl_multi, socket ext, feof, flock, SSL accept[/-][+]proc_open/exec, curl_multi, socket ext, feof, flock, SSL accept[/+]#143 fuzzy-tests: proc_open / proc_close storm chaos + finding #144
#143 fuzzy-tests: curl_multi chaos + finding #145 (heap corruption on…
#143 fuzzy-tests: feof() chaos under concurrent close / drain / poll
#143 fuzzy-tests: flock() contention chaos + finding #146 (stack UAF …
#143 fuzzy-tests: SSL accept-side chaos (concurrent handshakes + cancel)
#143 fuzzy-tests: ext/sockets POSIX socket_* chaos under cancel
#143 fuzzy-tests: chaos coverage gaps — proc_open, curl_multi, feof, …
#143 fuzzy-tests: chaos coverage gaps — iterate / remote_future / pro…
#143 ext/async/iterate: fix UAF on refcounted values/keys (params[0] …