[Bug 307183] Re: poldek leaks fds with packages.ndir.dscr.gz

Elan Ruusamäe glen at delfi.ee
Thu Feb 18 13:19:13 CET 2010


You just need to find yourself very outdated poldek indexes to
reproduce.

$ grep -c Applying poldek-leak.log
544


** Attachment added: "poldek-leak.log"
   http://launchpadlibrarian.net/39360159/poldek-leak.log

-- 
poldek leaks fds with packages.ndir.dscr.gz
https://bugs.launchpad.net/bugs/307183
You received this bug notification because you are subscribed to PLD
Linux.

Status in poldek: New
Status in PLD Linux Distribution: New

Bug description:
attached obfuscated output of:
$ valgrind --track-fds=yes poldek --up

additionally poldek should close fds before invoking subprocess.
such wrapper could be useful all over the code:

16:34:10 @jbj>     fdno = open(path, flags, mode);
16:34:10 @jbj>     if (fdno < 0) return NULL;
16:34:10 @jbj>     if (fcntl(fdno, F_SETFD, FD_CLOEXEC)) {
16:34:10 @jbj>         (void) close(fdno);
16:34:11 @jbj>         return NULL;
16:34:11 @jbj>     }




More information about the pld-bugs mailing list