Bug#639897: Please don't check /proc/mounts
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).
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).
Furthermore, I cannot reproduce this at all. What might be helpful
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).
--
Julian Andres Klode - Debian Developer, Ubuntu Member
See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.
Reply to: