Skip to content

proc_open/exec, curl_multi, socket ext, feof, flock, SSL accept #143

@EdmondDantes

Description

@EdmondDantes

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:

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

  1. exec/proc_open_chaos.feature — biggest white zone + proven UAF class
  2. curl/curl_multi_chaos.feature — same hot file as the I/O chaos: protocol-level coverage for CURL and database drivers #136 chunked bug
  3. io/feof_chaos.feature
  4. io/flock_chaos.feature
  5. stream/ssl_accept_chaos.feature

This issue is the umbrella; per-feature PRs reference it as #143 ….

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

Status
Done

Relationships

None yet

Development

No branches or pull requests

Issue actions