[CRIU] [PATCH 2/2] tests: prevent zdtm_mount_cgroups from failing w/ EBUSY
Tycho Andersen
tycho.andersen at canonical.com
Tue Feb 2 07:16:18 PST 2016
On Mon, Feb 01, 2016 at 10:13:14PM -0800, Andrew Vagin wrote:
> On Tue, Feb 02, 2016 at 09:56:41AM +1100, Tycho Andersen wrote:
> > Sometimes I get:
> >
> > sudo ./zdtm.py run -t zdtm/live/static/cgroup03
> > umount: /home/tycho/packages/criu/test/zdtm.qPwsoO: target is busy
> > (In some cases useful info about processes that
> > use the device is found by lsof(8) or fuser(1).)
> > Traceback (most recent call last):
> > File "./zdtm.py", line 1401, in <module>
> > tst.available()
> > File "./zdtm.py", line 435, in available
> > subprocess.check_call(["flock", "zdtm_mount_cgroups", "./zdtm_mount_cgroups"])
> > File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
> > raise CalledProcessError(retcode, cmd)
> > subprocess.CalledProcessError: Command '['flock', 'zdtm_mount_cgroups', './zdtm_mount_cgroups']' returned non-zero exit status 1
> >
> > let's use a lazy unmount so we avoid this.
>
> Maybe we need to find who uses it in this moment?
Unfortunately I can't seem to reliably reproduce it, and by the time I
can lsof when it happens whoever is using the mount is done. We can
drop this one for now if you want until I can figure that out.
Tycho
> >
> > Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
> > ---
> > test/zdtm_mount_cgroups | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/test/zdtm_mount_cgroups b/test/zdtm_mount_cgroups
> > index d7bc142..34e0e85 100755
> > --- a/test/zdtm_mount_cgroups
> > +++ b/test/zdtm_mount_cgroups
> > @@ -11,6 +11,6 @@ for i in "zdtmtst" "zdtmtst.defaultroot"; do
> > mount -t cgroup -o none,name=$i zdtm $tdir &&
> > # a fake group prevents destroying of a controller
> > mkdir -p $tdir/holder &&
> > - umount $tdir || exit 1
> > + umount -l $tdir || exit 1
> > done
> > rmdir $tdir
> > --
> > 2.5.0
> >
> > _______________________________________________
> > CRIU mailing list
> > CRIU at openvz.org
> > https://lists.openvz.org/mailman/listinfo/criu
More information about the CRIU
mailing list