Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v1.17.1] cherry pick of #86277: Check FileInfo against nil during walk of container dir path #86331

Conversation

tedyu
Copy link
Contributor

@tedyu tedyu commented Dec 17, 2019

What type of PR is this?
/kind bug

What this PR does / why we need it:
When checking kubelet log under https://gcsweb.k8s.io/gcs/kubernetes-jenkins/pr-logs/pull/86271/pull-kubernetes-e2e-gce/1205989922050150403/artifacts/e2e-41a80d25d0-674b9-minion-group-vrmw/ , I saw the following:

I1214 23:54:03.413009    1331 operation_generator.go:713] UnmountVolume.TearDown succeeded for volume "kubernetes.io/secret/7525fe3b-e6fa-4d02-87df-2a08ff0c9f50-default-token-rssv4" (OuterVolumeSpecName: "default-token-rssv4") pod "7525fe3b-e6fa-4d02-87df-2a08ff0c9f50" (UID: "7525fe3b-e6fa-4d02-87df-2a08ff0c9f50"). InnerVolumeSpecName "default-token-rssv4". PluginName "kubernetes.io/secret", VolumeGidValue ""
E1214 23:54:03.413115    1331 nestedpendingoperations.go:270] Operation for "\"kubernetes.io/nfs/8e4f2439-71a4-4102-a049-ba0bb42378ce-pvc-e2e1b57c-fdc0-46d9-a47d-d7ca4555e1c7\" (\"8e4f2439-71a4-4102-a049-ba0bb42378ce\")" failed. No retries permitted until 2019-12-14 23:54:03.912383421 +0000 UTC m=+1573.953851145 (durationBeforeRetry 500ms). Error: "recovered from panic \"runtime error: invalid memory address or nil pointer dereference\". (err=<nil>) Call stack:
goroutine 118595 [running]:
k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/runtime.RecoverFromPanic(0xc002b0c310)
\tstaging/src/k8s.io/apimachinery/pkg/util/runtime/runtime.go:158 +0xb5
panic(0x3a2ad60, 0x6d31df0)
\tGOROOT/src/runtime/panic.go:679 +0x1b2
k8s.io/kubernetes/pkg/volume/util/subpath.doCleanSubPaths.func1(0xc002930f00, 0x9f, 0x0, 0x0, 0x497d8a0, 0xc000b34150, 0x0, 0x0)
\tpkg/volume/util/subpath/subpath_linux.go:243 +0xbd
path/filepath.walk(0xc002930be0, 0x9d, 0x4a37a00, 0xc001f2a270, 0xc000ab3ba8, 0x0, 0x9d)
\tGOROOT/src/path/filepath/path.go:378 +0x20c

This PR adds check against nil before dereferencing FileInfo

This is cherry pick of #86277

Which issue(s) this PR fixes:
Fixes #

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added do-not-merge/cherry-pick-not-approved Indicates that a PR is not yet approved to merge into a release branch. release-note-none Denotes a PR that doesn't merit a release note. labels Dec 17, 2019
@k8s-ci-robot k8s-ci-robot added this to the v1.17 milestone Dec 17, 2019
@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Dec 17, 2019
@tedyu
Copy link
Contributor Author

tedyu commented Dec 17, 2019

/cc @liggitt @msau42

@k8s-ci-robot k8s-ci-robot added sig/storage Categorizes an issue or PR as relevant to SIG Storage. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Dec 17, 2019
@msau42
Copy link
Member

msau42 commented Dec 17, 2019

/lgtm
/approve

Can you modify the title to match the format of other cherry picks PRs?

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 17, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: msau42, tedyu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 17, 2019
@tedyu tedyu changed the title Check FileInfo against nil during walk of container dir path cherry pick of #86277: Check FileInfo against nil during walk of container dir path Dec 17, 2019
@tedyu
Copy link
Contributor Author

tedyu commented Dec 17, 2019

/test pull-kubernetes-e2e-gce

@tedyu
Copy link
Contributor Author

tedyu commented Dec 17, 2019

/test pull-kubernetes-kubemark-e2e-gce-big

@liggitt liggitt changed the title cherry pick of #86277: Check FileInfo against nil during walk of container dir path [v1.17.1] cherry pick of #86277: Check FileInfo against nil during walk of container dir path Dec 23, 2019
@feiskyer feiskyer added cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. and removed do-not-merge/cherry-pick-not-approved Indicates that a PR is not yet approved to merge into a release branch. labels Dec 25, 2019
@feiskyer
Copy link
Member

/priority critical-urgent

@k8s-ci-robot
Copy link
Contributor

@feiskyer: The label(s) priority/ cannot be applied, because the repository doesn't have them

In response to this:

/priority critical-urgent

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. label Dec 25, 2019
@k8s-ci-robot k8s-ci-robot removed the needs-priority Indicates a PR lacks a `priority/foo` label and requires one. label Dec 25, 2019
@k8s-ci-robot k8s-ci-robot merged commit aaf62f2 into kubernetes:release-1.17 Dec 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. release-note-none Denotes a PR that doesn't merit a release note. sig/storage Categorizes an issue or PR as relevant to SIG Storage. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants