[Suggestion] kernel: cgroup: mount failure in LTP cgroup_regression_test.sh

Jan Stancek jstancek at redhat.com
Thu Nov 21 08:04:54 UTC 2013


Hi,

it looks like those 2 subsystems are already mounted by systemd,
each in different hierarchy:

>   cpuacct	4	35	1
>   freezer	5	4	1

from Documentation/cgroups/cgroups.txt:
"If an active hierarchy with exactly the same set of subsystems already
exists, it will be reused for the new mount. If no existing hierarchy
matches, and any of the requested subsystems are in use in an existing
hierarchy, the mount will fail with -EBUSY. Otherwise, a new hierarchy
is activated, associated with the requested subsystems."

Regards,
Jan

----- Original Message -----
> From: "Chen Gang" <gang.chen.5i5j at gmail.com>
> To: "Tejun Heo" <tj at kernel.org>, "Garrett Cooper" <yanegomi at gmail.com>, gaowanlong at cn.fujitsu.com, chris at mips.com,
> jstancek at redhat.com, mitani at ryobi.co.jp, lizf at cn.fujitsu.com
> Cc: "Li Zefan" <lizefan at huawei.com>, containers at lists.linux-foundation.org, cgroups at vger.kernel.org
> Sent: Thursday, 21 November, 2013 5:18:50 AM
> Subject: Fwd: [Suggestion] kernel: cgroup: mount failure in LTP cgroup_regression_test.sh
> 
> Hello LTP maintainers:
> 
> When I use ltp to test cgroup, I find one failure, the related forward
> mail is below.
> 
> Related LTP git commit is "75df824 Add cgroup regression tests to LTP:
> Those testcases can reproduce bugs we found in cgroups, and is useful
> to track future regressions." (lizf at cn.fujitsu.com and subrata_modak)
> 
> Please help check when you have time.
> 
> Thanks.
> 
> -------- Original Message --------
> Subject: [Suggestion] kernel: cgroup: mount failure in LTP
> cgroup_regression_test.sh
> Date: Fri, 08 Nov 2013 16:15:23 +0800
> From: Chen Gang <gang.chen at asianux.com>
> To: Tejun Heo <tj at kernel.org>, Li Zefan <lizefan at huawei.com>
> CC: containers at lists.linux-foundation.org, cgroups at vger.kernel.org,
> "linux-kernel at vger.kernel.org" <linux-kernel at vger.kernel.org>
> 
> Hello Maintainers:
> 
> On Fedora16 with defconfig for next-20131107 kernel, use latest LTP
> (Linux Test Project) version, test_5() in cgroup_regression_test.sh
> will be fail. The related LTP output:
> 
>   <<<test_start>>>
>   tag=cgroup stime=1383562810
>   cmdline="       cgroup_regression_test.sh"
>   contacts=""
>   analysis=exit
>   <<<test_output>>>
>   cgroup_regression_test    1  TPASS  :  no kernel bug was found
>   /opt/ltp/testcases/bin/cgroup_regression_test.sh: line 118: 13283
>   Terminated              ./fork_processes
>   cgroup_regression_test    2  TPASS  :  notify_on_release is inherited
>   cgroup_regression_test    3  TCONF  :  CONFIG_SCHED_DEBUG is not enabled
>   cgroup_regression_test    4  TCONF  :  CONFIG_LOCKDEP is not enabled
>   mount: xxx already mounted or cgroup/ busy
>   cgroup_regression_test    5  TFAIL  :  mount freezer and cpuacct failed
>   cgroup_regression_test    6  TCONF  :  CONFIG_CGROUP_NS
>   /opt/ltp/testcases/bin/cgroup_regression_test.sh: line 360: 24428
>   Terminated              sleep 100 < cgroup/0
>   /opt/ltp/testcases/bin/cgroup_regression_test.sh: line 381: 24447
>   Terminated              sleep 100 < cgroup/0
>   cgroup_regression_test    7  TPASS  :  no kernel bug was found
>   cgroup_regression_test    8  TPASS  :  no kernel bug was found
>   cgroup_regression_test    9  TPASS  :  no kernel warning was found
>   rmdir: failed to remove `cgroup/0': No such file or directory
>   umount: /sys/fs/cgroup/systemd: device is busy.
>           (In some cases useful info about processes that use
>            the device is found by lsof(8) or fuser(1))
>   cgroup_regression_test   10  TPASS  :  no kernel warning was found
>   <<<execution_status>>>
>   initiation_status="ok"
>   duration=62 termination_type=exited termination_id=1 corefile=no
>   cutime=3341 cstime=6353
>   <<<test_end>>>
> 
> After simplify, the related operation, environments and output are:
> 
>   [root at gchenlinux tmp]# df -Th | grep cgroup
>   tmpfs                             tmpfs    1001M     0 1001M   0%
>   /sys/fs/cgroup
>   [root at gchenlinux tmp]# lsof | grep cgroup | grep -v grep
>   systemd       1          root    6r      DIR               0,18         0
>   5998 /sys/fs/cgroup/systemd/system
>   [root at gchenlinux tmp]# cat /proc/cgroups
>   #subsys_name	hierarchy	num_cgroups	enabled
>   cpuset	3	4	1
>   cpu	4	35	1
>   cpuacct	4	35	1
>   freezer	5	4	1
>   [root at gchenlinux tmp]# mkdir cgroup
>   [root at gchenlinux tmp]# mount -t cgroup -o freezer,cpuacct xxx cgroup/
>   mount: xxx already mounted or cgroup/ busy
> 
> Is it real issue of cgroup? If it is, I will/should continue analyzing.
> 
> 
> Welcome any additional suggestions and completions.
> 
> Thanks.
> --
> Chen Gang
> 
> 
> 


More information about the Containers mailing list