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

Add lock sanity checks to Save() methods #210

Merged

Conversation

zmedico
Copy link
Contributor

@zmedico zmedico commented Aug 25, 2018

I have experienced "layer not known" corruption triggered by concurrent
buildah/skopeo processes, and hopefully lock sanity checks will help to
prevent this kind of problem.

Signed-off-by: Zac Medico [email protected]

I have experienced "layer not known" corruption triggered by concurrent
buildah/skopeo processes, and hopefully lock sanity checks will help to
prevent this kind of problem.

Signed-off-by: Zac Medico <[email protected]>
@rhatdan
Copy link
Member

rhatdan commented Aug 26, 2018

Thanks @zmedico.
@nalind WDYT?

@TomSweeneyRedHat
Copy link
Member

Me thinks @zmedico was reading my mind, or I was reading his. I was going to chat with @nalind today to see if we should throw a lock of some kind around the save() function.... I think yes, we probably should.

@nalind
Copy link
Member

nalind commented Aug 27, 2018

LGTM for finding bugs -- we shouldn't be saving when we don't have the lock.

@rhatdan
Copy link
Member

rhatdan commented Aug 28, 2018

LGTM

@rhatdan rhatdan merged commit 9fcbb57 into containers:master Aug 28, 2018
@mtrmac
Copy link
Collaborator

mtrmac commented Aug 28, 2018

FWIW this broke cross-compilation to Windows.

zmedico added a commit to zmedico/storage that referenced this pull request Aug 28, 2018
The Locked() method must be implemented so that Save() will work on
windows.

Fixes: c7ba574 ("Add lock sanity checks to Save() methods")
See: containers#210 (comment)
Reported-by: Miloslav Trmač <[email protected]>
Signed-off-by: Zac Medico <[email protected]>
zmedico added a commit to zmedico/storage that referenced this pull request Aug 28, 2018
The Locked() method must be implemented so that Save() will work on
windows.

Fixes: c7ba574 ("Add lock sanity checks to Save() methods")
See: containers#210 (comment)
Reported-by: Miloslav Trmač <[email protected]>
Signed-off-by: Zac Medico <[email protected]>
zmedico added a commit to zmedico/storage that referenced this pull request Aug 28, 2018
The Locked() method must be implemented so that Save() will work on
windows.

Fixes: c7ba574 ("Add lock sanity checks to Save() methods")
See: containers#210 (comment)
Reported-by: Miloslav Trmač <[email protected]>
Signed-off-by: Zac Medico <[email protected]>
@zmedico
Copy link
Contributor Author

zmedico commented Aug 28, 2018

FWIW this broke cross-compilation to Windows.

Sorry about that @mtrmac, I hope #212 will fix it.

@zmedico zmedico deleted the lock-sanity-checks-for-save-methods branch August 28, 2018 19:03
@zmedico
Copy link
Contributor Author

zmedico commented Aug 29, 2018

I can confirm that c7ba574 has solved my concurrent buildah/skopeo "layer not known" corruption issue. There must be one or more Save() calls that this patch causes to fail non-fatally.

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.

5 participants