Subject: Re: bug#14767: du -s reports Infinity

From: Marek Otahal <[email-masked]>
Date: Tue, 2 Jul 2013 22:26:51 +0200

Ok, I tracked it down a little.

The 'Infinity' is correctly inherited from subfolders all the way up, it
boils down to a single .xml file, which claims to be 16 exabytes, it
obviously isn't :)

$file .. on the file is correct and says 'data',
$vim can open it and shows some binary... (binary in .xml?)

The FS is btrfs (with lzo compression), no failures noticed, nothing
interesting in dmesg.

Follows the strace on the offending file,
Thanks, Mark

$ du -s ~
+ du -s /home/XXXX
Infinity        /home/XXXX
++ printf '\033]0;%s@%s:%s\007' XXXX beruska '~'
[XXXX@beruska ~]$ set +x
+ set +x
[XXXX@beruska ~]$ du -s ~
Infinity        /home/XXXX
[XXXX@beruska ~]$ du
.kde4/share/apps/kopete/logs/JabberProtocol/XXXX-XXXX@chat-facebook-com
/[email-masked]
18014398509481976
.kde4/share/apps/kopete/logs/JabberProtocol/XXXX-XXXX@chat-facebook-com
/[email-masked]
[XXXX@beruska ~]$ du -h
.kde4/share/apps/kopete/logs/JabberProtocol/XXXX-XXXX@chat-facebook-com
/[email-masked]
16E
.kde4/share/apps/kopete/logs/JabberProtocol/XXXX-XXXX@chat-facebook-com
/[email-masked]
[XXXX@beruska ~]$ strace du
.kde4/share/apps/kopete/logs/JabberProtocol/XXXX-XXXX@chat-facebook-com
/[email-masked]
execve("/usr/bin/du", ["du", ".kde4/share/apps/kopete/logs/Jab"...], [/* 58
vars */]) = 0
brk(0)                                  = 0x20d6000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=244700, ...}) = 0
mmap(NULL, 244700, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f9a442bf000
close(3)                                = 0
open("/usr/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0
\33\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=2035252, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f9a442be000
mmap(NULL, 3852848, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7f9a43d2d000
mprotect(0x7f9a43ed0000, 2097152, PROT_NONE) = 0
mmap(0x7f9a440d0000, 24576, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1a3000) = 0x7f9a440d0000
mmap(0x7f9a440d6000, 14896, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f9a440d6000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f9a442bd000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f9a442bc000
arch_prctl(ARCH_SET_FS, 0x7f9a442bd700) = 0
mprotect(0x7f9a440d0000, 16384, PROT_READ) = 0
mprotect(0x619000, 4096, PROT_READ)     = 0
mprotect(0x7f9a442fb000, 4096, PROT_READ) = 0
munmap(0x7f9a442bf000, 244700)          = 0
brk(0)                                  = 0x20d6000
brk(0x20f7000)                          = 0x20f7000
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2215504, ...}) = 0
mmap(NULL, 2215504, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f9a43b10000
close(3)                                = 0
open("/etc/mtab", O_RDONLY|O_CLOEXEC)   = 3
fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f9a442fa000
read(3, "rootfs / rootfs rw 0 0\nproc /pro"..., 1024) = 1024
read(3, "odev,noexec,relatime,memory 0 0\n"..., 1024) = 1024
read(3, "s=lzo,ssd,space_cache,inode_cach"..., 1024) = 573
read(3, "", 1024)                       = 0
close(3)                                = 0
munmap(0x7f9a442fa000, 4096)            = 0
stat("/", {st_mode=S_IFDIR|0555, st_size=202, ...}) = 0
stat("/dev", {st_mode=S_IFDIR|0755, st_size=3480, ...}) = 0
stat("/run", {st_mode=S_IFDIR|0755, st_size=700, ...}) = 0
stat("/", {st_mode=S_IFDIR|0555, st_size=202, ...}) = 0
stat("/sys/kernel/security", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
stat("/dev/shm", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=40, ...}) = 0
stat("/sys/fs/cgroup", {st_mode=S_IFDIR|0755, st_size=240, ...}) = 0
brk(0x2118000)                          = 0x2118000
stat("/sys/fs/cgroup/systemd", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
stat("/sys/fs/pstore", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
stat("/sys/fs/cgroup/cpuset", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
stat("/sys/fs/cgroup/cpu,cpuacct", {st_mode=S_IFDIR|0755, st_size=0, ...})
= 0
stat("/sys/fs/cgroup/memory", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
stat("/sys/fs/cgroup/devices", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
stat("/sys/fs/cgroup/freezer", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
brk(0x213b000)                          = 0x213b000
stat("/sys/fs/cgroup/net_cls", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
stat("/sys/fs/cgroup/blkio", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
stat("/proc/sys/fs/binfmt_misc", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
stat("/sys/kernel/config", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
stat("/dev/hugepages", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
stat("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=540, ...}) = 0
stat("/boot", {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
brk(0x215e000)                          = 0x215e000
stat("/boot/efi", {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
stat("/var", {st_mode=S_IFDIR|0755, st_size=106, ...}) = 0
stat("/home", {st_mode=S_IFDIR|0555, st_size=40, ...}) = 0
stat("/mnt/win8", {st_mode=S_IFDIR|0755, st_size=65536, ...}) = 0
stat("/mnt/ubuntu", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/mnt/store", {st_mode=S_IFDIR|0755, st_size=198, ...}) = 0
stat("/run/user/1000/gvfs", {st_mode=S_IFDIR|0500, st_size=0, ...}) = 0
brk(0x2181000)                          = 0x2181000
newfstatat(AT_FDCWD,
".kde4/share/apps/kopete/logs/JabberProtocol/XXXX-XXXX@chat-facebook-com
/[email-masked]", {st_mode=S_IFREG|0644, st_size=2576,
...}, AT_SYMLINK_NOFOLLOW) = 0
fstat(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 13), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f9a442fa000
write(1, "18014398509481976\t.kde4/share/ap"..., 13618014398509481976
.kde4/share/apps/kopete/logs/JabberProtocol/XXXX-XXXX@chat-facebook-com
/[email-masked]
) = 136
close(1)                                = 0
munmap(0x7f9a442fa000, 4096)            = 0
close(2)                                = 0
exit_group(0)                           = ?
+++ exited with 0 +++

On Tue, Jul 2, 2013 at 6:47 PM, Paul Eggert <[email-masked]> wrote:

> On 07/02/13 03:35, Marek Otahal wrote:
> > $ du -s ~
>
> What's the relevant output of 'strace du -s ~'?
>

-- 
Marek Otahal :o)