func remove(path string) error {
	var err error
	delay := 10 * time.Millisecond
	for i := 0; i < 5; i++ {
		if i != 0 {
			time.Sleep(delay)
			delay *= 2
		}
		if err = os.RemoveAll(path); err == nil {
			return nil
		}
	}
	return errors.Wrapf(err, "cgroups: unable to remove path %q", path)
}
remove will remove a cgroup path handling EAGAIN and EBUSY errors and
retrying the remove after a exp timeout
package v2
import (
	"bufio"
	"fmt"
	"io"
	"io/ioutil"
	"math"
	"os"
	"path/filepath"
	"strconv"
	"strings"
	"time"
	"github.com/containerd/cgroups/v2/stats"
	"github.com/godbus/dbus/v5"
	"github.com/opencontainers/runtime-spec/specs-go"
	"github.com/pkg/errors"
	"github.com/sirupsen/logrus"
)
const (
	cgroupProcs    = "cgroup.procs"
	defaultDirPerm = 0755
)
var defaultFilePerm = os.FileMode(0)