Skip to content

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented May 17, 2021

shutil.unpack_archive() tries to read the whole file into memory, making no use of any kind of smaller buffer. Process crashes for really large files: I.e. archive: ~1.7G, unpacked: ~10G. Before the crash it can easily take away all available RAM on smaller systems. Had to pull the code form zipfile.Zipfile.extractall() to fix this

Automerge-Triggered-By: GH:gpshead
(cherry picked from commit f32c795)

Co-authored-by: Igor Bolshakov ibolsch@gmail.com

https://bugs.python.org/issue43650

…large files (pythonGH-25058)

`shutil.unpack_archive()` tries to read the whole file into memory, making no use of any kind of smaller buffer. Process crashes for really large files: I.e. archive: ~1.7G, unpacked: ~10G. Before the crash it can easily take away all available RAM on smaller systems. Had to pull the code form `zipfile.Zipfile.extractall()` to fix this

Automerge-Triggered-By: GH:gpshead
(cherry picked from commit f32c795)

Co-authored-by: Igor Bolshakov <ibolsch@gmail.com>
@miss-islington miss-islington merged commit 049c412 into python:3.9 May 17, 2021
@miss-islington miss-islington deleted the backport-f32c795-3.9 branch May 17, 2021 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants