Skip to content

Conversation

@vvoland
Copy link
Collaborator

@vvoland vvoland commented Jan 4, 2023

fixes #3916

Backport:

There was already an attempt to fix this test by #3753 but it seems that it only accounted for the races between the test cases, and not the container rm itself calling containerRemoveFunc concurrently.

Synchronize append on the removed slice with mutex because containerRemoveFunc is called in parallel for each removed container by container rm cli command.
Also reduced the shared access area by separating the scopes of test cases.

Signed-off-by: Paweł Gronowski pawel.gronowski@docker.com
(cherry picked from commit b811057)

Synchronize append on the `removed` slice with mutex because
containerRemoveFunc is called in parallel for each removed container by
`container rm` cli command.
Also reduced the shared access area by separating the scopes of test
cases.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit b811057)
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!

@thaJeztah thaJeztah merged commit 06faf2b into docker:20.10 Jan 6, 2023
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