diff --git a/cmd/containerd-stress/rlimit_unix.go b/cmd/containerd-stress/rlimit_unix.go index 807a9a92f..492f60432 100644 --- a/cmd/containerd-stress/rlimit_unix.go +++ b/cmd/containerd-stress/rlimit_unix.go @@ -31,6 +31,9 @@ func setRlimit() error { } if limit.Cur < rlimit { limit.Cur = rlimit + if limit.Max < limit.Cur { + limit.Max = limit.Cur + } if err := syscall.Setrlimit(syscall.RLIMIT_NOFILE, &limit); err != nil { return err }