-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Conversation
…T of time to execute it
Tagging subscribers to this area: @dotnet/area-system-io-compression Issue DetailsBackport of #77181 to release/7.0 /cc @adamsitnik Customer ImpactTestingRiskIMPORTANT: 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.
|
@adamsitnik please send an email to Tactics requesting approval. |
Approved by Tactics via email. |
Approved by Tactics. Signed off. CI is green. Ready to merge. |
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: