mountpoint-s3-csi-driver: Driver crashes unexpectedly with `Failed to read /host/proc/mounts` requiring pod restart
/kind bug
NOTE: If this is a filesystem related bug, please take a look at the Mountpoint repo to submit a bug report
What happened? Periodically without warning one of my s3 mountpoint driver pods will crash with GRPC errors until I delete it. It will usually cause a dependent pod to fail to start. The replacement immediately after this pod’s deletion works fine, but requires manual intervention after noticing dependent pod crashes due to missing pv.
What you expected to happen? Error not to occur.
How to reproduce it (as minimally and precisely as possible)? Unclear.
Anything else we need to know?: Logs
I1104 11:59:40.249998 1 credential.go:95] NodePublishVolume: Using driver identity
I1104 11:59:40.250015 1 node.go:146] NodePublishVolume: mounting d-cluster at /var/lib/kubelet/pods/97e71fea-b356-4d87-a086-5f06fe651ea7/volumes/kubernetes.io~csi/s3-pv/mount with options [--allow-delete --allow-other --gid=100 --uid=1000]
E1104 11:59:40.250106 1 mount.go:214] Failed to read /host/proc/mounts on try 1: open /host/proc/mounts: invalid argument
E1104 11:59:40.250106 1 mount.go:214] Failed to read /host/proc/mounts on try 1: open /host/proc/mounts: invalid argument
E1104 11:59:40.250106 1 mount.go:214] Failed to read /host/proc/mounts on try 1: open /host/proc/mounts: invalid argument
E1104 11:59:40.250106 1 mount.go:214] Failed to read /host/proc/mounts on try 1: open /host/proc/mounts: invalid argument
E1104 11:59:40.350345 1 mount.go:214] Failed to read /host/proc/mounts on try 2: open /host/proc/mounts: invalid argument
E1104 11:59:40.350345 1 mount.go:214] Failed to read /host/proc/mounts on try 2: open /host/proc/mounts: invalid argument
E1104 11:59:40.350345 1 mount.go:214] Failed to read /host/proc/mounts on
try 2: open /host/proc/mounts: invalid argument
E1104 11:59:40.350345 1 mount.go:214] Failed to read /host/proc/mounts on try 2: open /host/proc/mounts: invalid argument
E1104 11:59:40.450642 1 mount.go:214] Failed to read /host/proc/mounts on try 3: open /host/proc/mounts: invalid argument
E1104 11:59:40.450642 1 mount.go:214] Failed to read /host/proc/mounts on try 3: open /host/proc/mounts: invalid argument
E1104 11:59:40.450642 1 mount.go:214] Failed to read /host/proc/mounts on try 3: open /host/proc/mounts: invalid argument
E1104 11:59:40.450642 1 mount.go:214] Failed to read /host/proc/mounts on try 3: open /host/proc/mounts: invalid argument
E1104 11:59:40.550806 1 driver.go:136] GRPC error: rpc error: code = Internal desc = Could not mount "d-cluster" at "/var/lib/kubelet/pods/97e71fea-b35
6-4d87-a086-5f06fe651ea7/volumes/kubernetes.io~csi/s3-pv/mount": Could not check if "/var/lib/kubelet/pods/97e71fea-b356-4d87-a086-5f06fe651ea7/volumes/kubernetes.io~csi/s3-pv/mount" is a mount point: stat /var/lib/kubelet/pods/97e71fea-b356-4d87-a086-5f06fe651ea7/volumes/kubernetes.io~csi/s3-pv/mount: no such file or directory, Failed to read /host/proc/mounts after 3 tries: open /host/proc/mounts: invalid argument
Environment
-
Kubernetes version (use
kubectl version): Client Version: v1.31.1 Server Version: v1.30.5-eks-ce1d5eb -
Driver version: v1.9.0 Installation of s3 mountpoint driver is through
eksctl, i.e.eksctl create addon aws-mountpoint-s3-csi-driver
Was directed by @muddyfish to file this issue here: https://github.com/awslabs/mountpoint-s3-csi-driver/issues/174#issuecomment-2443935264
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 2
- Comments: 19 (10 by maintainers)
We’ve confirmed the fix on both regular pre-provisioned nodes (it was reproduceable by restarting
containerd) and also dynamically spawned GPU nodes with Karpenter using https://github.com/aws-samples/comfyui-on-eks multiple times.We’re hoping that this will solve the issue for others too, we’ll be sharing here once we release this fix.
We were able to reproduce the issue by using https://github.com/aws-samples/comfyui-on-eks thanks to @Shellmode’s suggestion. We have a potential fix with https://github.com/awslabs/mountpoint-s3-csi-driver/pull/321, we’re working on verifying if this indeed solves the problem.
We’re using
hostPathmount for/proc/mountsfrom the host to find mounts on the host (because Mountpoint processes run on the host usingsystemdcurrently, we aim to improve this with https://github.com/awslabs/mountpoint-s3-csi-driver/issues/279). Since/proc/mountsis a symlink for/proc/self/mountsand containerd resolves symlinks for each mount,/host/proc/mountsinside our Pod basically becomes a link to containerd process’/proc/mounts:and if containerd process restarts, our
/host/proc/mountsbasically refers to a non-existent path, and it resultsEINVAL(invalid argument) if you try to open/host/proc/mounts:and the reason this happens more frequently with Karpenter/GPU nodes is that, NVIDIA’s container toolkit sends
SIGHUPsignal to containerd during its setup, and it causes containerd to restart. See https://github.com/NVIDIA/gpu-operator/issues/991v1.12.0 of our Helm chart has been released with the fix. We’re working on our EKS add-on v1.12.0 release as well and will share here once its completed.
Thanks for the reports @John-Funcity @fatihmete. Would you be able to share any log that might be relevant from
dmesg? Also, could you try accessing/proc/mountsin the host to see if that works for you?