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

Bug#639897: Please don't check /proc/mounts



Hi,

On Wed, Aug 31, 2011 at 16:38, Julian Andres Klode <jak@debian.org> wrote:
> On Wed, Aug 31, 2011 at 03:20:13PM +0200, Sandro Tosi wrote:
>> Package: apt
>> Version: 0.8.10.3
>> Severity: normal
>>
>> Hello,
>> I found this behavior:
>>
>> # apt-get --version | head -n1
>> apt 0.8.10.3 for amd64 compiled on Apr 15 2011 07:35:31
>> # strace apt-get autoremove 2>&1 | grep mounts
>> open("/proc/mounts", O_RDONLY)          = 22
>>
>> (it also happens on the sid vrsion).
>>
>> This poses a problem when a system has a lot of mounts and so /proc/mounts is
>> really big.
>>
>> I remember I had fixed a similar behavior on lenny by upgrading libselinux1 to
>> the squeeze versions, but now I'm on squeeze and I see it again, and I don't
>> see a trace of libselinux be linked into apt.
> It's not APT either, APT wants to read /etc/mtab and then /proc/mount because
> cdromutl.cc misses the "s". The complete source code does not contain the
> word "mounts", but that's a different bug (and once fixed, makes this bug
> apply to APT itself, instead of something APT uses).

Ehm... I don't think I can parse this paragraph :)

> While we need to find the mount point of a device something and might do
> something like this when using the cdrom acquire method, this specific
> case is not caused by APT itself, but rather by a lower library,
> as far as I can tell (the cdrom method is a child process and thus
> not catched by strace anyway, so it's not what you got).

I probably agree here, but I can only exploit this behavior with apt,
that's what weird.

> Furthermore, I cannot reproduce this at all. What might be helpful

Oh really? I had no problem seeing this on our squeeze servers and on
my sid workstation, and I don't think I did anything unusual.

> would be a backtrace for the open call, so we know why it
> happens (ltrace -S e.g. traces both library and system calls, and
> with -C you get readable C++ names).

I've run ltrace with -S -C options on "apt-get autoremove" on my sid
workstation, and you can find the (big) output at [1].

[1] http://people.debian.org/~morph/639897_ltrace_S_C.out.bz2

Regards,
-- 
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi



Reply to: