lkml.org 
[lkml]   [2024]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[QUESTION]cgroup mount return -EBUSY
Hello

I encountered a problem when I try to unmount the subsystem right after
all it's subcgroups are removed, the cgroup_root would remain. Mounting
this subsystem to another cgroup_root would return -EBUSY.

The problem could be reproduced with the following script.

test.sh:

mkdir /tmp/test1
mount -t cgroup -o pids pids /tmp/test1
mkdir /tmp/test1/test
rmdir /tmp/test1/test
umount /tmp/test1
mkdir /tmp/test
mount -t cgroup -o pids,cpu none /tmp/test

test.sh should return this.
mount: mounting none on /tmp/test failed: Device or resource busy.

It seems that when unmounting /tmp/test1, the original cgroup_root for
this PID is not released.
/test # cat /proc/cgroups

#subsys_name hierarchy num_cgroups enabled

cpuset 0 1 1

cpu 0 1 1

cpuacct 0 1 1

blkio 0 1 1

devices 0 1 1

freezer 0 1 1

net_cls 0 1 1

perf_event 0 1 1

net_prio 0 1 1

hugetlb 0 1 1

pids 1 1 1

rdma 0 1 1

misc 0 1 1

debug 0 1 1

\
 
 \ /
  Last update: 2024-05-27 18:04    [W:0.084 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site