Skip to content

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

Merged
rbtcollins merged 2 commits intorust-lang:masterfrom
kinnison:fix-lowmem-lowtier
May 28, 2021
Merged

Fix low-memory issue and lower tier platforms with no sysinfo#2779
rbtcollins merged 2 commits intorust-lang:masterfrom
kinnison:fix-lowmem-lowtier

Conversation

@kinnison
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

Scope trace added, hope that's good now.

@rbtcollins
Copy link
Copy Markdown
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
Copy Markdown

@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
Copy Markdown
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