Skip to content

I/O chaos testing #127

Closed
Closed

Description

@EdmondDantes

Follow-up to #125 (section 4 — roadmap layers). The chaos suite now covers scheduler-interleaving and 100% of the API surface, but I/O edge cases remain untested: partial reads, EAGAIN storms, mid-stream RST, backpressure, slow FIN, malformed/garbage payloads, a peer that accepts then never reads.

Approach

In-process EvilPeer rather than Toxiproxy — to avoid adding an external dev/CI dependency. A small PHP peer under fuzzy-tests/io_chaos/ driven by a seeded fault table. Toxiproxy may be layered on later as an optional extra.

Scope

  • new fuzzy-tests/io_chaos/ directory + harness (separate from the scenario harness)
  • fault toxics:
    • latency (with jitter)
    • slicer — chop the TCP stream into random small chunks (exposes partial-read bugs)
    • reset_peer — RST after N ms / N bytes
    • bandwidth / limit_data — backpressure scenarios
    • slow_close — delayed FIN
    • timeout — stall after N bytes
    • malformed / garbage payloads
  • target topics: stream, socket, curl
  • invariants for every interleaving: no lost wakeups, no double uv_close, partial reads reassembled correctly, cancellation-during-read cleans up handles, no refcount leaks

Reference

FUZZ_TESTING.md — Layer 2 (I/O chaos) describes the full strategy, including the Toxiproxy toxics list and the EvilPeer fallback rationale.

Related: #125 (sections 1–3 done), #102 (original fuzzing infrastructure).

Activity

  1. added
    enhancement
    on May 21, 2026
  2. changed the title [-]Layer 2: I/O chaos testing for ext/async (stream / socket / curl)[/-] [+]I/O chaos testing[/+] on May 21, 2026
  3. added
    tests
    and removed
    enhancement
    on May 21, 2026
  4. added this to the TrueAsync 0.7.0 milestone on May 21, 2026
  5. self-assigned this
    on May 21, 2026
  6. added 6 commits that reference this issue on May 22, 2026
  7. linked a pull request that will close this issue127 io chaos testing #128on May 22, 2026
  8. added a commit that references this issue on May 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

tests

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions