{"record":{"id":"4fc2668f4113f017","repo":"kubernetes/kops","slug":"error-reading-proc-self-mountinfo-v","errorCode":null,"errorMessage":"error reading /proc/self/mountinfo: %v","messagePattern":"error reading /proc/self/mountinfo: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/nodeup/nodetasks/bindmount.go","lineNumber":98,"sourceCode":"\t\t}\n\t}\n\n\treturn deps\n}\n\nfunc findTaskInSlice(tasks []fi.NodeupTask, task fi.NodeupTask) int {\n\tfor i, t := range tasks {\n\t\tif t == task {\n\t\t\treturn i\n\t\t}\n\t}\n\treturn -1\n}\n\nfunc (e *BindMount) Find(c *fi.NodeupContext) (*BindMount, error) {\n\tmounts, err := os.ReadFile(\"/proc/self/mountinfo\")\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error reading /proc/self/mountinfo: %v\", err)\n\t}\n\tfor _, line := range strings.Split(string(mounts), \"\\n\") {\n\t\t// See `man mount_namespaces` and `man proc`\n\t\t// 534 458 8:1 /var/lib/kubelet /home/kubernetes/containerized_mounter/rootfs/var/lib/kubelet rw,nosuid,nodev,noexec,relatime shared:19 - ext4 /dev/sda1 rw,commit=30,data=ordered\n\t\tline = strings.TrimSpace(line)\n\t\tif line == \"\" {\n\t\t\tcontinue\n\t\t}\n\t\ttokens := strings.Fields(line)\n\t\tif len(tokens) < 8 {\n\t\t\tklog.V(4).Infof(\"ignoring mountinfo line: %q\", line)\n\t\t}\n\n\t\tmountpoint := tokens[4]\n\t\tif strings.TrimSuffix(mountpoint, \"/\") != strings.TrimSuffix(e.Mountpoint, \"/\") {\n\t\t\tcontinue\n\t\t}\n","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/nodeup/nodetasks/bindmount.go#L80-L116","documentation":"BindMount.Find determines whether the mount already exists by parsing /proc/self/mountinfo. If the file cannot be read, the error is wrapped with this message. This indicates a /proc issue rather than a mount-state mismatch.","triggerScenarios":"os.ReadFile(\"/proc/self/mountinfo\") fails — /proc not mounted (minimal containers), procfs hidden by seccomp/AppArmor, or host filesystem corruption.","commonSituations":"Running nodeup inside a container without /proc mounted; hardened runtimes blocking procfs reads; chrooted environments lacking procfs.","solutions":["Ensure /proc is mounted in the environment (`mount -t proc proc /proc`)","Run nodeup on the host (systemd unit) rather than inside a restricted container","Check security profiles (seccomp/AppArmor/SELinux) that may deny reads on /proc/self/mountinfo","Reboot/re-provision the node if procfs appears corrupted"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if _, err := os.Stat(\"/proc/self/mountinfo\"); err != nil {\n  return errors.New(\"procfs unavailable; run nodeup on the host with /proc mounted\")\n}","typeGuard":null,"tryCatchPattern":"if err := nodeup.Run(ctx); err != nil {\n  if strings.Contains(err.Error(), \"/proc/self/mountinfo\") {\n    klog.Errorf(\"procfs inaccessible — check container/seccomp profile: %v\", err)\n  }\n}","preventionTips":["Always run nodeup on the host via systemd, not inside unprivileged containers","Mount /proc in chroot/minimal environments before nodeup","Review seccomp/AppArmor/SELinux policies for procfs read denials","Test node bootstrap images for procfs availability"],"tags":["filesystem","procfs","mount"],"backgroundTag":"procfs-read-failed","analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}