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

Failures creating a container/image/layer leaves a record in memory #1147

Closed
mtrmac opened this issue Feb 22, 2022 · 2 comments
Closed

Failures creating a container/image/layer leaves a record in memory #1147

mtrmac opened this issue Feb 22, 2022 · 2 comments

Comments

@mtrmac
Copy link
Collaborator

mtrmac commented Feb 22, 2022

layerStore.Put, on various error paths, calls layerStore.Driver.Remove, but not layerStore.Delete; therefore, the failed layer is still kept around in memory and can be found and used within that process (and could even, potentially, be written to disk on any future Save, if that succeeds).

That wouldn’t be that much of an issue of a failure to create a layer always caused a process termination, but that’s not the case for long-lived processes like CRI-O, and even Podman seems to default to 3 retries via c/common/pkg.retry (admittedly in fairly, but not extremely, limited situations).

I’m not sure what all the implications of this are. My head hurts just at the thought of trying to enumerate that.

The “obvious” fix of calling layerStore.Delete on most error paths would test the limits of resiliency of the generic layer the deletion code, and graph drivers’ layer removal code, in previously-possibly-unanticipated ways.

@mtrmac mtrmac changed the title Failures creating a layer leave a layer record in memory Failures creating a container/image/layer leaves a record in memory Feb 22, 2022
@mtrmac
Copy link
Collaborator Author

mtrmac commented Feb 22, 2022

The same issue exists for images and containers.

@mtrmac
Copy link
Collaborator Author

mtrmac commented Oct 21, 2022

This was actually fixed in #1148 , AFAICS.

@mtrmac mtrmac closed this as completed Oct 21, 2022
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

No branches or pull requests

1 participant