libesd leaks pipe file descriptors
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
esound (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Gutsy |
Fix Released
|
Undecided
|
desrt |
Bug Description
my sister has been using her shiny new ubuntu system
i'm not sure what she does with it exactly, but after a while she gets "too many open files!" messages from nautilus
i tracked the problem down. pitti made an ubuntu vendor patch to esound to have it check for non-existent /usr/bin/esd and bypass a bunch of spawning code if it's not there.
unfortunately he also had it bypass the code to close the pipe file descriptors that had already been opened by this point.....
it's a pretty simple fix. will attach.
TEST CASE:
1) ensure that "Enable software sound mixing (ESD)" checkbox is enabled in "Sound Preferences" (this is the default)
2) ensure that the 'esound' package is not installed (this is also the default)
3) ensure "preview sound files" is enabled in nautilus preferences (also the default)
3) open a terminal
4) $ cd /proc/`pidof nautilus`/fd
5) 'ls' and notice a small number of 'pipe' entries
6) open a folder with a bunch of ogg vorbis files in it and move the mouse around a lot, moving over top of various sound files (as if you would when you are trying to preview them).
7) 'ls' again and notice that the number of 'pipe' entries has increased
8) notice that once nautilus has 1024 open file descriptors further attempts to open folders (or anything else) in nautilus will fail.
This bug was fixed in the package esound - 0.2.38-0ubuntu6
---------------
esound (0.2.38-0ubuntu6) hardy; urgency=low
* esdlib.c: The previous patch leaks pipe file descriptors in the case
that /usr/bin/esd doesn't exist. Fix that bug by only opening the
pipes after we know that the esd executable exists (LP: #183411).
-- Ryan Lortie <email address hidden> Tue, 15 Jan 2008 22:08:19 -0500