Your message dated Sat, 3 Dec 2005 10:35:35 -0700
with message-id <[EMAIL PROTECTED]>
and subject line Bug#247131: /usr/bin/du: du can't count
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 3 May 2004 13:13:22 +0000
>From [EMAIL PROTECTED] Mon May 03 06:13:21 2004
Return-path: <[EMAIL PROTECTED]>
Received: from webbox24.server-home.net [195.137.212.20] 
        by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
        id 1BKdG5-0008U0-00; Mon, 03 May 2004 06:13:21 -0700
Received: from gandalf.local (dsl-082-082-061-150.arcor-ip.net [82.82.61.150])
        by webbox24.server-home.net (Postfix) with ESMTP id 5130BF36BD
        for <[EMAIL PROTECTED]>; Mon,  3 May 2004 15:13:15 +0200 (CEST)
Received: from gimli.local ([192.168.3.2])
        by gandalf.local with esmtp (Exim 3.35 #1)
        id 1BKdG2-00019K-00; Mon, 03 May 2004 15:13:18 +0200
Received: from wh by gimli.local with local (Exim 3.35 #1 (Debian))
        id 1BKdG1-0003Gs-00; Mon, 03 May 2004 15:13:17 +0200
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Walter Hofmann <[EMAIL PROTECTED]>
To: Debian Bug Tracking System <[EMAIL PROTECTED]>
Subject: /usr/bin/du: du can't count
X-Mailer: reportbug 2.58
Date: Mon, 03 May 2004 15:13:17 +0200
Message-Id: <[EMAIL PROTECTED]>
X-BadReturnPath: [EMAIL PROTECTED] rewritten as [EMAIL PROTECTED]
  using "From" header
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-5.8 required=4.0 tests=BAYES_00,FROM_ENDS_IN_NUMS,
        HAS_PACKAGE autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 
X-CrossAssassin-Score: 1

Package: coreutils
Version: 5.0.91-2
Severity: normal
File: /usr/bin/du

du displays the wrong size for the directory after /proc when called with 
multiple 
directories as arguments.

Look at the example below. /root has around 3MB, but du says it has 773 when 
/proc is
immediately before /root in the command line. This also works with other 
directories;
du will display 770MB more than the directory actually has.
Incidently, 770MB is approximately the amount of memory in my computer. The 
largest 
file in /proc is /proc/kcore with 768MB. It seems that du doesn't reset its 
counter when
it fails in /proc and continues in /root.

Also, the error message is wrong, proc DOES exist.
The error doesn't depend on the -x or -m switch.


[EMAIL PROTECTED]:/# du -smx root
3       root
[EMAIL PROTECTED]:/# du -smx proc root
du: `proc': No such file or directory
773     root
[EMAIL PROTECTED]:/# du -smx idontexist root
du: `idontexist': No such file or directory
3       root
[EMAIL PROTECTED]:/# ll -d root proc idontexist
ls: idontexist: No such file or directory
dr-xr-xr-x  154 root     root            0 May  3 00:53 proc
drwxr-xr-x   23 root     root         4096 May  3 14:41 root
[EMAIL PROTECTED]:/# mount
/dev/hda3 on / type ext3 (rw)
proc on /proc type proc (rw)


An strace of "du -smx proc root" shows that du is actually scanning /proc, 
and fails when it tries to open /proc/4275/task/ which is listed but doesn't 
exist:

[EMAIL PROTECTED]:/# ll /proc/4275/
ls: cannot read symbolic link /proc/4275/cwd: No such file or directory
ls: cannot read symbolic link /proc/4275/root: No such file or directory
ls: cannot read symbolic link /proc/4275/exe: No such file or directory
total 0
-r--------    1 root     root            0 May  3 15:09 auxv
-r--r--r--    1 root     root            0 May  3 15:07 cmdline
lrwxrwxrwx    1 root     root            0 May  3 15:09 cwd
-r--------    1 root     root            0 May  3 15:09 environ
lrwxrwxrwx    1 root     root            0 May  3 15:09 exe
dr-x------    2 root     root            0 May  3 15:09 fd
-r--r--r--    1 root     root            0 May  3 15:09 maps
-rw-------    1 root     root            0 May  3 15:09 mem
-r--r--r--    1 root     root            0 May  3 15:09 mounts
lrwxrwxrwx    1 root     root            0 May  3 15:09 root
-r--r--r--    1 root     root            0 May  3 15:07 stat
-r--r--r--    1 root     root            0 May  3 15:09 statm
-r--r--r--    1 root     root            0 May  3 15:07 status
dr-xr-xr-x    3 root     root            0 May  3 14:51 task
-r--r--r--    1 root     root            0 May  3 15:09 wchan
[EMAIL PROTECTED]:/# ll /proc/4275/task/
ls: /proc/4275/task/: No such file or directory

4275 is the pid of a zombie process.

Weird bug, but annoying because it makes "du -smx /*" unreliable.



-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.3
Locale: LANG=C, LC_CTYPE=C (ignored: LC_ALL set to [EMAIL PROTECTED])

Versions of packages coreutils depends on:
ii  libacl1                     2.2.23-1     Access control list shared library
ii  libattr1                    2.4.16-1     Extended attribute shared library
ii  libc6                       2.3.2.ds1-12 GNU C Library: Shared libraries an

-- no debconf information

---------------------------------------
Received: (at 247131-done) by bugs.debian.org; 3 Dec 2005 17:35:36 +0000
>From [EMAIL PROTECTED] Sat Dec 03 09:35:36 2005
Return-path: <[EMAIL PROTECTED]>
Received: from joseki.proulx.com ([216.17.153.58])
        by spohr.debian.org with esmtp (Exim 4.50)
        id 1EibIN-0004zV-Uz
        for [EMAIL PROTECTED]; Sat, 03 Dec 2005 09:35:36 -0800
Received: from dementia.proulx.com (dementia.proulx.com [192.168.1.115])
        by joseki.proulx.com (Postfix) with ESMTP id 73CC84B3EA;
        Sat,  3 Dec 2005 10:35:35 -0700 (MST)
Received: by dementia.proulx.com (Postfix, from userid 1000)
        id 5870F218E4F; Sat,  3 Dec 2005 10:35:35 -0700 (MST)
Date: Sat, 3 Dec 2005 10:35:35 -0700
To: Peter Eisentraut <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
Subject: Re: Bug#247131: /usr/bin/du: du can't count
Message-ID: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <[EMAIL PROTECTED]>
User-Agent: Mutt/1.5.9i
From: [EMAIL PROTECTED] (Bob Proulx)
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
        autolearn=no version=2.60-bugs.debian.org_2005_01_02

Walter Hofmann wrote:
> du displays the wrong size for the directory after /proc when called
> with multiple directories as arguments.

Jim Meyering wrote:
> Thank you for the fine bug report.
> FYI, since then, du has undergone a major overhaul.
> That bug is fixed upstream...[in 5.2.1]

Peter Eisentraut wrote:
> I verified that this is fixed in 5.2.1.

Thanks for doing that work and verifying the fix.  I agree.  I am
closing the bug.

Bob


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to