Skip to content

Fix for lack of synchronization in daemon/update.go#41999

Merged
thaJeztah merged 1 commit into
moby:masterfrom
diakovliev:fix_update_sync
Apr 8, 2021
Merged

Fix for lack of synchronization in daemon/update.go#41999
thaJeztah merged 1 commit into
moby:masterfrom
diakovliev:fix_update_sync

Conversation

@diakovliev

@diakovliev diakovliev commented Feb 8, 2021

Copy link
Copy Markdown

fixes #41988

Signed-off-by: dmytro.iakovliev [email protected]

- What I did

Reordered operations to fix race.

- How I did it

The container state checking has been placed between container.Lock() and container.Unlock(). Added container state checking into the defer handler.

- How to verify it

See script to reproduce failing conditions in #41988.

- Description for the changelog

Fix for lack of syncronization in daemon/update.go.

@diakovliev diakovliev changed the title Fix for lack of syncromization in daemon/update.go Fix for lack of syncronization in daemon/update.go Feb 8, 2021
@diakovliev
diakovliev marked this pull request as ready for review February 8, 2021 14:18
Comment thread daemon/update.go Outdated
Comment thread daemon/update.go Outdated
@iurii-ovcharenko

Copy link
Copy Markdown

We experiencing this issue in our organization several times a day.
When could we expect this fix to be merged?

@thaJeztah thaJeztah changed the title Fix for lack of syncronization in daemon/update.go Fix for lack of synchronization in daemon/update.go Apr 8, 2021

@thaJeztah thaJeztah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@cpuguy83 cpuguy83 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

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.

Lack of synchronization. The "Dead" flag must be checked under locked container mutex.

4 participants