You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Windows: verify a blocked fwrite() detects a peer connection reset #134
Split off from the #129 I/O chaos work. Not a regression — pre-existing.
Context
tests/stream/046-write_wakes_on_peer_reset.phpt is the regression test
for the #129 item 1 fix: a coroutine suspended in fwrite() on a full
send buffer must be released when the peer abruptly resets the
connection, instead of hanging forever. That fix lives in the POSIX poll/POLLERR path (async_poll_notify_proxies — a disconnect/error
is treated as terminal for every proxy on the descriptor).
Observation on Windows
The test fails on Windows (it has since it was added; it was masked by
the tests/io/083 failure until #133 fixed that). The CI diff:
- second fwrite failed: yes
+ second fwrite failed: no
The narrow discrepancy: after the peer RST, the secondfwrite()
reports success on Windows where POSIX reports failure. Winsock/IOCP
surfaces WSAECONNRESET to a write on a different schedule.
What needs verifying
It is not yet determined whether this is:
Test over-specification — "the error lands on exactly the 2nd
write" is a POSIX-specific timing. Windows may surface the reset on
a later write / via feof() / via a stream error, and the runtime
is fine. → adjust the test for Windows.
A real Windows gap — the IOCP reactor does not propagate the
peer reset to a blocked/again-writing coroutine, so writes to a dead
socket keep silently succeeding. → real bug to fix in the reactor.
A diagnostic test (issue more writes after the reset, check feof()
and the stream error state, observe whether the reset is ever
detected) run on the Windows CI runner would settle which it is.
Current state
046-write_wakes_on_peer_reset.phpt is --SKIPIF--'d on Windows so CI
is green; the POSIX path stays covered. This issue tracks the Windows
verification.
Activity
#129 io: skip 046-write_wakes_on_peer_reset on Windows
#134 tests/stream: Windows-side coverage for fwrite() after peer RST
Merge pull request #152 from true-async/134-windows-verify-a-blocked-…
ext/async: deflake feof-after-remote-close tests 042/043 (#134)
ext/async: deflake remaining feof FIN-race in test 038 (#134)
ext/async: skip 069 concurrent-append on Windows instead of unconditi…