runc got SIGSEGV on Raspberry PI 2, ARM7
When I run docker run hello-world I got
docker: Error response from daemon: OCI runtime create failed:
container_linux.go:344: starting container process caused
“process_linux.go:297: getting the final child’s pid from pipe caused
\”EOF\“”: unknown.
ERRO[0023] error waiting for container: context canceled
I find found it happens because one of processes forked by runc got
SIGSEGV.
See output of strace
6095 execve(“/usr/bin/runc.apk.exec”, [“/usr/bin/runc.apk.exec”,
“–root”, “/var/run/docker/runtime-runc/moby”, “–log”,
“/run/docker/containerd/daemon/io.containerd.runtime.v1.linux/moby/ff7e11de778883b511cb6c19e1b543b2b6814e97763d4119a97ca8ab2bcfbcf5/log.json”,
“–log-format”, “json”, “create”, “–bundle”,
“/var/run/docker/containerd/daemon/io.containerd.runtime.v1.linux/moby/ff7e11de778883b511cb6c19e1b543b2b6814e97763d4119a97ca8ab2bcfbcf5”,
“–pid-file”,
“/var/run/docker/containerd/daemon/io.containerd.runtime.v1.linux/moby/ff7e11de778883b511cb6c19e1b543b2b6814e97763d4119a97ca8ab2bcfbcf5/init.pid”,
“ff7e11de778883b511cb6c19e1b543b2b6814e97763d4119a97ca8ab2bcfbcf5”],
0x7eecca48 /* 21 vars /) = 0
6095 clone(child_stack=0x66cedd60,
flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID|0x400000,
parent_tidptr=0x66cedd7c, tls=0x66cedde0, child_tidptr=0x66cedd84) =
6096
6095 clone(child_stack=0x66cd6d60,
flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID|0x400000,
parent_tidptr=0x66cd6d7c, tls=0x66cd6de0, child_tidptr=0x66cd6d84) =
6097
6095 clone(child_stack=0x66cbfd60,
flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID|0x400000,
parent_tidptr=0x66cbfd7c, tls=0x66cbfde0, child_tidptr=0x66cbfd84) =
6098
6095 clone(child_stack=0x66ca8d60,
flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID|0x400000,
parent_tidptr=0x66ca8d7c, tls=0x66ca8de0, child_tidptr=0x66ca8d84) =
6099
6099 clone(child_stack=0x66c51d60,
flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID|0x400000,
parent_tidptr=0x66c51d7c, tls=0x66c51de0, child_tidptr=0x66c51d84) =
6100
6100 clone(child_stack=NULL, flags=SIGCHLD) = 6101
6101 execve(“/proc/self/exe”, [“/usr/bin/runc.apk.exec”, “init”],
0x184e500 / 4 vars /) = 0
6101 execve(“/proc/self/fd/5”, [“/usr/bin/runc.apk.exec”, “init”],
0xad7f80 / 4 vars */) = 0
6101 clone(child_stack=0x7ee04920, flags=CLONE_PARENT|SIGCHLD) =
6102
6102 — SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x2c}
—
6102 + killed by SIGSEGV +
6100 — SIGCHLD {si_signo=SIGCHLD, si_code=CLD_KILLED, si_pid=6102,
si_uid=0, si_status=SIGSEGV, si_utime=0, si_stime=0} —
6101 — SIGPIPE {si_signo=SIGPIPE, si_code=SI_USER, si_pid=6101,
si_uid=0} —
6100 waitid(P_PID, 6101,
6101 + killed by SIGPIPE +
6100 <… waitid resumed>{si_signo=SIGCHLD, si_code=CLD_KILLED,
si_pid=6101, si_uid=0, si_status=SIGPIPE, si_utime=0, si_stime=0},
WEXITED|WNOWAIT, NULL) = 0
6100 — SIGCHLD {si_signo=SIGCHLD, si_code=CLD_KILLED, si_pid=6101,
si_uid=0, si_status=SIGPIPE, si_utime=4, si_stime=6} —
6100 wait4(6101, [{WIFSIGNALED(s) && WTERMSIG (s) == SIGPIPE}], 0,
{ru_utime={tv_sec=0, tv_usec=37141}, ru_stime={tv_sec=0,
tv_usec=55712}, …}) = 6101
6100 exit_group(1) = ?
6098 + exited with 1 +
6100 + exited with 1 +
6097 + exited with 1 +
6096 + exited with 1 +
6099 + exited with 1 +
6095 + exited with 1 +
I downloaded
https://download.docker.com/linux/static/stable/armhf/docker-18.09.1.tgz
then I moved runc (from downloaded archive) to /usr/bin/runc and docker
run hello-world become working
So I think bug somewhere in runc.
(from redmine: issue id 10139, created on 2019-03-20)