diff --git a/libcontainer/cgroups/fs/freezer.go b/libcontainer/cgroups/fs/freezer.go index 987f1bf5e74..d3804eceea1 100644 --- a/libcontainer/cgroups/fs/freezer.go +++ b/libcontainer/cgroups/fs/freezer.go @@ -79,6 +79,13 @@ func (s *FreezerGroup) Set(path string, r *configs.Resources) (Err error) { // system. time.Sleep(10 * time.Microsecond) } + + if i%500 == 499 { + // should sleep a longer time for + // some really very slow machine. + time.Sleep(5 * time.Second) + } + state, err := cgroups.ReadFile(path, "freezer.state") if err != nil { return err