You are not logged in.

#1 2012-03-07 22:46:50

ViruSzZ
Member
From: The Streets
Registered: 2010-10-14
Posts: 202
Website

[BUG in coreutils-8.15] - Wierd 'du' behavior on my server ...

Suddenly, today I needed to know what's the size of the backup tars from my linux-vserver based vps running fully up-to-date arch linux and I can't seem to find out why 'du' is acting like this.

┌─[23:39:09]-[root@stavrovski]-[~]
└─› du -csxh /tmp/*
6.8M    /tmp/CI
11M     /tmp/CI_BEFORE_SED
6.8M    /tmp/CI_w-o_mce
4.0K    /tmp/cron.fAq4LB
4.0K    /tmp/cron.ppna3r
4.0K    /tmp/cron.R3GV1t
4.0K    /tmp/cron.xDo4yg
4.0K    /tmp/hsperfdata_root
1.3M    /tmp/knobs
56M     /tmp/packerbuild-0
20K     /tmp/packertmp-0
8.0K    /tmp/screens
12K     /tmp/test
4.0K    /tmp/yaourt-tmp-d
4.0K    /tmp/yaourt-tmp-root
81M     total
┌─[23:39:23]-[root@stavrovski]-[~]
└─› du -csxh /media/tars/
1.7G    /media/tars/
1.7G    total

┌─[23:39:44]-[root@stavrovski]-[~]
└─› du -csxh /media/tars/*
0       total

┌─[23:39:48]-[root@stavrovski]-[~]
└─› ls -1 /media/tars/|wc -l
40

So, there are not that much files for du to return total zero. And this only happens to be happening to the '/media/tars' directory. Really strange.

┌─[23:43:26]-[root@stavrovski]-[~]
└─› du -csxh /media/*
37M     /media/backups

4.6G    /media/gentoo
1.7G    /media/tars
6.3G    total

Can somebody tell what may be going on out here?

Thanks

EDIT: I ran 'strace' and got lines for each file within that directory that looks like this:

fstatat64(AT_FDCWD, "/media/tars/root-archlinux_29_Feb_2012.tar.gz", {st_mode=S_IFREG|0644, st_size=11314753, ...}, AT_SYMLINK_NOFOLLOW) = 0

Is something wrong on my end or what exactly that means? Google did not clarify this enough for me.

EDIT: Edited the subject to be more relevant to the issue.

Last edited by ViruSzZ (2012-03-09 01:24:30)


Their Momma Made Em, Their Momma Gave em & now she can`t even SAVE`em | My WebLog

Offline

#2 2012-03-07 23:20:48

ViruSzZ
Member
From: The Streets
Registered: 2010-10-14
Posts: 202
Website

Re: [BUG in coreutils-8.15] - Wierd 'du' behavior on my server ...

Further investigation showed that this is not happening with coreutils-8.14-1. I have installed 8.15-1 by running Syu on 2012-02-25 and after downgrading it to 8.14 'du' is working as expected.

┌─[00:14:41]-[root@stavrovski]-[~]
└─› du -csxh /media/tars/*
1.1M    /media/tars/etc-archlinux_01_Mar_2012.tar.gz
1.1M    /media/tars/etc-archlinux_02_Mar_2012.tar.gz
1.1M    /media/tars/etc-archlinux_03_Mar_2012.tar.gz
1.2M    /media/tars/etc-archlinux_04_Mar_2012.tar.gz
1.2M    /media/tars/etc-archlinux_05_Mar_2012.tar.gz
1.2M    /media/tars/etc-archlinux_06_Mar_2012.tar.gz
1.2M    /media/tars/etc-archlinux_07_Mar_2012.tar.gz
992K    /media/tars/etc-archlinux_27_Feb_2012.tar.gz
1008K   /media/tars/etc-archlinux_28_Feb_2012.tar.gz
1.0M    /media/tars/etc-archlinux_29_Feb_2012.tar.gz
3.1M    /media/tars/mysqlbackup_01_Mar_2012.tar.gz
3.3M    /media/tars/mysqlbackup_02_Mar_2012.tar.gz
3.5M    /media/tars/mysqlbackup_03_Mar_2012.tar.gz
3.7M    /media/tars/mysqlbackup_04_Mar_2012.tar.gz
3.9M    /media/tars/mysqlbackup_05_Mar_2012.tar.gz
4.2M    /media/tars/mysqlbackup_06_Mar_2012.tar.gz
4.4M    /media/tars/mysqlbackup_07_Mar_2012.tar.gz
2.5M    /media/tars/mysqlbackup_27_Feb_2012.tar.gz
2.7M    /media/tars/mysqlbackup_28_Feb_2012.tar.gz
2.9M    /media/tars/mysqlbackup_29_Feb_2012.tar.gz
155M    /media/tars/public_html_01_Mar_2012.tar.gz
155M    /media/tars/public_html_02_Mar_2012.tar.gz
155M    /media/tars/public_html_03_Mar_2012.tar.gz
155M    /media/tars/public_html_04_Mar_2012.tar.gz
155M    /media/tars/public_html_05_Mar_2012.tar.gz
155M    /media/tars/public_html_06_Mar_2012.tar.gz
155M    /media/tars/public_html_07_Mar_2012.tar.gz
148M    /media/tars/public_html_27_Feb_2012.tar.gz
155M    /media/tars/public_html_28_Feb_2012.tar.gz
155M    /media/tars/public_html_29_Feb_2012.tar.gz
11M     /media/tars/root-archlinux_01_Mar_2012.tar.gz
11M     /media/tars/root-archlinux_02_Mar_2012.tar.gz
11M     /media/tars/root-archlinux_03_Mar_2012.tar.gz
11M     /media/tars/root-archlinux_04_Mar_2012.tar.gz
11M     /media/tars/root-archlinux_05_Mar_2012.tar.gz
11M     /media/tars/root-archlinux_06_Mar_2012.tar.gz
11M     /media/tars/root-archlinux_07_Mar_2012.tar.gz
11M     /media/tars/root-archlinux_27_Feb_2012.tar.gz
11M     /media/tars/root-archlinux_28_Feb_2012.tar.gz
11M     /media/tars/root-archlinux_29_Feb_2012.tar.gz
1.7G    total

and strace with codeutils-8.14-1 gives:

fstatat64(AT_FDCWD, "/media/tars/root-archlinux_29_Feb_2012.tar.gz", {st_mode=S_IFREG|0644, st_size=11314753, ...}, AT_SYMLINK_NOFOLLOW) = 0
write(1, "11M\t/media/tars/root-archlinux_2"..., 5011M  /media/tars/root-archlinux_29_Feb_2012.tar.gz

I don't know why is this happening though and 'stat /media/tars' shows that it's a simple directory with tarballs in it.

┌─[00:19:16]-[root@stavrovski]-[~]
└─› stat /media/tars/
  File: `/media/tars/'
  Size: 4096            Blocks: 8          IO Block: 4096   directory
Device: 807h/2055d      Inode: 6668599     Links: 2
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)

is this a bug in coreutils-8.15-1 or my vps is buggy?

Thanks


Their Momma Made Em, Their Momma Gave em & now she can`t even SAVE`em | My WebLog

Offline

#3 2012-03-07 23:50:33

djgera
Developer
From: Buenos Aires - Argentina
Registered: 2008-12-24
Posts: 723
Website

Re: [BUG in coreutils-8.15] - Wierd 'du' behavior on my server ...

Ask upstream.

A more simple case:

$ du -x REGULAR_FILE
$

Anyway -x is supposed to be used in directory arguments.

Offline

#4 2012-03-08 00:24:47

ViruSzZ
Member
From: The Streets
Registered: 2010-10-14
Posts: 202
Website

Re: [BUG in coreutils-8.15] - Wierd 'du' behavior on my server ...

Thanks for your input.

Anyhow, I can reproduce this and it __looks__ like a bug and the point is that I have never ever filled a bug report so this is going to be my first time I think o.O. (there always have to have a first time)

upgraded again to the latest version of coreutils and du is not playing nicely again.

┌─[01:17:15]-[root@stavrovski]-[~]
└─› mkdir /tmp/another_test/ && for i in $(seq 1 20); do dd if=/dev/zero of=/tmp/another_test/file-$i  bs=1024  count=10240 ; done

┌─[01:17:17]-[root@stavrovski]-[~]
└─› ls -1 /tmp/another_test/* | wc -l
20

┌─[01:17:36]-[root@stavrovski]-[~]
└─› du -csxh /tmp/another_test/*
0       total
┌─[01:23:13]-[root@stavrovski]-[~]
└─› ls -lah /tmp/another_test/*
-rw-r--r-- 1 root root 10M Mar  8 01:22 /tmp/another_test/file-1
-rw-r--r-- 1 root root 10M Mar  8 01:22 /tmp/another_test/file-10
-rw-r--r-- 1 root root 10M Mar  8 01:22 /tmp/another_test/file-11
-rw-r--r-- 1 root root 10M Mar  8 01:22 /tmp/another_test/file-12
-rw-r--r-- 1 root root 10M Mar  8 01:22 /tmp/another_test/file-13
-rw-r--r-- 1 root root 10M Mar  8 01:22 /tmp/another_test/file-14
-rw-r--r-- 1 root root 10M Mar  8 01:22 /tmp/another_test/file-15
-rw-r--r-- 1 root root 10M Mar  8 01:22 /tmp/another_test/file-16
-rw-r--r-- 1 root root 10M Mar  8 01:22 /tmp/another_test/file-17
-rw-r--r-- 1 root root 10M Mar  8 01:22 /tmp/another_test/file-18
-rw-r--r-- 1 root root 10M Mar  8 01:22 /tmp/another_test/file-19
-rw-r--r-- 1 root root 10M Mar  8 01:22 /tmp/another_test/file-2
-rw-r--r-- 1 root root 10M Mar  8 01:22 /tmp/another_test/file-20
-rw-r--r-- 1 root root 10M Mar  8 01:22 /tmp/another_test/file-3
-rw-r--r-- 1 root root 10M Mar  8 01:22 /tmp/another_test/file-4
-rw-r--r-- 1 root root 10M Mar  8 01:22 /tmp/another_test/file-5
-rw-r--r-- 1 root root 10M Mar  8 01:22 /tmp/another_test/file-6
-rw-r--r-- 1 root root 10M Mar  8 01:22 /tmp/another_test/file-7
-rw-r--r-- 1 root root 10M Mar  8 01:22 /tmp/another_test/file-8
-rw-r--r-- 1 root root 10M Mar  8 01:22 /tmp/another_test/file-9

Their Momma Made Em, Their Momma Gave em & now she can`t even SAVE`em | My WebLog

Offline

#5 2012-03-08 00:34:34

djgera
Developer
From: Buenos Aires - Argentina
Registered: 2008-12-24
Posts: 723
Website

Re: [BUG in coreutils-8.15] - Wierd 'du' behavior on my server ...

As I said, just one file is the minimal case with just -x as parameter. There is no need to specify multiple files.

You can send a simple mail asking if such thing is a bug to coreutils user ML.

Offline

#6 2012-03-08 00:48:41

ViruSzZ
Member
From: The Streets
Registered: 2010-10-14
Posts: 202
Website

Re: [BUG in coreutils-8.15] - Wierd 'du' behavior on my server ...

Ok, it's a habit of using du that way don't know why smile. Anyhow, I've just sent an email and will update here as soon as they'll update me smile.


Their Momma Made Em, Their Momma Gave em & now she can`t even SAVE`em | My WebLog

Offline

#7 2012-03-08 22:12:21

ViruSzZ
Member
From: The Streets
Registered: 2010-10-14
Posts: 202
Website

Re: [BUG in coreutils-8.15] - Wierd 'du' behavior on my server ...

To update on this, (i'm bit late as yesterday I engaged with my girlfriend and was //little?// drunk so needed to have a good sleep today.) it seems it is a bug in coreutils-8.15.

See => http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10967

Last edited by ViruSzZ (2012-03-08 22:27:33)


Their Momma Made Em, Their Momma Gave em & now she can`t even SAVE`em | My WebLog

Offline

#8 2012-03-08 23:58:51

djgera
Developer
From: Buenos Aires - Argentina
Registered: 2008-12-24
Posts: 723
Website

Re: [BUG in coreutils-8.15] - Wierd 'du' behavior on my server ...

Nice smile

Offline

#9 2012-03-09 01:17:58

ViruSzZ
Member
From: The Streets
Registered: 2010-10-14
Posts: 202
Website

Re: [BUG in coreutils-8.15] - Wierd 'du' behavior on my server ...

What needs to be done now? Should I implement the patch or the devs/tu should apply the patch and push an update of coreutils ?

Thanks

EDIT: The PKGBUILD says maintainer of coreutils is Allan so should I contact him to apply the patch or .....

Last edited by ViruSzZ (2012-03-09 01:20:26)


Their Momma Made Em, Their Momma Gave em & now she can`t even SAVE`em | My WebLog

Offline

#10 2012-03-09 01:23:15

djgera
Developer
From: Buenos Aires - Argentina
Registered: 2008-12-24
Posts: 723
Website

Re: [BUG in coreutils-8.15] - Wierd 'du' behavior on my server ...

File a bug report in our bug tracker wink

Offline

#11 2012-03-09 01:25:33

ViruSzZ
Member
From: The Streets
Registered: 2010-10-14
Posts: 202
Website

Re: [BUG in coreutils-8.15] - Wierd 'du' behavior on my server ...

djgera wrote:

File a bug report in our bug tracker wink

Thanks, Will do it immediately


Their Momma Made Em, Their Momma Gave em & now she can`t even SAVE`em | My WebLog

Offline

#12 2012-03-09 01:53:54

ViruSzZ
Member
From: The Streets
Registered: 2010-10-14
Posts: 202
Website

Re: [BUG in coreutils-8.15] - Wierd 'du' behavior on my server ...

Bug report triggered at https://bugs.archlinux.org/task/28833


Their Momma Made Em, Their Momma Gave em & now she can`t even SAVE`em | My WebLog

Offline

#13 2012-03-09 01:57:21

djgera
Developer
From: Buenos Aires - Argentina
Registered: 2008-12-24
Posts: 723
Website

Re: [BUG in coreutils-8.15] - Wierd 'du' behavior on my server ...

Assigned wink Thanks smile

Offline

Board footer

Powered by FluxBB