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

Fix low-memory issue and lower tier platforms with no sysinfo #2779

Merged
merged 2 commits into from
May 28, 2021

Conversation

kinnison
Copy link
Contributor

Lower memory (where 32M might be the bare minimum we can offer the unpacker) or lower-tier platforms which lack sysinfo support (where we default to 32M of unpack RAM) were hanging during install. Turns out this is because we were failing to account for the release of the last chunk in an incremental file unpack. This wasn't a memory leak per-se, but it did mean that the accounting system refused to let the component proceed because it didn't think there was a free chunk to use.

This pair of commits first introduces a test change which demonstrates the issue and then introduces a fix.

If this is merged, we should do a release in order to deal with #2774 asap.

Copy link
Contributor

@rbtcollins rbtcollins left a comment

Choose a reason for hiding this comment

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

.

In rust-lang#2774 we have seen hangs during installation for some low tier
platforms for whom the 32M default if sysinfo doesn't work causes
problems.  This change *exposes* that problem in a failing test.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
@rbtcollins rbtcollins force-pushed the fix-lowmem-lowtier branch from 57455f6 to 03be992 Compare May 28, 2021 09:43
In incremental file processing we need to correctly account for
the final chunk being released, otherwise we end up holding a chunk
for the duration of the rest of the component for every incremental
file in the tarball.  This is what caused the issue surfaced in the
previous commit, and thus this commit fixes rust-lang#2774

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
@kinnison kinnison force-pushed the fix-lowmem-lowtier branch from 03be992 to 1e4de78 Compare May 28, 2021 09:46
@kinnison
Copy link
Contributor Author

Scope trace added, hope that's good now.

@rbtcollins
Copy link
Contributor

heh check the timeline... I had already done so :)

@rbtcollins rbtcollins merged commit 6b094f7 into rust-lang:master May 28, 2021
@chrisduerr
Copy link

@kinnison mentioned the potential for a release in order to deal with this. Is a 1.24.3 release planned? If so, I'd be curious if there are any other things blocking it.

@kinnison kinnison deleted the fix-lowmem-lowtier branch May 30, 2021 15:04
@kinnison
Copy link
Contributor Author

@chrisduerr Once #2782 is done I think a new release is plausible. Assuming Robert has time to review and merge it soon, I'll aim to stage a beta release early in the week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants