Skip to content

Fix a containerd deadlock.#1907

Merged
crosbymichael merged 1 commit intocontainerd:masterfrom
Random-Liu:fix-deadlock
Dec 12, 2017
Merged

Fix a containerd deadlock.#1907
crosbymichael merged 1 commit intocontainerd:masterfrom
Random-Liu:fix-deadlock

Conversation

@Random-Liu
Copy link
Copy Markdown
Member

@Random-Liu Random-Liu commented Dec 12, 2017

I hit this issue during cluster bootstrapping.
If containerd is terminated with pkill containerd before it is fully bootstrapped, it may fall into a deadlock.
The reason is that the server channel size is 0. If handleSignals exits early, no one is going to consume the message in channel, and serverC <- server will stuck forever.

If this makes sense, we should cherrypick into 1.0. @crosbymichael

Signed-off-by: Lantao Liu [email protected]

Signed-off-by: Lantao Liu <[email protected]>
@Random-Liu Random-Liu changed the title Fix containerd deadlock. Fix a containerd deadlock. Dec 12, 2017
@codecov-io
Copy link
Copy Markdown

Codecov Report

Merging #1907 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1907   +/-   ##
=======================================
  Coverage   47.29%   47.29%           
=======================================
  Files          89       89           
  Lines        8830     8830           
=======================================
  Hits         4176     4176           
  Misses       3968     3968           
  Partials      686      686
Flag Coverage Δ
#linux 50.66% <ø> (ø) ⬆️
#windows 42.24% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6393165...0eebf90. Read the comment docs.

Copy link
Copy Markdown
Contributor

@mlaventure mlaventure left a comment

Choose a reason for hiding this comment

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

LGTM

@crosbymichael
Copy link
Copy Markdown
Member

LGTM

@crosbymichael crosbymichael merged commit cb423f8 into containerd:master Dec 12, 2017
@Random-Liu Random-Liu deleted the fix-deadlock branch December 12, 2017 17:01
estesp referenced this pull request Dec 13, 2017
[Cherrypick] Fix containerd deadlock.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants