Skip to content

[25.0 backport] volume: Don't decrement refcount below 0 #47533

Merged
thaJeztah merged 1 commit intomoby:25.0from
vvoland:v25.0-47530
Mar 8, 2024
Merged

[25.0 backport] volume: Don't decrement refcount below 0 #47533
thaJeztah merged 1 commit intomoby:25.0from
vvoland:v25.0-47530

Conversation

@vvoland
Copy link
Copy Markdown
Contributor

@vvoland vvoland commented Mar 8, 2024

With both rootless and live restore enabled, there's some race condition which causes the container to be Unmounted before the refcount is restored.

This makes sure we don't underflow the refcount (uint64) when decrementing it.

The root cause of this race condition still needs to be investigated and fixed, but at least this unflakies the TestLiveRestore.

- How to verify it
Check TestLiveRestore
The CI is green after running the test 30x times: afa01ac

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

@vvoland vvoland added this to the 25.0.5 milestone Mar 8, 2024
@vvoland vvoland self-assigned this Mar 8, 2024
With both rootless and live restore enabled, there's some race condition
which causes the container to be `Unmount`ed before the refcount is
restored.

This makes sure we don't underflow the refcount (uint64) when
decrementing it.

The root cause of this race condition still needs to be investigated and
fixed, but at least this unflakies the `TestLiveRestore`.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit 294fc97)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Copy link
Copy Markdown
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

@thaJeztah thaJeztah merged commit 5901652 into moby:25.0 Mar 8, 2024
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.

2 participants