Skip to content

Fix nil pointer derefence on failure to connect to containerd#38653

Merged
thaJeztah merged 1 commit intomoby:masterfrom
sreis:38636-fix-nil-pointer-dereference
Jan 31, 2019
Merged

Fix nil pointer derefence on failure to connect to containerd#38653
thaJeztah merged 1 commit intomoby:masterfrom
sreis:38636-fix-nil-pointer-dereference

Conversation

@sreis
Copy link
Copy Markdown
Contributor

@sreis sreis commented Jan 30, 2019

- 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)

Signed-off-by: Simão Reis <smnrsti@gmail.com>
Copy link
Copy Markdown
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

ping @cpuguy83 @vdemeester PTAL

@sreis
Copy link
Copy Markdown
Contributor Author

sreis commented Jan 31, 2019

@thaJeztah Very happy to contribute back.

A couple of tests failed, the errors don't seem related to the PR:

"error pulling image configuration: received unexpected HTTP status: 503 Service Temporarily Unavailable\n"

and

15:24:53 /usr/local/cli/docker: error pulling image configuration: received unexpected HTTP status: 503 Service Temporarily Unavailable.

How can I restart the tests?

Copy link
Copy Markdown
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

LGTM 🐯

@thaJeztah
Copy link
Copy Markdown
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 😅)

@sreis
Copy link
Copy Markdown
Contributor Author

sreis commented Jan 31, 2019

@thaJeztah Yeah, CI is stubborn like that everywhere 😄. Thank you both for the quick review.

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 31, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@0d9dc3f). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master   #38653   +/-   ##
=========================================
  Coverage          ?   36.57%           
=========================================
  Files             ?      610           
  Lines             ?    45216           
  Branches          ?        0           
=========================================
  Hits              ?    16540           
  Misses            ?    26394           
  Partials          ?     2282

@thaJeztah
Copy link
Copy Markdown
Member

all green now; merging!

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