Stress-test FileHandle readabilityHandler teardown on subprocess pipes#5507
Draft
rintaro wants to merge 1 commit into
Draft
Stress-test FileHandle readabilityHandler teardown on subprocess pipes#5507rintaro wants to merge 1 commit into
rintaro wants to merge 1 commit into
Conversation
Add two tests that exercise tearing down a subprocess's stderr `Pipe` whose read end has a `readabilityHandler`, mirroring how SourceKit-LSP reads a child process's stderr: the handler reads `availableData` and clears itself on EOF, then the process and pipe are torn down. One test runs the spawn/teardown cycle sequentially; the other runs it concurrently and closes the read end before EOF, so the close races the dispatch read source's asynchronous cancellation. This covers a teardown path that has intermittently crashed on Linux in `_dispatch_event_loop_drain` while draining a dangling epoll muxnote. The tests should complete without crashing.
Member
Author
|
@swift-ci Please test |
Member
Author
|
@swift-ci Please test Linux |
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.
We're seeing crashes in
_dispatch_event_loop_drainduring shutting downclangdin SourceKit-LSP tests. swiftlang/sourcekit-lsp#2717 (comment)Add two tests that exercise tearing down a subprocess's stderr
Pipewhose read end has areadabilityHandler, mirroring how SourceKit-LSP reads a child process's stderr: the handler readsavailableDataand clears itself on EOF, then the process and pipe are torn down.One test runs the spawn/teardown cycle sequentially; the other runs it concurrently and closes the read end before EOF, so the close races the dispatch read source's asynchronous cancellation.
This covers a teardown path that has intermittently crashed on Linux in
_dispatch_event_loop_drainwhile draining a dangling epoll muxnote. The tests should complete without crashing.