Fix nil pointer derefence on failure to connect to containerd#38653
Merged
thaJeztah merged 1 commit intomoby:masterfrom Jan 31, 2019
Merged
Fix nil pointer derefence on failure to connect to containerd#38653thaJeztah merged 1 commit intomoby:masterfrom
thaJeztah merged 1 commit intomoby:masterfrom
Conversation
Signed-off-by: Simão Reis <smnrsti@gmail.com>
thaJeztah
approved these changes
Jan 30, 2019
Member
thaJeztah
left a comment
There was a problem hiding this comment.
LGTM, thanks!
ping @cpuguy83 @vdemeester PTAL
Contributor
Author
|
@thaJeztah Very happy to contribute back. A couple of tests failed, the errors don't seem related to the PR: and How can I restart the tests? |
Member
|
I see @vdemeester restarted the tests; failures look indeed unrelated, and could be either a glitch with Docker Hub, or the infrastructure that the power and z machines run in (I think there's a VPN to integrate it with our CI, but it sometimes doesn't work 😅) |
Contributor
Author
|
@thaJeztah Yeah, CI is stubborn like that everywhere 😄. Thank you both for the quick review. |
Codecov Report
@@ Coverage Diff @@
## master #38653 +/- ##
=========================================
Coverage ? 36.57%
=========================================
Files ? 610
Lines ? 45216
Branches ? 0
=========================================
Hits ? 16540
Misses ? 26394
Partials ? 2282 |
Member
|
all green now; merging! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
- What I did
As reported in #38636 Docker will crash if it fails to connect to containerd before the timeout is reached. Although the underlying cause seems to be containerd stuck doing an fdatasync there's a nil pointer dereference if the connection to containerd fails.
- How I did it
Moved the offending code to where we know the pointer can be used safely.
- How to verify it
It's hard to reproduce the underlying issue causing containerd to hang when doing a fdatasync.
- Description for the changelog
Fix nil pointer derefence on failure to connect to containerd.
- A picture of a cute animal (not mandatory but encouraged)