{"action":"opened","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/38894","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/38894/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/38894/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/38894/events","html_url":"https://github.com/kubernetes/kubernetes/issues/38894","id":196142547,"number":38894,"title":"pkg/volume/util util.Find can leave behind zombie wc processes","user":{"login":"sykesm","id":4517909,"avatar_url":"https://avatars.githubusercontent.com/u/4517909?v=3","gravatar_id":"","url":"https://api.github.com/users/sykesm","html_url":"https://github.com/sykesm","followers_url":"https://api.github.com/users/sykesm/followers","following_url":"https://api.github.com/users/sykesm/following{/other_user}","gists_url":"https://api.github.com/users/sykesm/gists{/gist_id}","starred_url":"https://api.github.com/users/sykesm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sykesm/subscriptions","organizations_url":"https://api.github.com/users/sykesm/orgs","repos_url":"https://api.github.com/users/sykesm/repos","events_url":"https://api.github.com/users/sykesm/events{/privacy}","received_events_url":"https://api.github.com/users/sykesm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-16T20:01:19Z","updated_at":"2016-12-16T20:01:19Z","closed_at":null,"body":"**Kubernetes version** (use `kubectl version`):\r\n```\r\nClient Version: version.Info{Major:\"1\", Minor:\"5\", GitVersion:\"v1.5.1+82450d0\", GitCommit:\"82450d03cb057bab0950214ef122b67c83fb11df\", GitTreeState:\"not a git tree\", BuildDate:\"2016-12-14T04:09:31Z\", GoVersion:\"go1.7.4\", Compiler:\"gc\", Platform:\"darwin/amd64\"}\r\nServer Version: version.Info{Major:\"1\", Minor:\"5\", GitVersion:\"v1.5.1\", GitCommit:\"82450d03cb057bab0950214ef122b67c83fb11df\", GitTreeState:\"clean\", BuildDate:\"1970-01-01T00:00:00Z\", GoVersion:\"go1.7.1\", Compiler:\"gc\", Platform:\"linux/amd64\"}\r\n```\r\n\r\n**Environment**:\r\n- **Cloud provider or hardware configuration**: minikube\r\n- **OS** (e.g. from /etc/os-release): Boot2Docker\r\n- **Kernel** (e.g. `uname -a`): 4.4.14-boot2docker\r\n- **Install tools**:\r\n- **Others**:\r\n\r\n\r\n**What happened**:\r\nI noticed hundreds and hundreds of defunct `wc` processes running on the minikube system. It turns out that unsupported arguments were provided to `find` which caused the function to return without waiting for `wc` to complete.  The logs contained the following:\r\n\r\n```\r\nI1216 18:47:37.596117    2342 fs.go:495] killing cmd [find /mnt/sda1/var/lib/docker/aufs/diff/1e45bc220812a43c9b04686589c68e805e787bf8d52968dc2e845c84332b94f3 -xdev -printf .], and cmd [wc -c] due to timeout(2m0s)\r\nE1216 18:47:38.456223    2342 fsHandler.go:121] failed to collect filesystem stats - rootDiskErr: <nil>, rootInodeErr: cmd [find /mnt/sda1/var/lib/docker/aufs/diff/0fd0a856472f468875ebaa014e8eab8c9995f8df8f7a9578c45a6b707916d03f -xdev -printf .] failed. stderr: find: unrecognized: -printf\r\nBusyBox v1.24.2 (2016-05-16 13:28:30 UTC) multi-call binary.\r\n\r\nUsage: find [-HL] [PATH]... [OPTIONS] [ACTIONS]\r\n\r\nSearch for files and perform actions on them.\r\nFirst failed action stops processing of current file.\r\nDefaults: PATH is current directory, action is '-print'\r\n\r\n\t-L,-follow\tFollow symlinks\r\n\t-H\t\t...on command line only\r\n\t-xdev\t\tDon't descend directories on other filesystems\r\n\t-maxdepth N\tDescend at most N levels. -maxdepth 0 applies\r\n\t\t\tactions to command line arguments only\r\n\t-mindepth N\tDon't act on first N levels\r\n\t-depth\t\tAct on directory *after* traversing it\r\n\r\nActions:\r\n\t( ACTIONS )\tGroup actions for -o / -a\r\n\t! ACT\t\tInvert ACT's success/failure\r\n\tACT1 [-a] ACT2\tIf ACT1 fails, stop, else do ACT2\r\n\tACT1 -o ACT2\tIf ACT1 succeeds, stop, else do ACT2\r\n\t\t\tNote: -a has higher priority than -o\r\n\t-name PATTERN\tMatch file name (w/o directory name) to PATTERN\r\n\t-iname PATTERN\tCase insensitive -name\r\n\t-path PATTERN\tMatch path to PATTERN\r\n\t-ipath PATTERN\tCase insensitive -path\r\n\t-regex PATTERN\tMatch path to regex PATTERN\r\n\t-type X\t\tFile type is X (one of: f,d,l,b,c,...)\r\n\t-perm MASK\tAt least one mask bit (+MASK), all bits (-MASK),\r\n\t\t\tor exactly MASK bits are set in file's mode\r\n\t-mtime DAYS\tmtime is greater than (+N), less than (-N),\r\n\t\t\tor exactly N days in the past\r\n\t-mmin MINS\tmtime is greater than (+N), less than (-N),\r\n\t\t\tor exactly N minutes in the past\r\n\t-newer FILE\tmtime is more recent than FILE's\r\n\t-inum N\t\tFile has inode number N\r\n\t-user NAME/ID\tFile is owned by given user\r\n\t-group NAME/ID\tFile is owned by given group\r\n\t-size N[bck]\tFile size is N (c:bytes,k:kbytes,b:512 bytes(def.))\r\n\t\t\t+/-N: file size is bigger/smaller than N\r\n\t-links N\tNumber of links is greater than (+N), less than (-N),\r\n\t\t\tor exactly N\r\n\t-prune\t\tIf current file is directory, don't descend into it\r\nIf none of the following actions is specified, -print is assumed\r\n\t-print\t\tPrint file name\r\n\t-print0\t\tPrint file name, NUL terminated\r\n\t-exec CMD ARG ;\tRun CMD with all instances of {} replaced by\r\n\t\t\tfile name. Fails if CMD exits with nonzero\r\n\t-exec CMD ARG + Run CMD with {} replaced by list of file names\r\n\t-delete\t\tDelete current file/directory. Turns on -depth option\r\n; err: exit status 1, extraDiskErr: <nil>\r\nE1216 18:47:41.968845    2342 fsHandler.go:121] failed to collect filesystem stats - rootDiskErr: <nil>, rootInodeErr: cmd [find /mnt/sda1/var/lib/docker/aufs/diff/412563fbaa776b51bbb938008643e68034baee0619c772ec620b3b8185247dd9 -xdev -printf .] failed. stderr: find: unrecognized: -printf\r\nBusyBox v1.24.2 (2016-05-16 13:28:30 UTC) multi-call binary.\r\n```\r\n\r\n**What you expected to happen**:\r\nThe code that started the process should get the return status via wait - even when there's an error.\r\n\r\n**How to reproduce it** (as minimally and precisely as possible):\r\nStart minikube. I have heapster enabled - which has the same code.\r\n\r\n\r\n**Anything else do we need to know**:\r\nThe `find` implementation used by minikube is from busybox. That implementation does not support the `-dev` and `-printf` options GNU find that the code is relying on.\r\n\r\nThe problematic find code is use in both cadvsior and in pkg/volume/util. Happy to PR fixes to one or both.\r\n"}}
{"actor":{"display_login":"sykesm"}}