Skip to content

Windows stress tests#451

Closed
glyn wants to merge 4 commits into
servo:mainfrom
glyn:stress-tests
Closed

Windows stress tests#451
glyn wants to merge 4 commits into
servo:mainfrom
glyn:stress-tests

Conversation

@glyn

@glyn glyn commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

No description provided.

glyn and others added 4 commits March 31, 2026 09:43
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant