Localize and eliminate the native macOS timed-send fixture hang
- Dominant language
- Rust
- Stars
- 53
- Forks
- 16
- Avg merge
- 4h 22m
- Merged PRs (30d)
- 46
Description
Observed at PR #631 head `d811e0c2accc8997eecb5071f8752f88e9fb44e4`. [Failing CI job](https://github.com/wavefnd/Wave/actions/runs/34737095086/job/103670349659).
On both macOS amd64 and arm64, `test_tcp_backpressure_does_not_turn_readiness_into_an_unbounded_send` raises `subprocess.TimeoutExpired`: the `tcp_timeout` executable remains alive after the harness's 10-second limit.
The fixture requests a 30 ms timed write of 8 MiB with nominal 4096-byte socket buffers. Its 2-second elapsed-time assertion is never reported. It also connects, accepts, allocates, frees and closes sockets; the outer timeout does not prove that send itself is the blocking phase.
`posix_timeout.wave` already uses per-call MSG_DONTWAIT. The current value 128 agrees with Apple's header; merely replacing that constant is not an evidence-backed fix. See [Apple socket.h](https://github.com/apple-oss-distributions/xnu/blob/main/bsd/sys/socket.h).
Reproduce using `cargo test --locked --test std_io_regressions --jobs 2 -- --nocapture` on both macOS architectures. Instrument phases and collect a bounded native stack sample to identify whether setup, send/retry/poll, timekeeping or teardown blocks.
Acceptance:
- Identify the actual blocked phase with native evidence.
- Enforce the timed operation's budget under established backpressure while preserving descriptor alias modes.
- Bound setup and cleanup separately; retain the outer process-tree watchdog.
- Exercise timeout, partial progress and subsequent usable socket state on both architectures.
This is the macOS native follow-up to #510, not evidence of a general LLVM crash. Linux and the macOS Wave Cases jobs pass in the same PR.
Source references:
- [tests/fixtures/io/tcp_timeout.wave](https://github.com/wavefnd/Wave/blob/d811e0c2accc8997eecb5071f8752f88e9fb44e4/tests/fixtures/io/tcp_timeout.wave)
- [std/net/posix_timeout.wave](https://github.com/wavefnd/Wave/blob/d811e0c2accc8997eecb5071f8752f88e9fb44e4/std/net/posix_timeout.wave)
Both affected jobs: [amd64](https://github.com/wavefnd/Wave/actions/runs/34737095086/job/103670349659), [arm64](https://github.com/wavefnd/Wave/actions/runs/34737095086/job/103670349676).
Contributor guide
Research direction
Start with tests/fixtures/io/tcp_timeout.wave and std/net/posix_timeout.wave, then run cargo test --locked --test std_io_regressions --jobs 2 -- --nocapture on both macOS architectures. Instrument setup, send/retry/poll, timekeeping, and teardown and collect a bounded native stack sample. Done means the blocked phase is identified, timed operations and setup/cleanup are bounded, and timeout, partial progress, descriptor aliases, and subsequent socket use are tested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, rust
- Domain
- networking, operating-systems, testing-qa
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100