[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#219271: libc6 - statvfs broken



Package: libc6
Version: 2.3.2.ds1-9
Tags: sid

Hi,

The .ds1 versions of libc6 broke something, presumably in statvfs().

I have a remote (stable, 2.4.something) system with an unstable chroot on
it. Inside that chroot only a nfs share is mounted, nothing else. Up to
last week all worked fine; however since last time I updated the chroot
libc6 got upgraded to .ds1-8. When I tried updating the chroot again today
apt-get hung where it should prompt me to continue (i.e., after listing
what it was about to do).
Then I unmounted the nfs share, but to no effect - apt-get still hung.
Nothing was mounted (inside the chroot) anymore at that point.

I fiddled around a bit, with little success, until I mounted /proc to be
able to run ps without having to drop out of the chroot. When I stupidly
ran apt-get next, it suddenly worked. Unmounted /proc, hung again.

I ran strace and ltrace on an apt-get invocation next. The strace output
shows that apt-get opens /etc/mtab, then gets into an infinite loop:

...
write(1, "Need to get 8671kB/9020kB of arc"..., 39) = 39
write(1, "After unpacking 26.0MB of additi"..., 62) = 62
statfs("/var/cache/apt/archives/", {f_type="EXT2_SUPER_MAGIC", f_bsize=4096, f_blocks=9376915, f_bfree=3701352, f_bavail=3225026, f_files=4767744, f_ffree=4227550, f_fsid={0, 0}, f_namelen=255, f_frsize=0}) = 0
stat64("/var/cache/apt/archives/", {st_mode=S_IFDIR|0755, st_size=135168, ...}) = 0
open("/proc/mounts", O_RDONLY)          = -1 ENOENT (No such file or directory)
open("/etc/mtab", O_RDONLY)             = 15
fstat64(15, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40019000
read(15, "", 4096)                      = 0
_llseek(15, 0, [0], SEEK_SET)           = 0
read(15, "", 4096)                      = 0
_llseek(15, 0, [0], SEEK_SET)           = 0
read(15, "", 4096)                      = 0
_llseek(15, 0, [0], SEEK_SET)           = 0

(repeated several thousand times)

read(15, "", 4096)                      = 0
_llseek(15, 0, [0], SEEK_SET)           = 0
--- SIGINT (Interrupt) @ 0 (0) ---
+++ killed by SIGINT +++


Note that opening /proc/mounts is tried before mtab, which is supposedly
why things work when /proc is mounted (altough it's curious that it does
not loop then).
Note also that currently mtab is empty, but it hardly matters. After
mounting the nfs share again, it reads a number of bytes, stat64()s the
nfs mount point as it does with /var/cache/apt/archives/ now, does another
read() with 0 result as happens above too, and then there's the _llseek()
and things start all over again. (Would the _llseek() be the culprit?)

Running from within ltrace rather than strace gives this as final output:

...
dcgettext(0, 0x08060e60, 5, 0x0806989c, 0xbfffef40)                            = 0x08060e60
_Z8ioprintfRSoPKcz(0x08065c20, 0x08060e60, 0x0806989c, 0x0806989c, 0xbfffef40) = 0x08065c20
_ZNSs4_Rep10_M_destroyERKSaIcE(0x08069890, 0xbffff460, 0x0806989c, 0x0806989c, 0xbfffef40) = 0
_Z12_GetErrorObjv(0x08069890, 0xbffff460, 0x0806989c, 0x0806989c, 0xbfffef40)  = 0x08068e40
_ZNK13Configuration5FindBEPKcb(0x080660e0, 0x0805fc30, 0, 0x0806989c, 0xbfffef40) = 0
_ZNK13Configuration5FindBEPKcb(0x080660e0, 0x0805fc4b, 1, 0x0806989c, 0xbfffef40) = 1
_ZNK13Configuration7FindDirEPKcS1_(0xbffff440, 0x080660e0, 0x0805fd03, 0, 0xbfffef40) = 0xbffff440
statvfs(0x08069484, 0xbfffef30, 0x0805fd03, 0, 0xbfffef40 <unfinished ...>
--- SIGINT (Interrupt) ---
+++ killed by SIGINT +++


Hence my assumption to blame statvfs().

I downgraded to 2.3.2-9 from snapshot.debian.net; this version worked both
with and without /proc being mounted.


Regards,

Filip

-- 
Evil Overlord Quote of the Day:
150.I will provide funding and research to develop tactical and strategic
weapons covering a full range of needs so my choices are not limited to
"hand to hand combat with swords" and "blow up the planet".



Reply to: