Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zip.Unix: don't hang when creating zip file from directory with named pipe. #85301

Merged
merged 4 commits into from
May 18, 2023

Conversation

tmds
Copy link
Member

@tmds tmds commented Apr 25, 2023

When we open the named pipe for reading, that call will block indefinitely when there is no writer to provide data.

And if we manage to read data from a pipe, that data was probably meant for someone else.

Rather than opening named pipes, throw an IOException indicating they are not supported.

And like the named pipes, this also treat character devices, block devices, and sockets as unsupported types.

Fixes #85097.

@dotnet/area-system-io ptal.

… pipe.

When we open the named pipe for reading, that call will block indefinitely
when there is no writer to provide data.

And if we manage to read data from a pipe, that data was probably meant
for someone else.

Rather than opening named pipes, throw an IOException indicating they
are not supported.

And like the named pipes, this also treat character devices,
block devices, and sockets as unsupported types.
@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label Apr 25, 2023
@ghost
Copy link

ghost commented Apr 25, 2023

Tagging subscribers to this area: @dotnet/area-system-io-compression
See info in area-owners.md if you want to be subscribed.

Issue Details

When we open the named pipe for reading, that call will block indefinitely when there is no writer to provide data.

And if we manage to read data from a pipe, that data was probably meant for someone else.

Rather than opening named pipes, throw an IOException indicating they are not supported.

And like the named pipes, this also treat character devices, block devices, and sockets as unsupported types.

Fixes #85097.

@dotnet/area-system-io ptal.

Author: tmds
Assignees: -
Labels:

area-System.IO.Compression

Milestone: -

Copy link
Member

@carlossanlop carlossanlop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, @tmds. Thanks for submitting this PR.

Just left some minor suggestions, and we need to run runtime-extra-platforms to ensure tvOS/iOS pass.

@carlossanlop
Copy link
Member

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@tmds
Copy link
Member Author

tmds commented May 4, 2023

@carlossanlop thanks for the thorough review!

@carlossanlop
Copy link
Member

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@carlossanlop
Copy link
Member

Ran runtime-extra-platforms again because the last commit cancelled that run. Let's wait and confirm the results look good in the re-enabled Apple platforms.

@tmds
Copy link
Member Author

tmds commented May 9, 2023

Ran runtime-extra-platforms again because the last commit cancelled that run. Let's wait and confirm the results look good in the re-enabled Apple platforms.

The tvOS job showed an error for creating the fifo. I don't know if there is an iOS job, but I imagine it would have the same issue. I've re-disabled the platforms.

@tmds
Copy link
Member Author

tmds commented May 18, 2023

This should be good to merge.

@carlossanlop
Copy link
Member

Yes, this is ready. I opened an issue for the chrome failure in wasm (unrelated).

@carlossanlop carlossanlop merged commit b86722c into dotnet:main May 18, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Jun 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.IO.Compression community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ZipFile hangs when encountering named pipe
2 participants