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

[release/7.0] Fix unzipping 4GB+ zip files #77605

Merged
merged 8 commits into from
Nov 3, 2022

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Oct 28, 2022

Backport of #77181 to release/7.0

Customer Impact

It's impossible to decompress large (4GB+ after compression) zip archives that consist of more than one zipped file. There is no known workaround. Sample user bug report: #77159

The regression has been introduced in April in #68106. It went unnoticed as we were missing test coverage for such large zip files as they consume a lot of resources (disk + memory + CPU time). Example: zipping 4500 1MB files with random content into one archive with default compression level, unzipping it and comparing the contents takes more than 10 minutes on beefy PC with SSD.

Testing

New failing test has been added and it's passing with the fix. The test takes 20 seconds to execute, as it's "cheating" by using CompressionLevel.NoCompression so the most expensive operation is omitted, but the buggy code path is exercised (the bug was in reading file sizes from the zip archive).

Risk

The change is very defensive, the risk is very low. It takes into account two possibilities:

@ghost
Copy link

ghost commented Oct 28, 2022

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

Issue Details

Backport of #77181 to release/7.0

/cc @adamsitnik

Customer Impact

Testing

Risk

IMPORTANT: Is this backport for a servicing release? If so and this change touches code that ships in a NuGet package, please make certain that you have added any necessary package authoring and gotten it explicitly reviewed.

Author: github-actions[bot]
Assignees: -
Labels:

area-System.IO.Compression

Milestone: -

@adamsitnik adamsitnik added the Servicing-consider Issue for next servicing release review label Oct 28, 2022
@carlossanlop
Copy link
Member

@adamsitnik please send an email to Tactics requesting approval.

@carlossanlop carlossanlop added this to the 7.0.x milestone Oct 28, 2022
@carlossanlop carlossanlop added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Oct 28, 2022
@carlossanlop
Copy link
Member

Approved by Tactics via email.

@carlossanlop
Copy link
Member

Approved by Tactics. Signed off. CI is green. Ready to merge. :shipit:

@carlossanlop carlossanlop merged commit 00d3109 into release/7.0 Nov 3, 2022
@carlossanlop carlossanlop deleted the backport/pr-77181-to-release/7.0 branch November 3, 2022 00:25
@ghost ghost locked as resolved and limited conversation to collaborators Dec 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants