containerd/sys
Haitao Li 35c14c6b56 sys/mount_linux: use pipe for communicating mount result
forkAndMountat forks a process to chdir then mount layers. Signals are
blocked (using runtime_beforeFork) during fork.

There is a race condition that the child process finishes before the
parent process is scheduled and can unblock signal handling. The SIGCHLD
signal sent from the finished process may have been delivered to the
shim process's reaper thread and caused the parent process fail with
ECHLD error.

This patch sets up a pipe for communication between child and parent
instead of waiting for child exit status.

Fixes #4009.

Signed-off-by: Haitao Li <hli@atlassian.com>
2020-04-09 09:50:41 +10:00
..
reaper Change bufferSize back to 32 2019-08-20 22:10:11 +08:00
env.go Don't fail on setting -ve oom score when rootless 2018-05-04 17:06:01 +01:00
epoll.go sys: deprecate EpollCreate1, EpollCtl, EpollWait 2020-03-09 13:15:07 +01:00
fds.go Licence header added 2018-02-19 10:32:26 +09:00
filesys_unix.go Windows:Create root/state with ACL 2019-03-21 18:47:34 -07:00
filesys_windows.go Partial revert of sys: windows: use golang.org/x/sys/windows 2020-03-09 16:01:09 +01:00
filesys.go Move isFifo from process/io to sys/ and make public 2020-03-25 10:44:17 -04:00
mount_linux_test.go Support >= 128 layers in overlayfs snapshots 2018-08-07 10:59:36 +08:00
mount_linux.go sys/mount_linux: use pipe for communicating mount result 2020-04-09 09:50:41 +10:00
oom_unix_test.go vendor: update gotest.tools v3.0.2 2020-02-28 17:47:20 +01:00
oom_unix.go Add GetOOMScore function 2019-04-09 10:40:54 -04:00
oom_windows.go Add GetOOMScore function 2019-04-09 10:40:54 -04:00
proc.go Licence header added 2018-02-19 10:32:26 +09:00
reaper_linux.go Runtime v2 2018-07-17 10:21:29 -04:00
reaper.go Runtime v2 2018-07-17 10:21:29 -04:00
socket_unix.go sys: mkdirAs: do chown if dir already exists 2019-12-18 14:19:19 +09:00
socket_windows.go Licence header added 2018-02-19 10:32:26 +09:00
stat_bsd.go Licence header added 2018-02-19 10:32:26 +09:00
stat_unix.go Licence header added 2018-02-19 10:32:26 +09:00
subprocess_unsafe_linux.go Support >= 128 layers in overlayfs snapshots 2018-08-07 10:59:36 +08:00
subprocess_unsafe_linux.s Support >= 128 layers in overlayfs snapshots 2018-08-07 10:59:36 +08:00