Skip to content

Fix potential containerd panic during graceful shutdown.#3610

Merged
crosbymichael merged 1 commit intocontainerd:masterfrom
Random-Liu:fix-containerd-panic
Sep 3, 2019
Merged

Fix potential containerd panic during graceful shutdown.#3610
crosbymichael merged 1 commit intocontainerd:masterfrom
Random-Liu:fix-containerd-panic

Conversation

@Random-Liu
Copy link
Copy Markdown
Member

When containerd receives more than 1 terminate signal before shutdown, it may panic:

panic: close of closed channel

goroutine 10 [running]:
github.com/containerd/cri/vendor/github.com/containerd/containerd/cmd/containerd/command.handleSignals.func1(0xc00015dd40, 0xc00015dce0, 0x1fa21a0, 0xc0000420f0, 0xc0000a43c0)
        /usr/local/google/home/lantaol/workspace/src/github.com/containerd/cri/vendor/github.com/containerd/containerd/cmd/containerd/command/main_unix.go:60 +0x2e2
created by github.com/containerd/cri/vendor/github.com/containerd/containerd/cmd/containerd/command.handleSignals
        /usr/local/google/home/lantaol/workspace/src/github.com/containerd/cri/vendor/github.com/containerd/containerd/cmd/containerd/command/main_unix.go:41 +0x89

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

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Sep 2, 2019

Build succeeded.

@codecov-io
Copy link
Copy Markdown

codecov-io commented Sep 2, 2019

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3610   +/-   ##
=======================================
  Coverage   42.38%   42.38%           
=======================================
  Files         126      126           
  Lines       13900    13900           
=======================================
  Hits         5891     5891           
  Misses       7123     7123           
  Partials      886      886
Flag Coverage Δ
#linux 45.9% <ø> (ø) ⬆️
#windows 37.2% <ø> (ø) ⬆️

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 95301fe...dd24d76. Read the comment docs.

@Random-Liu Random-Liu added this to the 1.3 milestone Sep 2, 2019
Copy link
Copy Markdown
Member

@fuweid fuweid 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 24f7585 into containerd:master Sep 3, 2019
@Random-Liu Random-Liu deleted the fix-containerd-panic branch September 3, 2019 17:18
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.

4 participants