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

orchestrator/global: Fix deadlock on updates #1760

Merged
merged 1 commit into from
Nov 17, 2016

Conversation

aaronlehmann
Copy link
Collaborator

The updater is wrongly called from inside a store transaction, which can
lead to a deadlock if an update is already running. The new update tries
to cancel the running one, but that existing update may be stuck trying
to start a store transaction and therefore the new update waits forever
for it to stop. To fix this, keep track of tasks that need to be
updated, and call the updater outside the transaction.

See moby/moby#28039

cc @dongluochen @aluzzardi

The updater is wrongly called from inside a store transaction, which can
lead to a deadlock if an update is already running. The new update tries
to cancel the running one, but that existing update may be stuck trying
to start a store transaction and therefore the new update waits forever
for it to stop. To fix this, keep track of tasks that need to be
updated, and call the updater outside the transaction.

Signed-off-by: Aaron Lehmann <[email protected]>
@stevvooe
Copy link
Contributor

LGTM

@codecov-io
Copy link

codecov-io commented Nov 17, 2016

Current coverage is 55.35% (diff: 25.00%)

Merging #1760 into master will increase coverage by 0.29%

@@             master      #1760   diff @@
==========================================
  Files           102        101     -1   
  Lines         16729      16503   -226   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
- Hits           9210       9135    -75   
+ Misses         6378       6239   -139   
+ Partials       1141       1129    -12   

Sunburst

Powered by Codecov. Last update 91c6e2d...2999704

@dongluochen
Copy link
Contributor

LGTM

@aaronlehmann
Copy link
Collaborator Author

Also cherry-picked to bump_v1.12.4 branch

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.

4 participants