Skip to content

Instantly share code, notes, and snippets.

View stevenh's full-sized avatar

Steven Hartland stevenh

View GitHub Profile
@stevenh
stevenh / spec.patch
Created January 22, 2017 21:28
sync opencontainers runc/libcontainer with runtime-spec
diff --git a/libcontainer/cgroups/fs/hugetlb.go b/libcontainer/cgroups/fs/hugetlb.go
index 2f97277..b056d02 100644
--- a/libcontainer/cgroups/fs/hugetlb.go
+++ b/libcontainer/cgroups/fs/hugetlb.go
@@ -28,7 +28,7 @@ func (s *HugetlbGroup) Apply(d *cgroupData) error {
func (s *HugetlbGroup) Set(path string, cgroup *configs.Cgroup) error {
for _, hugetlb := range cgroup.Resources.HugetlbLimit {
- if err := writeFile(path, strings.Join([]string{"hugetlb", hugetlb.Pagesize, "limit_in_bytes"}, "."), strconv.FormatUint(hugetlb.Limit, 10)); err != nil {
+ if err := writeFile(path, strings.Join([]string{"hugetlb", hugetlb.Pagesize, "limit_in_bytes"}, "."), strconv.FormatInt(hugetlb.Limit, 10)); err != nil {
GOMAXPROCS: 24
SIGQUIT: quit
PC=0x453e2e m=0
goroutine 0 [idle]:
runtime.sys_umtx_op(0x536bf8, 0xf, 0x18, 0x0, 0x7fffffffe7b0, 0x449544, 0x536c10, 0x80052e8d8, 0x7fffffffe7f8, 0x7fffffffe7e0, ...)
/usr/local/go/src/runtime/sys_freebsd_amd64.s:21 +0x1e fp=0x7fffffffe770 sp=0x7fffffffe768
runtime.futexsleep1(0x536bf8, 0x0, 0xffffffffffffffff)
/usr/local/go/src/runtime/os_freebsd.go:80 +0x5d fp=0x7fffffffe7c8 sp=0x7fffffffe770
runtime.futexsleep.func1()