Windows stress tests#451
Closed
glyn wants to merge 4 commits into
Closed
Conversation
Flag this as a slow test.
When CancelIoEx returns ERROR_NOT_FOUND, the overlapped read has already completed. Previously the buffer was restored without updating its length, so the bytes the kernel read were silently discarded. Call notify_completion instead, which reads the byte count from the OVERLAPPED structure and updates read_buf accordingly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Windows IPC implementation contains ~45 unsafe blocks covering kernel-aliased async I/O, IOCP result processing, pipe creation, shared memory, and handle duplication. A recent bug (87cb37d) demonstrated that race conditions in the async I/O cancel path can silently lose messages. These stress tests exercise the critical unsafe code paths under sustained, high-concurrency load. All tests are gated with #[ignore] / enable-slow-tests. Run with: cargo test --features enable-slow-tests -- stress_ | Test | Unsafe Path Targeted | What It Does | |---------------------------------------|-----------------------------------------------------------|------------------------------------------------------------------| | stress_concurrent_senders_many_threads | start_read() / notify_completion() buffer mgmt | 16 threads, 200 msgs each, varying sizes up to 256KB | | stress_receiver_set_churn | fetch_iocp_result() OVERLAPPED pointer lookup | Add/remove receivers from set while messages flow | | stress_try_recv_timeout_rapid_fire | issue_async_cancel() / fetch_async_result() | 2000 msgs at ~1ms intervals with 1ms timeouts (the 87cb37d race) | | stress_large_message_interleaved | Multi-fragment reassembly, buffer extension | 4 senders x 20 x 1MB messages, verify no cross-sender corruption | | stress_shared_memory_concurrent_create | CreateFileMappingA / MapViewOfFile / copy_nonoverlapping | 8 threads x 100 shmem regions (4KB-256KB), sent over channels | | stress_receiver_set_high_fanin | IOCP with many completion keys | 32 channels x 100 msgs into one receiver set | | stress_channel_create_destroy_rapid | create_duplex() / WinHandle::Drop | 5000 create-send-recv-destroy cycles | Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.