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

worker: fix gc race on fromremote #1044

Merged
merged 1 commit into from
Jun 26, 2019

Conversation

tonistiigi
Copy link
Member

fix #991

Fixes issue when gc/prune runs in the middle of the cache import. The issue is that if the imported record already exists it is skipped on unpack but might be released before the reference is taken on the unpacked records. Fix is to take a ref temporarily on unpack if it exists.

I think there are still small cases that can go wrong on pull, eg. when there is an extra condition with multiple blobs matching same snapshot. I want to refactor the whole cache record management on top of containerd/containerd#3304 that should fix all of these races. Hopefully this should be good enough fix all the practical cases where this issue can turn up.

@msg555

@msg555
Copy link
Contributor

msg555 commented Jun 11, 2019

Can confirm that this patch made my build success rate go from 0 of 20 to 19 of 20. Seems to address the main issue I was running into. The one remaining failure seems to be an entirely different issue.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
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.

Build stalls early
3 participants