Subject: bug#16189: closed (Re: bug#17833: coreutils 8.22 df)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 09 Jul 2014 10:07:03 +0000

Your bug report

#16189: FAIL: tests/du/bind-mount-dir-cycle --- patch attached

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
16189: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16189
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#17833: coreutils 8.22 df
From: Pádraig Brady <[email-masked]>
To: "Gabor Z. Papp" <[email-masked]>
Cc: [email-masked], [email-masked], Andrew D Warshall <[email-masked]>, bug-gnulib <[email-masked]>
Date: Wed, 09 Jul 2014 11:06:13 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

On 07/09/2014 10:18 AM, Pádraig Brady wrote:
> Apologies for resend. GNU mailers were having issues yesterday...
> 
> On 06/25/2014 01:24 PM, Gabor Z. Papp wrote:
>> * Pádraig Brady <[email-masked]>:
>>
>> | > $ cat /etc/mtab 
>> | > /dev/md0 / ext3 rw,errors=remount-ro 0 0
>> | > proc /proc proc rw,relatime 0 0
>> | > sysfs /sys sysfs rw,relatime 0 0
>> | > tmpfs /dev tmpfs rw,relatime,size=4k,mode=755 0 0
>> | > devpts /dev/pts devpts rw,relatime,mode=620 0 0
>> | > /dev/md1 /var/archive ext3 rw,errors=remount-ro 0 1
>> | > /var/archive/home /home none rw,bind 0 0
>> | > /var/archive/spool /var/spool none rw,bind 0 0
>> | > /var/archive/www /var/lib/www none rw,bind 0 0
>>
>> | Is this mtab really a link to /proc/mounts?
>>
>> No, its a standalone file.
>>
>> | That's the normal case on modern Linux distros.
>>
>> Its not a modern linux. :-)
>>
>> | > $ df-8.22 -h
>> | > Filesystem      Size  Used Avail Use% Mounted on
>> | > /dev/md0         21G  8.8G   11G  46% /
>> | > tmpfs           4.0K     0  4.0K   0% /dev
>> | > 
>> | > And where is /dev/md1 ?
>>
>> | Not sure what's going on here.
>> | Since you've compiled various versions,
>> | could you replace src/df.c in your 8.22 build dir with:
>> | http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=blob_plain;f=src/df.c;hb=HEAD
>> | There have been many df changes since 8.22, so it would
>> | be good to check with the latest.
>>
>> $ /tmp/df-git -h
>> Filesystem      Size  Used Avail Use% Mounted on
>> /dev/md0         21G  9.0G   11G  47% /
>> tmpfs           4.0K     0  4.0K   0% /dev
>>
>> Same problem, /dev/md1 missing.
> 
> The missing entry is due to the bind mounts being classified as "dummy" devices.
> There is code in gnulib to explicitly avoid that for bind mounts,
> however that was negated with this change:
> http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=62bb7a8b
> Now that change is correct in isolation, but when combined
> with the incomplete original change, it triggered the issue.
> The attached patch should fix this up.

Actually this was the cause of another bug wrt bind mounts in du.
Andrew had identified the issue independently, so I'm applying this
in this name now and marking http://bugs.gnu.org/16189 as done

thanks,
Pádraig.

Subject: FAIL: tests/du/bind-mount-dir-cycle --- patch attached
From: Andrew Warshall <[email-masked]>
To: [email-masked]
Date: Wed, 18 Dec 2013 20:43:37 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi-

   I'm resending this since it didn't seem to go through the first
   time; also, I think I have a solution.

   This test fails on my system (Linux 3.7.10 kernel, glibc-2.17);
   apparently "du a" is giving as output :

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'

   instead of the expected

du: mount point 'a/b' already traversed

   Apparently, ./configure is assuming I don't have hasmntopt(), which
   has become an issue because lib/mountlist.c now protects hasmntopt()
   with #defines

   I've attached a patch, but I don't have autoconf; so someone who
   does should test it before committing it.

                            Yours,

                            Andrew Warshall