Skip to content

builder-next: fix missing lock in ensurelayer#47523

Merged
thaJeztah merged 1 commit intomoby:masterfrom
tonistiigi:snapshot-lock-fix
Mar 7, 2024
Merged

builder-next: fix missing lock in ensurelayer#47523
thaJeztah merged 1 commit intomoby:masterfrom
tonistiigi:snapshot-lock-fix

Conversation

@tonistiigi
Copy link
Member

@tonistiigi tonistiigi commented Mar 7, 2024

fixes #46136

When this was called concurrently from the moby image exporter there could be a data race where a layer was written to the refs map when it was already there.

In that case the reference count got mixed up and on release only one of these layers was actually released.

- Fix multiple parallel `docker build` runs leaking disk space.

When this was called concurrently from the moby image
exporter there could be a data race where a layer was
written to the refs map when it was already there.

In that case the reference count got mixed up and on
release only one of these layers was actually released.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
@tonistiigi tonistiigi added this to the 26.0.0 milestone Mar 7, 2024
@thaJeztah
Copy link
Member

CI is failing because PR is missing a changelog entry in the description

@vvoland
Copy link
Contributor

vvoland commented Mar 7, 2024

Added a changelog description

@thaJeztah
Copy link
Member

oh! forgot to LGTM; let me do so 🙈

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multiple parallel docker build runs leak disk space that can't be recovered (with reproduction)

3 participants