Bug#299051: exim4+libnss-ldap: Loops infinitely on startup

Florian Weimer Florian Weimer <fw@deneb.enyo.de>, 299051@bugs.debian.org
Fri, 11 Mar 2005 20:59:06 +0100


* Antonio Kanouras:

> FW> > Debian-Installer (see #297607). So we have patched exim to close
> FW> > all fds on startup (debian/patches/10_daemon_close_fds.dpatch) for
> FW> > ages.
> FW> 
> FW> Antonio, could you try and see what happens if you back out this
> FW> patch?
>
> I'm leaving for my home city in a few minutes so I won't be able to
> check this out until tomorrow.
>
> Meanwhile, check:
>
> http://solistland.dnsalias.org/debian-bugs/299051/strace.out.bz2

Okay, from this strace it's pretty clear that the mass-closing of file
descriptors happens *after* the LDAP library has opened its connection
to the server.  D'oh.

The patch is the wrong approach anyway.  If there is a file descriptor
leak, it should be plugged.  If it can't be plugged, use a wrapper
instead.  Marc?

> http://solistland.dnsalias.org/debian-bugs/299051/ltrace.out.bz2
>
> for the full strace & ltrace output, respectively.
>
> What seems really weird to me is:
> [...]
> getpwuid(0, 0x8103b70, 0x8137b98, 0x8103b80, 37) = 0xb7c8de9c

ltrace probably doesn't know anything about getpwuid().  Its ruleset
is not really complete, unlike that of strace.