From d10091c86e75fb78eaba96f433dc2cc06c0a54de Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Tue, 23 Jan 2018 15:02:31 -0500 Subject: [PATCH] Update runc to fix hang during start and exec Signed-off-by: Michael Crosby --- hack/dockerfile/binaries-commits | 2 +- vendor.conf | 2 +- .../opencontainers/runc/libcontainer/system/linux.go | 11 +++++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/hack/dockerfile/binaries-commits b/hack/dockerfile/binaries-commits index b2f55b09c0..0487a617cd 100644 --- a/hack/dockerfile/binaries-commits +++ b/hack/dockerfile/binaries-commits @@ -3,7 +3,7 @@ TOMLV_COMMIT=9baf8a8a9f2ed20a8e54160840c492f937eeaf9a # When updating RUNC_COMMIT, also update runc in vendor.conf accordingly -RUNC_COMMIT=7f24b40cc5423969b4554ef04ba0b00e2b4ba010 +RUNC_COMMIT=9f9c96235cc97674e935002fc3d78361b696a69e # containerd is also pinned in vendor.conf. When updating the binary # version you may also need to update the vendor version to pick up bug diff --git a/vendor.conf b/vendor.conf index be59e6f1cf..7bd1cb063a 100644 --- a/vendor.conf +++ b/vendor.conf @@ -66,7 +66,7 @@ github.com/pborman/uuid v1.0 google.golang.org/grpc v1.3.0 # When updating, also update RUNC_COMMIT in hack/dockerfile/binaries-commits accordingly -github.com/opencontainers/runc 7f24b40cc5423969b4554ef04ba0b00e2b4ba010 +github.com/opencontainers/runc 9f9c96235cc97674e935002fc3d78361b696a69e github.com/opencontainers/runtime-spec v1.0.1 github.com/opencontainers/image-spec v1.0.1 github.com/seccomp/libseccomp-golang 32f571b70023028bd57d9288c20efbcb237f3ce0 diff --git a/vendor/github.com/opencontainers/runc/libcontainer/system/linux.go b/vendor/github.com/opencontainers/runc/libcontainer/system/linux.go index 4837085a7f..5f124cd8bb 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/system/linux.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/system/linux.go @@ -134,3 +134,14 @@ func RunningInUserNS() bool { func SetSubreaper(i int) error { return unix.Prctl(PR_SET_CHILD_SUBREAPER, uintptr(i), 0, 0, 0) } + +// GetSubreaper returns the subreaper setting for the calling process +func GetSubreaper() (int, error) { + var i uintptr + + if err := unix.Prctl(unix.PR_GET_CHILD_SUBREAPER, uintptr(unsafe.Pointer(&i)), 0, 0, 0); err != nil { + return -1, err + } + + return int(i), nil +}