GNU bug report logs - #12730
coreutils-8.20: FAIL: tests/du/bind-mount-dir-cycle.sh

Previous Next

Package: coreutils;

Reported by: g.esp <at> free.fr

Date: Thu, 25 Oct 2012 08:46:01 UTC

Severity: normal

Tags: fixed

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jim Meyering <jim <at> meyering.net>
To: g.esp <at> free.fr
Cc: 12730 <at> debbugs.gnu.org
Subject: bug#12730: coreutils-8.20: FAIL: tests/du/bind-mount-dir-cycle.sh
Date: Thu, 25 Oct 2012 18:22:21 +0200
g.esp <at> free.fr wrote:
> ----- Mail original -----
>> De: "Jim Meyering" <jim <at> meyering.net>
>> À: "g esp" <g.esp <at> free.fr>
>> Cc: 12730 <at> debbugs.gnu.org
>> Envoyé: Jeudi 25 Octobre 2012 14:19:12
>> Objet: Re: bug#12730: coreutils-8.20: FAIL: tests/du/bind-mount-dir-cycle.sh
>>
> ...
>>
>> Thanks for the patch, but at least for now, it seems to me like
>> that test is failing because your chroot is improperly configured.
>> I.e., when your system configuration makes it impossible to obtain
>> a list of mount points using a relatively standard API, a failing
>> test serves as a heads up.
>>
>
> I fixed anything unusual in my setup and run the last long-term
> kernel, so the chroot is now almost very clean.
>
> The line in /etc/mtab that let hash.c take a different code path is
> rootfs / rootfs rw 0 0

You wrote this:

  chroot-i486] root:/usr/src/coreutils-8.20$ rm -f /etc/mtab
  [chroot-i486] root:/usr/src/coreutils-8.20$ ln -sf /proc/mounts /etc/mtab
  [chroot-i486] root:/usr/src/coreutils-8.20$ mount --bind a a/b
  [chroot-i486] root:/usr/src/coreutils-8.20$ du a
  du: mount point 'a/b' already traversed
  4       a

  [chroot-i486] root:/usr/src/coreutils-8.20$ umount a/b
  [chroot-i486] root:/usr/src/coreutils-8.20$ rm -f /etc/mtab
  [chroot-i486] root:/usr/src/coreutils-8.20$ grep ' / ' /proc/mounts >/etc/mtab
  [chroot-i486] root:/usr/src/coreutils-8.20$ mount --bind a a/b
  [chroot-i486] root:/usr/src/coreutils-8.20$ du a
  du: WARNING: Circular directory structure.
  This almost certainly means that you have a corrupted file system.
  NOTIFY YOUR SYSTEM MANAGER.
  The following directory is part of the cycle:
    'a/b'

  4       a

Does the latter mount command arrange to add a line to the
one-line (root-only) /etc/mtab ?

To me, it looks like the *lack* of a line for the a/b mount
is the problem.  When you remove the symlink the mount command
does not update the regular-file /etc/mtab, so mount-listing
code cannot see that a/b is bind-mounted.

> I have no issue removing that line in my chroot.
>
> Is that rootfs line forbidden now?




This bug report was last modified 6 years and 223 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.