Repository navigation
test: Retry the Windows dead-pipe write until stdin is gone (Fixes #192) - #772
Merged
Merged
Conversation
Stderr EOF does not prove the child's stdin read end is closed yet; a
dying process's handles close one at a time. All spawns in the Windows
module already hold serial(), so inherited copies are ruled out.
Local-Gate: v1 tree=f59e78bffbe78714185acf51ae3949d9d0eb780c secs=419 lanes=lint:run,rust-test:run,cross:run,tier2-linux:run
Ci-Attestation: {"at":1792014783,"gate":"rust/all/fmt","host":"linux-x86_64","key":"2decd020cb0ae32bfd16b36c31d309c32de56506cd44180bcab0c1b56d20d53c","lane":"lint","parents":["533f135366ae8903844ab8a93be48e3805870af5"],"secs":55,"stamp":"551a5d3237ed603e6eb9791c2baa5af2","tree":"f59e78bffbe78714185acf51ae3949d9d0eb780c","v":1,"via":"run"}
Ci-Attestation: {"at":1792014783,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"2decd020cb0ae32bfd16b36c31d309c32de56506cd44180bcab0c1b56d20d53c","lane":"lint","parents":["533f135366ae8903844ab8a93be48e3805870af5"],"secs":55,"stamp":"413e6f569278e8a347eb2cc8852c8ec1","tree":"f59e78bffbe78714185acf51ae3949d9d0eb780c","v":1,"via":"run"}
Ci-Attestation: {"at":1792014783,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"b3db543d028f72d4275e05133959191d7bf199b1e68c1031e2960dd74fe5edba","lane":"rust-test","parents":["533f135366ae8903844ab8a93be48e3805870af5"],"secs":100,"stamp":"6d9f5ad480649734710e53df1daf602f","tree":"f59e78bffbe78714185acf51ae3949d9d0eb780c","v":1,"via":"run"}
Ci-Attestation: {"at":1792014783,"gate":"rust/x86_64-pc-windows-msvc/clippy","host":"linux-x86_64","key":"83d5be25f1e88889cd1f5100d4b1a389170fa26e109a4ea378fb15918ea4d57b","lane":"cross","parents":["533f135366ae8903844ab8a93be48e3805870af5"],"secs":44,"stamp":"68f0dc49e5b95ccdc8490b3a1f395b71","tree":"f59e78bffbe78714185acf51ae3949d9d0eb780c","v":1,"via":"run"}
Ci-Attestation: {"at":1792014783,"gate":"rust/x86_64-pc-windows-msvc/dylint","host":"linux-x86_64","key":"83d5be25f1e88889cd1f5100d4b1a389170fa26e109a4ea378fb15918ea4d57b","lane":"cross","parents":["533f135366ae8903844ab8a93be48e3805870af5"],"secs":44,"stamp":"a091fa0f1610c7113ba4401593a85597","tree":"f59e78bffbe78714185acf51ae3949d9d0eb780c","v":1,"via":"run"}
Ci-Attestation: {"at":1792014783,"gate":"rust/aarch64-apple-darwin/clippy","host":"linux-x86_64","key":"83d5be25f1e88889cd1f5100d4b1a389170fa26e109a4ea378fb15918ea4d57b","lane":"cross","parents":["533f135366ae8903844ab8a93be48e3805870af5"],"secs":44,"stamp":"f1c0bfcbb2ba1b027dd8407ac42bddda","tree":"f59e78bffbe78714185acf51ae3949d9d0eb780c","v":1,"via":"run"}
Ci-Attestation: {"at":1792014783,"gate":"rust/aarch64-apple-darwin/dylint","host":"linux-x86_64","key":"83d5be25f1e88889cd1f5100d4b1a389170fa26e109a4ea378fb15918ea4d57b","lane":"cross","parents":["533f135366ae8903844ab8a93be48e3805870af5"],"secs":44,"stamp":"ec46b28d31cb43f9b15867a8762f038e","tree":"f59e78bffbe78714185acf51ae3949d9d0eb780c","v":1,"via":"run"}
Ci-Attestation: {"at":1792014783,"gate":"rust/x86_64-apple-darwin/clippy","host":"linux-x86_64","key":"83d5be25f1e88889cd1f5100d4b1a389170fa26e109a4ea378fb15918ea4d57b","lane":"cross","parents":["533f135366ae8903844ab8a93be48e3805870af5"],"secs":44,"stamp":"2ff32da27ff213621e1b4c8ceb6fd80a","tree":"f59e78bffbe78714185acf51ae3949d9d0eb780c","v":1,"via":"run"}
Ci-Attestation: {"at":1792014783,"gate":"rust/x86_64-apple-darwin/dylint","host":"linux-x86_64","key":"83d5be25f1e88889cd1f5100d4b1a389170fa26e109a4ea378fb15918ea4d57b","lane":"cross","parents":["533f135366ae8903844ab8a93be48e3805870af5"],"secs":44,"stamp":"842fa8f35ab9d43a9896dc3b1149c526","tree":"f59e78bffbe78714185acf51ae3949d9d0eb780c","v":1,"via":"run"}
Ci-Attestation: {"at":1792014783,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"bccb543af5e4c101af7b239df70298b7faa498afdb1ef9dc4114aee4eb4dd2ab","lane":"tier2-linux","parents":["533f135366ae8903844ab8a93be48e3805870af5"],"secs":220,"stamp":"1faaff966a319f4a3c16cbd82d133e8c","tree":"f59e78bffbe78714185acf51ae3949d9d0eb780c","v":1,"via":"run"}
Member
Author
|
Evidence from the failing run (38638167750): the panic was at |
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.
Refs #192
Root cause
The concurrent-spawn/inheritance hypothesis is refuted: every spawner in
windows_process(pipe_parity.rs) already holdsserial(), the only unserialized test (nulls_match_oracle, first half) never spawns, and other test files are separate binaries run sequentially. Neither the oracle nor the shim leaves inheritable handles open past create.Remaining cause: the test syncs on stderr EOF, which only proves the child closed its stderr. Windows closes a dying process's handles one at a time, so the stdin read end can outlive that EOF briefly; a write in that gap lands in the pipe buffer and returns 64. This is test synchronization, not a Rust-port or C bug (both sides are equally exposed).
Fix
write_until_brokenretries the write (1 ms apart, 10 s cap) until it reports 0. A permanently leaked read end would still fail after 10 s.Evidence
./lint,soldr cargo test -p obs-util(host), cross lane, and local-gate (lint, rust-test, cross, tier2-linux) pass; stamped.