Skip to content

orchestrator/global: Fix deadlock on updates#1760

Merged
aaronlehmann merged 1 commit intomoby:masterfrom
aaronlehmann:global-orchestrator-deadlock
Nov 17, 2016
Merged

orchestrator/global: Fix deadlock on updates#1760
aaronlehmann merged 1 commit intomoby:masterfrom
aaronlehmann:global-orchestrator-deadlock

Conversation

@aaronlehmann
Copy link
Copy Markdown
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 <aaron.lehmann@docker.com>
@stevvooe
Copy link
Copy Markdown
Contributor

LGTM

@codecov-io
Copy link
Copy Markdown

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
Copy Markdown
Contributor

LGTM

@aaronlehmann
Copy link
Copy Markdown
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