moby: overlay merge mountpoint disappear,error starting setns process: fork/exec /proc/self/exe: no such file or directory: unknown
Description
$ docker ps -a | grep xxx-keep
f7e6580b6359 xxx.xxx.lan:5000/xxx/keepalived:v2.2.0 "/entrypoint.sh --do…" 2 weeks ago Up 56 minutes xxx-keepalived-ipvs
$ docker top xxx-keepalived-ipvs
UID PID PPID C STIME TTY TIME CMD
root 1212761 1212741 0 10:52 ? 00:00:00 keepalived --dont-fork --log-console --log-detail --use-file=/etc/keepalived/keepalived.conf
root 1213048 1212761 0 10:52 ? 00:00:05 keepalived --dont-fork --log-console --log-detail --use-file=/etc/keepalived/keepalived.conf
$ docker exec xxx-keepalived-ipvs bash
OCI runtime exec failed: exec failed: unable to start container process: error starting setns process: fork/exec /proc/self/exe: no such file or directory: unknown
$ docker inspect xxx-keepalived-ipvs | grep Pid
"Pid": 1212761,
"PidMode": "",
"PidsLimit": null,
$ ls -l /proc/1212761/cmdline
-r--r--r-- 1 root root 0 2月 20 10:52 /proc/1212761/cmdline
container is running ,but merge is disappear
$docker inspect xxx-keepalived-ipvs | grep -i merge
"MergedDir": "/data/kube/docker/overlay2/71668496b88bc08fd8523376e81054883d02f1dca1ebf15b3969774911413c75/merged",
$ ls -l /data/kube/docker/overlay2/71668496b88bc08fd8523376e81054883d02f1dca1ebf15b3969774911413c75/merged
ls: cannot access '/data/kube/docker/overlay2/71668496b88bc08fd8523376e81054883d02f1dca1ebf15b3969774911413c75/merged': No such file or directory
$ mount | grep 71668496b88bc08fd8523376e81054883d02f1dca1ebf15b3969774911413c75
$ ls -l /data/kube/docker/overlay2/71668496b88bc08fd8523376e81054883d02f1dca1ebf15b3969774911413c75/
总用量 8
drwxr-xr-x 7 root root 74 2月 4 15:40 diff
-rw-r--r-- 1 root root 26 2月 4 15:40 link
-rw-r--r-- 1 root root 115 2月 4 15:40 lower
drwx------ 3 root root 18 2月 20 10:52 work
container process is working
[root@kylin10-sp2 ~]# nsenter -t 1212761 --mount
kylin10-sp2:/# ls -l
total 4
drwxr-xr-x 2 root root 25 Feb 4 15:40 always-initsh.d
drwxr-xr-x 1 root root 67 Apr 20 2023 bin
drwxr-xr-x 14 root root 3160 Feb 20 10:52 dev
-rwxr-xr-x 1 root root 1777 Apr 20 2023 entrypoint.sh
drwxr-xr-x 1 root root 54 Feb 4 15:40 etc
drwxr-xr-x 2 root root 6 Feb 11 2023 home
drwxr-xr-x 1 root root 21 Feb 4 15:40 lib
drwxr-xr-x 5 root root 44 Feb 11 2023 media
drwxr-xr-x 2 root root 6 Feb 11 2023 mnt
drwxr-xr-x 2 root root 6 Feb 11 2023 opt
dr-xr-xr-x 394 root root 0 Feb 20 10:52 proc
drwx------ 2 root root 6 Feb 11 2023 root
drwxr-xr-x 1 root root 44 Feb 20 10:52 run
drwxr-xr-x 1 root root 131 Feb 4 15:40 sbin
drwxr-xr-x 2 root root 6 Feb 11 2023 srv
dr-xr-xr-x 13 root root 0 Feb 19 14:30 sys
drwxrwxrwt 2 root root 6 Feb 11 2023 tmp
drwxr-xr-x 1 root root 66 Feb 11 2023 usr
drwxr-xr-x 1 root root 30 Feb 11 2023 var
kylin10-sp2:/#
logout
[root@kylin10-sp2 ~]# nsenter -t 1212761 --mount --uts --ipc --net --pid
keepalived-1:/# ps aux
PID USER TIME COMMAND
1 root 0:00 keepalived --dont-fork --log-console --log-detail --use-file=/etc/keepalived/keepalived.conf
56 root 0:05 keepalived --dont-fork --log-console --log-detail --use-file=/etc/keepalived/keepalived.conf
57 root 0:00 -bash
58 root 0:00 ps aux
keepalived-1:/#
🤔
Reproduce
haven’t found a stable way to reproduce yet This appears to have occurred after the container was restarted concurrently
Expected behavior
docker exec works
docker version
Client:
Version: 24.0.5
API version: 1.43
Go version: go1.20.6
Git commit: ced0996
Built: Fri Jul 21 20:34:09 2023
OS/Arch: linux/arm64
Context: default
Server: Docker Engine - Community
Engine:
Version: 24.0.5
API version: 1.43 (minimum version 1.12)
Go version: go1.20.6
Git commit: a61e2b4
Built: Fri Jul 21 20:35:24 2023
OS/Arch: linux/arm64
Experimental: false
containerd:
Version: v1.7.1
GitCommit: 1677a17964311325ed1c31e2c0a3589ce6d5c30d
runc:
Version: 1.1.8
GitCommit: v1.1.8-0-g82f18fe
docker-init:
Version: 0.19.0
GitCommit: de40ad0
docker info
Client:
Version: 24.0.5
Context: default
Debug Mode: false
Server:
Containers: 41
Running: 40
Paused: 0
Stopped: 1
Images: 241
Server Version: 24.0.5
Storage Driver: overlay2
Backing Filesystem: xfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 1677a17964311325ed1c31e2c0a3589ce6d5c30d
runc version: v1.1.8-0-g82f18fe
init version: de40ad0
Security Options:
seccomp
Profile: builtin
Kernel Version: 4.19.90-24.4.v2101.ky10.aarch64
Operating System: Kylin Linux Advanced Server V10 (Sword)
OSType: linux
Architecture: aarch64
CPUs: 8
Total Memory: 30.62GiB
Additional Info
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 15 (5 by maintainers)
@gogowitsch hi, as mentioned above, the direct reason is #43402, now I have a workarround, hope can help you too.
replace
docker restartbydocker stopanddocker startseparately, this waydocker startwill eventually make the container to the right state(running and merged dir exists).@scuzhanglei can you edit your comment and add output of
docker versionanddocker infoas well? Perhaps also the output ofrunc --version我也遇到了这个问题
I confirm that our server that has this issue has a terrible disk io lag. IO is our bottleneck.
@kolyshkin thanks, and I am very sure it’s a docker bug. I can reproduce it by injecting latency to docker used disk, and simultaneously send several docker restart commands continuously. to a container"
@scuzhanglei @zhangguanzhang @gogowitsch do you by any chance run Twistlock Defender? If yes, this might be the reason (it somehow messes with container mounts). More details are at https://access.redhat.com/solutions/7062219