Re: linux-next: cgroup_mount() falls asleep forever

From: Andrey Wagin
Date: Wed Sep 24 2014 - 10:29:33 EST


2014-09-24 14:31 GMT+04:00 Andrey Wagin <avagin@xxxxxxxxx>:
> Hi All,

The problem is in a following commit:

commit 0c7bf3e8cab7900e17ce7f97104c39927d835469
Author: Zefan Li <lizefan@xxxxxxxxxx>
Date: Sat Sep 20 14:49:10 2014 +0800

cgroup: remove redundant variable in cgroup_mount()

Both pinned_sb and new_sb indicate if a new superblock is needed,
so we can just remove new_sb.

Note now we must check if kernfs_tryget_sb() returns NULL, because
when it returns NULL, kernfs_mount() may still re-use an existing
superblock, which is just allocated by another concurent mount.

Suggested-by: Tejun Heo <tj@xxxxxxxxxx>
Signed-off-by: Zefan Li <lizefan@xxxxxxxxxx>
Signed-off-by: Tejun Heo <tj@xxxxxxxxxx>

>
> I execute CRIU tests on linux-next. Today I found that one of tests
> hangs up forever.
>
> [root@linux-next-test linux-next]# git describe HEAD
> next-20140922
> [root@linux-next-test ~]# ps axf
> ...
> 698 ? Ss 0:05 \_ sshd: root@notty
> 700 ? Ss 0:00 | \_ bash -x
> jenkins-scripts/jenkins-ct.sh jenkins.sh
> 706 ? S 0:00 | \_ bash -c ( mount --make-rprivate
> / && umount -l /proc && mount -t proc proc /proc/ && bash -x
> jenkins.sh)
> 707 ? S 0:00 | \_ bash -c ( mount
> --make-rprivate / && umount -l /proc && mount -t proc proc /proc/ &&
> bash -x jenkins.sh)
> 711 ? S 0:00 | \_ bash -x jenkins.sh
> 2981 ? S 0:05 | \_ bash -x
> test/zdtm.sh -C -x .*\(maps01\|maps04\)
> 6717 ? S 0:00 | \_ /bin/bash
> zdtm/live/static/cgroup00.hook --clean
> 6719 ? D 11:13 | \_ mount -t
> cgroup none cgclean.cWgK71 -o none,name=zdtmtst
>
> [root@linux-next-test ~]# cat /proc/6719/stack
> [<ffffffff8111fcb7>] msleep+0x37/0x50
> [<ffffffff8114bde2>] cgroup_mount+0x712/0xa50
> [<ffffffff8124d0e9>] mount_fs+0x39/0x1b0
> [<ffffffff8126d76b>] vfs_kern_mount+0x6b/0x150
> [<ffffffff8127075b>] do_mount+0x22b/0xc20
> [<ffffffff81271492>] SyS_mount+0xa2/0x110
> [<ffffffff817e3ba9>] system_call_fastpath+0x12/0x17
> [<ffffffffffffffff>] 0xffffffffffffffff
>
> Let me know which info do you need for investigation.
>
> Steps to reproduce:
>
> git clone https://github.com/xemul/criu.git
> cd criu
> make
> bash test/zdtm.sh static/cgroup00
>
> Thanks,
> Andrew
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/