using module-udev-detect leaks memory

Bug #424655 reported by David Addley
286
This bug affects 48 people
Affects Status Importance Assigned to Milestone
pulseaudio (Fedora)
Fix Released
Medium
pulseaudio (Ubuntu)
Fix Released
High
Luke Yelavich
Karmic
Fix Released
High
Daniel T Chen
udev (Ubuntu)
Invalid
High
Unassigned
Karmic
Invalid
Undecided
Unassigned

Bug Description

--- SRU report follows ---
Impact: Users of Ubuntu 9.10 may experience a local denial of service condition where the PulseAudio daemon process(es) exhausts available memory. This is caused by the default-used module-udev-detect not properly freeing invalid udev contexts.

Fixed in 10.04: addressed in the latest Lucid source upload that contains the upstream fix

Minimal fix for 9.10: http://launchpadlibrarian.net/37963834/pulseaudio_0.9.19-0ubuntu4.1.debdiff

TEST CASE: On some configurations, this symptom is immediately triggerable. On others, it requires that the user choose a non-stereo multichannel profile in System > Preferences > Sound > Hardware > Profile

Regression potential: low -- the existing upstream fix has been well-tested in Daniel T Chen's PPA and only touches the relevant code in module-udev-detect. The existing workaround of using module-detect will not be affected.

--- Original report follows ---

Binary package hint: pulseaudio

Pulse audio routinely uses 2GB+ over the course of a few hours.

Description: Ubuntu karmic (development branch)
Release: 9.10

pulseaudio:
  Installed: 1:0.9.16~test6-3-g57e1-0ubuntu2
  Candidate: 1:0.9.16~test6-3-g57e1-0ubuntu2
  Version table:
 *** 1:0.9.16~test6-3-g57e1-0ubuntu2 0
        500 http://mirror.optus.net karmic/main Packages
        100 /var/lib/dpkg/status

I expect pulseaudio to continue to use a couple MB of memory, certainly less then 2GB.

After a few hours of listening to music and the odd youtube video pulseaudio ends up with 2GB+ of memory.

Revision history for this message
Daniel T Chen (crimsun) wrote :

You need to use the ~ubuntu-audio-dev PPA version until it enters main (likely next week, since it's the weekend).

Changed in pulseaudio (Ubuntu):
status: New → Incomplete
Revision history for this message
svaens (svaens) wrote :

Hi all,

Hi Daniel, This sounds like a pretty serious issue. Perhaps more information could be given to the submitter so that we can get this bug status changed back to new, or confirmed, or whatever it needs to be looked at?
Or did you mean by your last post there that this issue doesn't exist in the pulse audio version that will be used in the release version of Karmic Koala?

Thanks for any information on this one.

Revision history for this message
David Addley (addley-david) wrote :

Issue appears to have been fixed. Pulse audio now stays at ~ 5.6MB.

Revision history for this message
David Addley (addley-david) wrote :

Cancel that. Memory usage is climbing at a rate of about 1MB every 5 seconds.

Does anyone have a "typical" amount of memory that pulseaudio should be using?

Revision history for this message
Jeff Schroeder (sejeff) wrote :

This is a HUGE regression. I left a karmic desktop turned on overnight. In the morning I was trying to figure out why my computer was so slow. It turns out that pdflush was writing data to disk (swap) as fast as possible and was stuck in IO Wait (D state in ps aux). pulseaudio was taking almost 80% of my 8G of memory. Not cool.

19170 jeff 20 0 12.2g 6.2g 1464 S 0 79.9 14:35.83 /usr/bin/pulseaudio --start

This should be a release blocker.

Changed in pulseaudio (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 424655] Re: Pulse audio memory leak

Are you using the PPA?

On Oct 11, 2009 1:00 PM, "Jeff Schroeder" <email address hidden>
wrote:

This is a HUGE regression. I left a karmic desktop turned on overnight.
In the morning I was trying to figure out why my computer was so slow.
It turns out that pdflush was writing data to disk (swap) as fast as
possible and was stuck in IO Wait (D state in ps aux). pulseaudio was
taking almost 80% of my 8G of memory. Not cool.

19170 jeff 20 0 12.2g 6.2g 1464 S 0 79.9 14:35.83
/usr/bin/pulseaudio --start

This should be a release blocker.

** Changed in: pulseaudio (Ubuntu)
      Status: Incomplete => Confirmed

-- Pulse audio memory leak https://bugs.launchpad.net/bugs/424655 You
received this bug notificati...
Status in “pulseaudio” package in Ubuntu: Confirmed

Bug description:

Binary package hint: pulseaudio Pulse audio routinely uses 2GB+ over the
course of a few hours. D...

Revision history for this message
Jeff Schroeder (sejeff) wrote : Re: Pulse audio memory leak

No I'm not using the PPA. Should I be? It seems like if the ppa fixes the problem that the ppa packages should be put in main asap to get more visibility.

Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 424655] Re: Pulse audio memory leak

On Sun, Oct 11, 2009 at 3:07 PM, Jeff Schroeder
<email address hidden> wrote:
> No I'm not using the PPA. Should I be? It seems like if the ppa fixes
> the problem that the ppa packages should be put in main asap to get more
> visibility.

Yes, you should be testing it. That's why it's called staging for main. (:

Revision history for this message
Jeff Schroeder (sejeff) wrote : Re: Pulse audio memory leak

Alright I've upgraded to the ppa alsa and pulse packages. If the problem happens again I'll let you know.

Revision history for this message
Jeff Schroeder (sejeff) wrote :

I wrote this hack handy to see if pulse was still leaking memory and thought I'd share:
while true; do
    echo -n "$(date +'%m/%d/%Y %H:%M:%S - ')" >> pulse-audio-memleak.txt
    ps -o args=,rss= $(pgrep -f 'pulseaudio --start') >> pulse-audio-memleak.txt
    sleep 60
done

It seems that the ppa packages have fixed the bug. I'll know for sure tomorrow.
jeff@desktopmonster:~$ tail -f pulse-audio-memleak.txt
10/11/2009 12:52:26 - /usr/bin/pulseaudio --start 15164
10/11/2009 12:53:26 - /usr/bin/pulseaudio --start 14728
10/11/2009 12:54:26 - /usr/bin/pulseaudio --start 14960
10/11/2009 12:55:27 - /usr/bin/pulseaudio --start 15076
10/11/2009 12:56:27 - /usr/bin/pulseaudio --start 15228
10/11/2009 12:57:27 - /usr/bin/pulseaudio --start 15012
10/11/2009 12:58:27 - /usr/bin/pulseaudio --start 15244

Revision history for this message
Artyom (artyom-szasa) wrote :

Same here on release of Karmic (AMD64) with pulseaudio 1:0.9.19-0ubuntu4.
After 6 hours pulseaudio eats up 2,5 Gb of RAM:(

Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 424655] Re: Pulse audio memory leak

"pactl stat" should reveal some information

More than likely there's at least one misbehaved client.

Revision history for this message
Artyom (artyom-szasa) wrote : Re: Pulse audio memory leak

now my laptop as running for about 5 hours and pulseaudio has already eaten up 1,3 Gb..
"pactl stat" writes next:
"artyom@artyom-laptop:~$ pactl stat
Jelenleg lefoglalt blokkok száma: 10, amely összesen 146,6 KiB bájtot jelent.
A futás során összesen lefoglalt blokkok száma: 116516, amely összesen 1,3 GiB bájtot jelent.
Minta-gyorsítótár mérete: 0 B
Felhasználónév: artyom
Számítógépnév: artyom-laptop
Kiszolgálónév: pulseaudio
Kiszolgáló verzió: 0.9.19
Alapértelmezett mintavételi leírás: s16le 2ch 44100Hz
Alapértelmezett csatornaleképzés: front-left,front-right
Alapértelmezett nyelő: alsa_output.pci-0000_00_1b.0.analog-stereo
Alapértelmezett forrás: alsa_input.pci-0000_00_1b.0.analog-stereo
Süti: d1073605"

Sorry it is in hungarian, but first two lines mean now allocated 10 blocks, 146 KiB, total allocated blocks: 116516 - 1,3 Gb

Revision history for this message
Zatara214 (zatara214) wrote :

This bug is still present in the final stable version of Karmic. Is anyone actually doing anything about this, or are we just supposed to kill the pulse process every 30 minutes until Lucid comes out?

Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 424655] Re: Pulse audio memory leak

On Fri, Nov 6, 2009 at 9:17 PM, Zatara214 <email address hidden> wrote:
> This bug is still present in the final stable version of Karmic.  Is
> anyone actually doing anything about this, or are we just supposed to
> kill the pulse process every 30 minutes until Lucid comes out?

You could, of course, use valgrind to help find the bug, presuming
there's a legitimate one.

Revision history for this message
David Henningsson (diwic) wrote : Re: Pulse audio memory leak

@Artyom: If you run "LANG=C pactl stat" result will be in the native language of the application, which is often preferred.

Revision history for this message
Artyom (artyom-szasa) wrote :

Sorry for hungarian shot/info, here are the same things in english:
LANG=C pactl stat:
Currently in use: 45 blocks containing 215.5 KiB bytes total.
Allocated during whole lifetime: 1064585 blocks containing 3.0 GiB bytes total.
Sample cache size: 0 B
User name: artyom
Host Name: artyom-laptop
Server Name: pulseaudio
Server Version: 0.9.19
Default Sample Specification: s16le 2ch 44100Hz
Default Channel Map: front-left,front-right
Default Sink: alsa_output.pci-0000_00_1b.0.analog-stereo
Default Source: alsa_input.pci-0000_00_1b.0.analog-stereo
Cookie: 59a973d5

Revision history for this message
gpstar (michael-rajotte) wrote :

getting same issue on my laptop. Pulse audio is eating up memory until it slows my system to a halt and locks it up.

Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 424655] Re: Pulse audio memory leak

Please see https://wiki.ubuntu.com/PulseAudio/Log

On Nov 9, 2009 7:25 PM, "gpstar" <email address hidden> wrote:

getting same issue on my laptop. Pulse audio is eating up memory until
it slows my system to a halt and locks it up.

-- Pulse audio memory leak https://bugs.launchpad.net/bugs/424655 You
received this bug notificati...

Status in “pulseaudio” package in Ubuntu: Confirmed Bug description:

Binary package hint: pulseaudio Pulse audio routinely uses 2GB+ over the
course of a few hours. D...

Revision history for this message
gpstar (michael-rajotte) wrote : Re: Pulse audio memory leak

ran valgrind on pulseaudio, log attached.

Revision history for this message
gpstar (michael-rajotte) wrote :

pulseverbose.log attached as requested.

Revision history for this message
gpstar (michael-rajotte) wrote :

oh forgot to add, here's a screenshot to show it eating up memory.

http://img94.imageshack.us/img94/8135/pulseaudio.jpg

Revision history for this message
Andrew Saturn (saturn) wrote :

I am getting this exact same problem. if I leave my computer running all night, I often wake up to pulseaudio trying to use 2gb+ of ram...

what can I do to help? there are no clear instructions in here...

Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 424655] Re: Pulse audio memory leak

On Mon, Nov 9, 2009 at 8:24 PM, Andrew Saturn <email address hidden> wrote:
> I am getting this exact same problem. if I leave my computer running all
> night, I often wake up to pulseaudio trying to use 2gb+ of ram...
>
> what can I do to help? there are no clear instructions in here...

valgrind output would be useful.

Revision history for this message
Andrew Saturn (saturn) wrote : Re: Pulse audio memory leak

what should I type? "valgrind pulseaudio"? never heard of that command...

Revision history for this message
gpstar (michael-rajotte) wrote :

run this in a terminal

echo autospawn = no >> ~/.pulse/client.conf
killall pulseaudio

then

sudo apt-get install valgrind

then you can do something like this

valgrind --log-file=pulselog.txt --leak-check=full -v pulseaudio

then you can do this to restore pulseaudio settings afterwards

To return your system to a clean state again, edit ~/.pulse/client.conf with your favorite editor and remove the line "autospawn = no". If the file is now empty, you can just as well delete it. Then log out and log in again

Revision history for this message
Andrew Saturn (saturn) wrote :

so that one command;

valgrind --log-file=pulselog.txt --leak-check=full -v pulseaudio

gave no feedback and continues to run... pulseaudio is also climbing in memory usage...

how long should I let it run? or will it automatically stop?

Revision history for this message
Andrew Saturn (saturn) wrote :

it got up to 100mb of ram useage before I killed it. here is the log it put in my home dir...

Revision history for this message
Andrew Saturn (saturn) wrote :

so is that useful?

how do I install the ppa version mentioned above?

Revision history for this message
gpstar (michael-rajotte) wrote :

here is another updated pulseaudio log file. During this time, i decided to play back a mp3 in rhythmbox. Everything was going fine until i opened up firefox to browse the web then the sound just stopped cutting out. pulseaudio kept on eating up memory, and computer started to lag, cursor lag, etc.

Revision history for this message
Andrew Saturn (saturn) wrote :

same symptoms as gpstar when running firefox

I am using the latest nightly version (Minefield) build# 20091110030934

addons:

Adblock Plus 1.1.1
Download Statusbar 0.9.6.5
Flashblock 1.5.11.2
FxIF 0.3.1
Greasemonkey 0.8.20090123.1
Nightly Tester Tools 2.0.2
Ubuntu Firefox Modifications 0.8

but I DO still get a leaky memory issue even if Firefox isn't opened

Revision history for this message
gpstar (michael-rajotte) wrote :

ya i get the memory leak even with everything closed and just idling. But playing back sound when firefox is open seems to make it want to crash or hang up my system as well. Could be a entire other issue though.

Revision history for this message
Andrew Saturn (saturn) wrote :

up above someone mentioned to use the ~ubuntu-audio-dev PPA version

does this still fix the issue? and if so, how do I use that version?

Revision history for this message
gpstar (michael-rajotte) wrote :

the ppa is here

https://launchpad.net/~ubuntu-audio-dev/+archive/ppa

i'm using the ppa version, it does not fix the problem yet.

Revision history for this message
kitov (konstantin-wirz) wrote :
Revision history for this message
Andrew Saturn (saturn) wrote :

this is really getting annoying. is there a way to limit the amount of RAM pulseaudio can use?

or maybe just a script to kill it every X minutes...

Revision history for this message
Tim (tima-s) wrote :

tim@tim-laptop:~$ uptime
 02:54:58 up 45 min, 2 users, load average: 0.70, 0.60, 0.56

tim@tim-laptop:~$ ps --sort rss -eo rss,cmd
....
222440 /usr/bin/pulseaudio --start

Revision history for this message
Christian Mertes (cmertes) wrote :

I seem to have a milder version of this. I'll attach an htop screenshot showing pulseaudio to use about 2 gigs overall and 1 gig resident memory after about three and a half days uptime. It's usually half that much after a day I'd say, whether I use audio or not. Perhaps this is a different issue but I've found no other bug report on this so far. Is there an upstream report BTW or is this thought to be caused by Ubuntu-specific patches?

I'll post the PA stats corresponding to the htop output below. I resist having run PA in valgrind for a significant amount of time as this might be required since the leak doesn't seem as large for me as for many others. I'll do it though if required but the other valgrind logs don't seem to have done any good so far so please let me know.

$ pactl stat
Currently in use: 3 blocks containing 158.3 KiB bytes total.
Allocated during whole lifetime: 30817296 blocks containing 1.4 GiB bytes total.
Sample cache size: 0 B
User name: cmertes
Host Name: Inara
Server Name: pulseaudio
Server Version: 0.9.19
Default Sample Specification: s16le 2ch 44100Hz
Default Channel Map: front-left,front-right
Default Sink: alsa_output.pci-0000_00_1b.0.analog-stereo
Default Source: alsa_input.pci-0000_00_1b.0.analog-stereo

Revision history for this message
Christian Mertes (cmertes) wrote :

Actually, I now did find a similar bug for another distro than Ubuntu: https://bugzilla.redhat.com/show_bug.cgi?id=537692

Revision history for this message
Parker Phinney (gameguy43) wrote :

Proposition: change bug importance to critical. This is my making my machine nearly unusable.

Revision history for this message
ageeb (adam-baltes) wrote :
Revision history for this message
Parker Phinney (gameguy43) wrote : Re: [Bug 424655] Re: Pulse audio memory leak

thanks! for those looking to avoid the clickthrough:
system without package 'udev' has no memory leak.

so a fix is "aptitude remove udev"?
is this an essential package?

ageeb wrote:
> maybe this will help others?
> http://ubuntuforums.org/showthread.php?t=1330201
>

--
D Parker Phinney
madebyparker.com

Revision history for this message
gpstar (michael-rajotte) wrote : Re: Pulse audio memory leak

thanks for the link,

the last post here shows what is going on

http://ubuntuforums.org/showpost.php?p=8344591&postcount=5

package 'udev' (147~-6.1 according to synaptic) makes pulseaudio eat up all the memory. Reverting back to the previous version of udev (146~6.0) fixes the pulseaudio memory problem.

Revision history for this message
Andrew Saturn (saturn) wrote :

so if udev is causing the problem... how can that be fixed? it's dependant... you can't just remove udev

Revision history for this message
gpstar (michael-rajotte) wrote :

revert back to the older version. Version 147~6.0 (typo on my above post on the version #).

in synaptic if you have udev (147~-6.1) installed from karmic-updates, that is what is causing the problem. Select it udev in synaptic and goto "Packages" then "Force Version" and choose the 147~-6

Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 424655] Re: Pulse audio memory leak

Please verify that reverting to karmic's version of udev resolves this
symptom after a fresh boot. I'm a bit doubtful, but...

Revision history for this message
gpstar (michael-rajotte) wrote : Re: Pulse audio memory leak

Just did a reboot. Everything looks good. PulseAudio is sitting at a stable 1.8MB.

Revision history for this message
gpstar (michael-rajotte) wrote :

I'll also point out. the karmic udev on 64bit systems (dunno about the 32bit version), will not automount usb/card reader/esata with 147.60 udev, 147.61 udev solves the issue, but then you get the pulseaudio memory problem associated with it. So downgrading to 147.60 udev you may loose the possibilty on some systems on automounting external storage devices.

Revision history for this message
Andrew Saturn (saturn) wrote :

just downgraded and not only did that fix the memory leak, but my CPU now sits at 0-5% when inactive (instead of the previous 50%+ all the time)

gpstar; that was ANOTHER annoying bug I got all the time (inability to auto-mount USB)

can someone please fix this? if I was able to program I would do it... it can't be that complicated to find where the problem was created... this bug doesn't seem to be getting any attention even though (in my mind) it seems somewhat of a high-priority... it seems like no one tested the code before applying it.

Revision history for this message
Martin Pitt (pitti) wrote :

One potential explanation: the fd leak made udev completely stop recognizing new hardware on a lot of systems (which was fixed in -6.1). So the fix might uncover another leak by adding/probing sound hw which previously didn't appear in udev (since it simply stopped working because of exceeding the 1024 fd limit)

For those of you who can reproduce this pulseaudio memleak (I can't), it would be interesting to compare an udev dump with both versions. Please install 147~6, do

  udevadm info --export-db > /tmp/udev.log

attach /tmp/udev.log here. Then upgrade to 147~-6.1, reboot, do the command again, and attach /tmp/udev.log again.

Thanks!

Changed in udev (Ubuntu):
status: New → Incomplete
importance: Undecided → High
Changed in pulseaudio (Ubuntu):
importance: Undecided → High
Revision history for this message
gpstar (michael-rajotte) wrote :

Here's the log of udev146~-6

Revision history for this message
gpstar (michael-rajotte) wrote :

here's the udev-147~-6.1 log

(typo again on my previous post, i should have said udev-147~-6.0 instead of 146~-6.0)

Revision history for this message
ageeb (adam-baltes) wrote :

147~-6 == http://pastebin.com/m5482e46f
147~-6.1 == http://pastebin.com/m4210c16

easiest way for me to host...

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks. So for ageeb the difference is basically nothing (just some noise due to different enumeration order, which is expected to be pretty random). For gpstar the diff is that with 6.1 you get a proper identification of your hard disk (which is one incarnation of what 6.1 was supposed to fix).

Neither affect the detection of sound devices, though.

To rule out/check if it is an issue with a changed tool chain, would anyone be up to trying to rebuild the karmic final package and see whether or not the leak happens with that?

  sudo apt-get build-dep udev
  apt-get source -b udev=147~-6
  sudo dpkg -i *.deb

then reboot, and check whether you get the leak.

Thanks!

Revision history for this message
ageeb (adam-baltes) wrote :

>sudo apt-get build-dep udev
>apt-get source -b udev=147~-6
>sudo dpkg -i *.deb

>then reboot, and check whether you get the leak.

my pulseaudio process is stable after applying those intstructions...

Revision history for this message
gpstar (michael-rajotte) wrote :

pulseaudio process stable here on my end after doing the above instructions.

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks. So this rules out a toolchain issue.

The first change which was done to fix bug 463347 was

  http://bazaar.launchpad.net/~ubuntu-core-dev/udev/ubuntu/revision/2521

This does not change any external API, and just fixes a demonstrated major fd leak. I am fairly sure that this was not the culprit.

The second change was

  http://bazaar.launchpad.net/~ubuntu-core-dev/udev/ubuntu/revision/2522

which repairs inotify handling. It also does not change external API, but by making it actually work again on a lot of machines it seems like the kind of bug which might trigger pulseaudio bugs which were previously not visible.

In the built tree that you have, can you please open udev/udev-node.c in gedit and apply the change in http://bazaar.launchpad.net/~ubuntu-core-dev/udev/ubuntu/revision/2521 ? (I. e. add the "closedir" line at the right place), then do

 dpkg-buildpackage -us -uc -b -nc

inside the udev-147~ directory, and then install ../*.deb again? I expect that this will still keep pulseaudio happy, but I'd like to make 100% sure.

Revision history for this message
gpstar (michael-rajotte) wrote :

ok, I made the closedir(dir); changes to udev-node.c, rebuilt the packages and installed them and rebooted.

Pulseaudio is now eating up my memory.

Revision history for this message
ageeb (adam-baltes) wrote :

I'm only a week or two into linux :(

i'm with you until this part: and then install ../*.deb again?
I'm not sure which commands actually execute that...

all this or a certain part?
sudo apt-get build-dep udev
>apt-get source -b udev=147~-6
>sudo dpkg -i *.deb

sorry you have to hold my hands...

Martin Pitt (pitti)
Changed in udev (Ubuntu):
status: Incomplete → Invalid
Changed in udev (Ubuntu Karmic):
status: New → Invalid
Revision history for this message
Martin Pitt (pitti) wrote :

Thanks for confirming. TBH this is really a miracle to me, since merely closing an internal fd in udev should not have _any_ impact on pulseaudio, except if pulseaudio was actually relying on udev not working. I don't think we want to break udev for half of the systems again, so we need to track down the actual pulse leak.

Please try to restart pulse in the foreground with debugging mode with this:

  pulseaudio -k; pulseaudio -vvv 2>&1 | tee /tmp/pulse.log

If you see this in the second last line:

  E: pid.c: Daemon already running.

then please just keep retrying until it works and it says "I: main.c: Daemon startup complete." in the bottom.

Does this reproduce the leak as well? Normally it stops after "daemon startup complete" and there's only occasional output. I hope/suspect that you will get a wild endless loop of output; if you do, press Control-C after a couple of seconds. If it stops outputing text, wait 20 seconds and press Control-C then. Please attach /tmp/pulse.log afterwards.

If you can reproduce the leak, but don't see looping output, please try to obtain a valgrind log as described on

  https://wiki.ubuntu.com/Valgrind

Thanks!

Changed in pulseaudio (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Martin Pitt (pitti) wrote :

Ah, nevermind. In fact this bug already has valgrind and pulseaudio -v logs attached, and http://launchpadlibrarian.net/35516770/pulseverbose2.log seems to point it out pretty nicely. (Sorry, should have checked before, I just replied by mail before).

Also, the reporting of this bug predates the udev SRU by two months.

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 424655] Re: Pulse audio memory leak

Hello ageeb,

don't worry about this too much, it was already confirmed.

ageeb [2009-11-19 19:45 -0000]:
> i'm with you until this part: and then install ../*.deb again?

Sorry, that was meant to be "sudo dpkg -i ../*.deb".

But as I said, I don't think you actually need to do it now.

Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)

Revision history for this message
Tim (tima-s) wrote : Re: Pulse audio memory leak

I 've been experimenting with different udev versions:
1) 147-6 , which has problem with mounting removable media. but pulseaudio seem to be not leaking memory
2) 147-6.1 (which differs from -6 by this commit http://git.kernel.org/?p=linux/hotplug/udev.git;a=patch;h=4daa146b )
It fixes mounting media but pulseaudio leaks memory badly
3) vanilla udev 147 , which behaves like 147-2

ubuntu karmic amd64
Meya: 3) vanilla udev 147 , which behaves like 147-6.1

Revision history for this message
j.Couture (witchking117z) wrote :

is there any fix in the near future for this, reverting udev makes it so i cant mount anything, and that seem to be the only fix so far.

Revision history for this message
Ergün KOÇAK (ergun) wrote :

in process manager pulsaaudio is using up to 2 GB sometimes more :)
pls guys in 9.04 everything was fine ...

Revision history for this message
tc7 (tc7) wrote :

Thanks for your instructions Martin. I found the previous version of udev fixed the memory leak, but followed your rebuild instructions in order to get the benefit of the USB fix: http://bazaar.launchpad.net/~ubuntu-core-dev/udev/ubuntu/revision/2521

Testing now - but looks good so far. The pulseaudio process now sits at 6.6MB (resident) and 260MB (virtual).

NOTE: this is contrary to what gpstar reported in comment 58.

Thanks again - this was causing regular headaches for me (despite the fact we haven't yet got to the root cause).

Revision history for this message
j.Couture (witchking117z) wrote :

I tried the fix with udev and just like gpstar pusleaudio has started leaking again once I do the fix to re enable usb mounting.

Revision history for this message
Martin Pitt (pitti) wrote :

Can anyone please produce a valgrind log (https://wiki.ubuntu.com/Valgrind)? The one from comment 20 is invalid.

Changed in pulseaudio (Ubuntu):
assignee: nobody → Luke Yelavich (themuso)
Revision history for this message
tc7 (tc7) wrote :

Unfortunately pulseaudio started leaking again today. I've backed out the http://bazaar.launchpad.net/~ubuntu-core-dev/udev/ubuntu/revision/2521 change.

Apologies gpstar - I think you are correct; only the vanilla 147~-6 cures the leak.

Revision history for this message
ageeb (adam-baltes) wrote :
Revision history for this message
Mark A. Hershberger (hexmode) wrote :

I suspect udev is not the only source of the leak. I removed pulseaudio-module-udev (because valgrind wouldn't run with it), but I was still seeing leaks. The leaking was dramatically slower, but still there. Valgrind and pulseaudio output attached.

Revision history for this message
Mark A. Hershberger (hexmode) wrote :

Valgrind log

Revision history for this message
gpstar (michael-rajotte) wrote :

just to note, for those you who are like me and reverted back to Version 147~6.0 of udev to stop the memory leaks, you can get your hot swapping of external drives/memory sticks, etc working by opening up a terminal and typing

sudo stop udev
sudo start udev

then your external drives will get will pop up as normal. You'll have to do this every time you reboot your system though.

Revision history for this message
Mark A. Hershberger (hexmode) wrote :

ok, so it looks like I was wrong. Downgraded udev and the memory leak disappeared.

Revision history for this message
Martin Pitt (pitti) wrote :

Hm, looks like none of those valgrind logs catch memory leaks. I don't know valgrind too well, but I think you need to run it in "massif" mode, which is for leaks (unlike the standard mode which catches allocation/access errors).

http://developer.gnome.org/doc/guides/optimisation/Massif.html has some documentation about this.

Revision history for this message
gpstar (michael-rajotte) wrote :

here you go, i ran it as indicated in the link you sent about massif mode.

Revision history for this message
Dávid Vastag (d-vastag) wrote :

Pulseaudio stopped leaking my memory today. It stays at ~1.6 MiB. The only thing that I did was install the usual updates on my system.

Revision history for this message
vaughn (vaughngrisham) wrote :

I installed Karmic yesterday and have installed all available updates. Pulseaudio was using over 300mb of memory a few minutes ago. I issued the command 'pulseaudio -k' and memory usage dropped back down under 2mb. After 10 minutes however, it's crept back up to over 14 mb and is still climbing.

Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 424655] Re: Pulse audio memory leak

Are you folks seeing these leaks with apps that open lots of
short-lived connections, e.g., lots of system sounds?

Revision history for this message
ageeb (adam-baltes) wrote : Re: Pulse audio memory leak

for other readers, i had around 40MB of updates and installed all updates minus udev, and then rebooted to find no leak (no suprise). Installed udev -~6.1 again and rebooted and started leaking again. Forced version back -~6 and stable.

Revision history for this message
gpstar (michael-rajotte) wrote :

i have system sounds turned off, and it'll leak when idling as soon as the system is first booted up.

Revision history for this message
vaughn (vaughngrisham) wrote :

Martin Pitt's workaround above works nicely. When this is solved and a fix is released, will UDEV upgrade or will it stick to the downgraded version?

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 424655] Re: Pulse audio memory leak

vaughn [2009-12-07 17:49 -0000]:
> Martin Pitt's workaround above works nicely. When this is solved and a
> fix is released, will UDEV upgrade or will it stick to the downgraded
> version?

Well, a memleak in pulse can't really be fixed in udev, I'm afraid. I
don't even understand yet why udev triggers it.

Revision history for this message
vaughn (vaughngrisham) wrote : Re: Pulse audio memory leak

Martin,

Well, you're right. It's not an appropriate workaround after all. My USB ports wouldn't work with UDEV downgraded. I'm back to square one and a major memory leak.

I sure hope this gets resolved quickly.

Vaughn

Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 424655] Re: Pulse audio memory leak

Please export PULSE_MEMPOOL_DISABLE=1 in ~/.bashrc (or whatever your
shell uses), logout and login again.

Revision history for this message
vaughn (vaughngrisham) wrote : Re: Pulse audio memory leak

Daniel,

I just tried inserting that into .bashrc. I rebooted, but the problem persists. Does your line need to go in a specific location in the bashrc file?

Thanks,
Vaughn

Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 424655] Re: Pulse audio memory leak

Just:
export PULSE_MEMPOOL_DISABLE=1

Revision history for this message
vaughn (vaughngrisham) wrote : Re: Pulse audio memory leak

Daniel,

I think I added it correctly. I am attaching my .bashrc file for your review.

Pulseaudio is till consuming memory as before. Please let me know if I added your line correctly to the .bashrc file.

Thanks,
Vaughn

Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 424655] Re: Pulse audio memory leak

Yes, that's correct. So we've eliminated the mempool as a possible culprit.

Revision history for this message
Maxxer (lorenzo-milesi) wrote : Re: Pulse audio memory leak

if can matter, I run Karmic on an Asus A6K with no problems.
while I run into this bug on an Fujitsu Siemens Amilo SI3655, equiped with the following card:

00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03)

both amd64.

Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 424655] Re: Pulse audio memory leak

@Maxxer
It's the controller and codec (not lspci) that matter; see
/proc/asound/card*/codec*

Revision history for this message
Trev Peterson (trev-advanced-reality) wrote : Re: Pulse audio memory leak

I also had this problem (2+Gig mem usage within a few hours and about 30% higher baseline proc usage). Reverting to udev 147~6.0 seems to have corrected the problem.

Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 424655] Re: Pulse audio memory leak

Could everyone please test using module-detect instead of
module-udev-detect? You'd need to comment out the appropriate
if/fi/else in /etc/pulse/default.pa, then logout and login.

Revision history for this message
gpstar (michael-rajotte) wrote : Re: Pulse audio memory leak

i commented out the module-udev-detect loading so module-detect is used instead.

The pulseaudio memory leak is now gone. However the higher than normal cpu idle usages is still there. There are a bunch of udevd processes in the system monitor (76+ of them)

Revision history for this message
Maxxer (lorenzo-milesi) wrote :

> The pulseaudio memory leak is now gone. However the higher than
> normal cpu idle usages is still there. There are a bunch of udevd processes
> in the system monitor (76+ of them)

same here. leak seems to be gone, memory stays low, but cpu still a bit high when idle

Revision history for this message
James (jbertelson) wrote :

Also confirmed -- commenting out the if/else surrounding module-udev-detect keeps pulseaudio from leaking memory. I don't notice abnormal CPU usage though, before or after the change. (core 2 T7700)

Daniel T Chen (crimsun)
Changed in pulseaudio (Ubuntu):
status: Incomplete → Triaged
summary: - Pulse audio memory leak
+ using module-udev-detect leaks memory
Revision history for this message
Parker Phinney (gameguy43) wrote : Re: [Bug 424655] Re: Pulse audio memory leak

fwiw, i just did a fresh reformat and install of karmic on my 64-bit system
(system76 darter ultra). i had previously been running karmic after
upgrading from intrepid (upgraded from jaunty, i think), and i had the
pulseaudio memory leak. after a fresh install, seems to be gone (thus
far). hope this helps.

On Tue, Dec 15, 2009 at 4:24 PM, Daniel T Chen <email address hidden>wrote:

> ** Changed in: pulseaudio (Ubuntu)
> Status: Incomplete => Triaged
>
> ** Summary changed:
>
> - Pulse audio memory leak
> + using module-udev-detect leaks memory
>
> --
> using module-udev-detect leaks memory
> https://bugs.launchpad.net/bugs/424655
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
http://www.madebyparker.com

Revision history for this message
vaughn (vaughngrisham) wrote :

A fresh install did nothing to help me. I'm running a System76 Pangolin and had this problem with a fresh install.

Revision history for this message
Parker Phinney (gameguy43) wrote :

false alarm. the leak is back. i swear it was stable for at least a bit
tho. maybe it took one restart or something to provoke the leak? but yeah,
its definitely back now.

how are you guys coping in the mean time? just running pulseaudio -k every
20 minutes?

On Wed, Dec 16, 2009 at 12:22 AM, Parker <email address hidden> wrote:

> fwiw, i just did a fresh reformat and install of karmic on my 64-bit system
> (system76 darter ultra). i had previously been running karmic after
> upgrading from intrepid (upgraded from jaunty, i think), and i had the
> pulseaudio memory leak. after a fresh install, seems to be gone (thus
> far). hope this helps.
>
>
> On Tue, Dec 15, 2009 at 4:24 PM, Daniel T Chen <email address hidden>wrote:
>
>> ** Changed in: pulseaudio (Ubuntu)
>> Status: Incomplete => Triaged
>>
>> ** Summary changed:
>>
>> - Pulse audio memory leak
>> + using module-udev-detect leaks memory
>>
>> --
>> using module-udev-detect leaks memory
>> https://bugs.launchpad.net/bugs/424655
>> You received this bug notification because you are a direct subscriber
>> of the bug.
>>
>
>
>
> --
> http://www.madebyparker.com
>

--
http://www.madebyparker.com

Revision history for this message
gpstar (michael-rajotte) wrote :

revert back to the old version of udev to stop the leak in the meantime. I mentioned it in post #73 here

https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/424655/comments/73

Revision history for this message
Andrew Saturn (saturn) wrote :

I always reverted back to older udev, which made plugging in USB devices not work unless you stop and start udev, but "fixed" the leak...

HOWEVER...

I did a FRESH install of 9.10 on my laptop and the bug is (apparently) gone? no idea why that would matter, other than before it was an upgrade from 9.04.

only other difference is I'm using Firefox 3.5.5 rather than the Minefield nightly.

Revision history for this message
gpstar (michael-rajotte) wrote :

a fresh install of karmic wont have the memory leak because it is using the older udev. updating the udev should produce it on certain system. I know it does on mine with a fresh install of 64bit karmic with my intel based hardware on my laptop after updating udev.

Revision history for this message
Parker Phinney (gameguy43) wrote : Re: [Bug 424655] Re: using module-udev-detect leaks memory

what are our action tasks here? have we gotten the attention of the udev
devels?

On Wed, Dec 16, 2009 at 5:03 PM, gpstar <email address hidden> wrote:

> a fresh install of karmic wont have the memory leak because it is using
> the older udev. updating the udev should produce it on certain system. I
> know it does on mine with a fresh install of 64bit karmic with my intel
> based hardware on my laptop after updating udev.
>
> --
> using module-udev-detect leaks memory
> https://bugs.launchpad.net/bugs/424655
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
http://www.madebyparker.com

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

On Thu, 2009-12-17 at 01:35 +0000, Parker Phinney wrote:

> what are our action tasks here? have we gotten the attention of the udev
> devels?
>
There's no evidence of any udev issue; module-udev-detect is still
PulseAudio code.

Scott
--
Scott James Remnant
<email address hidden>

Revision history for this message
Parker Phinney (gameguy43) wrote :

Ah, I see. I misunderstood then.

On Thu, Dec 17, 2009 at 6:32 AM, Scott James Remnant <email address hidden>wrote:

> On Thu, 2009-12-17 at 01:35 +0000, Parker Phinney wrote:
>
> > what are our action tasks here? have we gotten the attention of the udev
> > devels?
> >
> There's no evidence of any udev issue; module-udev-detect is still
> PulseAudio code.
>
> Scott
> --
> Scott James Remnant
> <email address hidden>
>
> --
> using module-udev-detect leaks memory
> https://bugs.launchpad.net/bugs/424655
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
http://www.madebyparker.com

Revision history for this message
ZAP (michaelzap) wrote :

What's the ETA for getting this bug resolved? I've been running killall pulseaudio constantly for nearly two months now. Is there a patch that we can test out?

Revision history for this message
gpstar (michael-rajotte) wrote :

ZAP, revert back to the previous version of udev to stop the leak until a fix comes out. I mentioned it in post #73 here.

https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/424655/comments/73

Revision history for this message
soundconjurer (palemastervolrath) wrote :

The issue with pulseaudio seems to become clear if you look at its memory maps. It keeps pulling the same files into memory over and over and over again.

...
/usr/lib/pulse-0.9.19/modules/module-udev-detect.so

I wonder if what udev is doing is auto-remounting the sound card forcing pulseaudio to reload the same files into memory again and again.

I'm not expert, but I am pretty sure the clues are around there.

Revision history for this message
soundconjurer (palemastervolrath) wrote :

Ok, I know my last post was redundant and I reread the forum.

I found a little catch in the memory leak.

Opening up the system monitor and I killed pulseaudio.

Then I stopped it and closed all my programs. I returned to it after a while and turned it back on and it is no longer climbing in memory. It's sustaining the 3.5 mb where I left it after turning it off.

Strange strange.

Revision history for this message
WQ (irrigate99) wrote :

Oh, but my puleseaudio version is 1:0.9.21-0ubuntu3~~karmic~ubuntuaudiodev1, this is the latest version.
I came to use the ubuntu OS just about a few weeks ago and I don't know much about it.
Is there anything I can do to solve this problem?

I wish you would understand my mail because my English is not so good!

Thank for your mails and answers!!

在2009-12-27?01:56:41,Reverend_of_War?<email address hidden>?写道:
>The?issue?with?pulseaudio?seems?to?become?clear?if?you?look?at?its
>memory?maps.?It?keeps?pulling?the?same?files?into?memory?over?and?over
>and?over?again.
>
>...
>/usr/lib/pulse-0.9.19/modules/module-udev-detect.so
>
>I?wonder?if?what?udev?is?doing?is?auto-remounting?the?sound?card?forcing
>pulseaudio?to?reload?the?same?files?into?memory?again?and?again.
>
>I'm?not?expert,?but?I?am?pretty?sure?the?clues?are?around?there.
>
>--?
>using?module-udev-detect?leaks?memory
>https://bugs.launchpad.net/bugs/424655
>You?received?this?bug?notification?because?you?are?a?direct?subscriber
>of?a?duplicate?bug.
>
>Status?in?“pulseaudio”?package?in?Ubuntu:?Triaged
>Status?in?“udev”?package?in?Ubuntu:?Invalid
>Status?in?“pulseaudio”?source?package?in?Karmic:?New
>Status?in?“udev”?source?package?in?Karmic:?Invalid
>
>Bug?description:
>Binary?package?hint:?pulseaudio
>
>Pulse?audio?routinely?uses?2GB+?over?the?course?of?a?few?hours.
>
>
>Description: Ubuntu?karmic?(development?branch)
>Release: 9.10
>
>pulseaudio:
>??Installed:?1:0.9.16~test6-3-g57e1-0ubuntu2
>??Candidate:?1:0.9.16~test6-3-g57e1-0ubuntu2
>??Version?table:
>?***?1:0.9.16~test6-3-g57e1-0ubuntu2?0
>????????500?http://mirror.optus.net?karmic/main?Packages
>????????100?/var/lib/dpkg/status
>
>
>I?expect?pulseaudio?to?continue?to?use?a?couple?MB?of?memory,?certainly?less?then?2GB.
>
>After?a?few?hours?of?listening?to?music?and?the?odd?youtube?video?pulseaudio?ends?up?with?2GB+?of?memory.
>
>To?unsubscribe?from?this?bug,?go?to:
>https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/424655/+subscribe

Revision history for this message
WQ (irrigate99) wrote :

I renamed the "module-udev-detect.so", now, there's no memory leaks any more.
But my system can't play any sound now.

thanks.

在2009-12-27?03:00:15,Reverend_of_War?<email address hidden>?写道:
>Ok,?I?know?my?last?post?was?redundant?and?I?reread?the?forum.
>
>I?found?a?little?catch?in?the?memory?leak.
>
>Opening?up?the?system?monitor?and?I?killed?pulseaudio.
>
>Then?I?stopped?it?and?closed?all?my?programs.?I?returned?to?it?after?a
>while?and?turned?it?back?on?and?it?is?no?longer?climbing?in?memory.?It's
>sustaining?the?3.5?mb?where?I?left?it?after?turning?it?off.
>
>Strange?strange.
>
>--?
>using?module-udev-detect?leaks?memory
>https://bugs.launchpad.net/bugs/424655
>You?received?this?bug?notification?because?you?are?a?direct?subscriber
>of?a?duplicate?bug.
>
>Status?in?“pulseaudio”?package?in?Ubuntu:?Triaged
>Status?in?“udev”?package?in?Ubuntu:?Invalid
>Status?in?“pulseaudio”?source?package?in?Karmic:?New
>Status?in?“udev”?source?package?in?Karmic:?Invalid
>
>Bug?description:
>Binary?package?hint:?pulseaudio
>
>Pulse?audio?routinely?uses?2GB+?over?the?course?of?a?few?hours.
>
>
>Description: Ubuntu?karmic?(development?branch)
>Release: 9.10
>
>pulseaudio:
>??Installed:?1:0.9.16~test6-3-g57e1-0ubuntu2
>??Candidate:?1:0.9.16~test6-3-g57e1-0ubuntu2
>??Version?table:
>?***?1:0.9.16~test6-3-g57e1-0ubuntu2?0
>????????500?http://mirror.optus.net?karmic/main?Packages
>????????100?/var/lib/dpkg/status
>
>
>I?expect?pulseaudio?to?continue?to?use?a?couple?MB?of?memory,?certainly?less?then?2GB.
>
>After?a?few?hours?of?listening?to?music?and?the?odd?youtube?video?pulseaudio?ends?up?with?2GB+?of?memory.
>
>To?unsubscribe?from?this?bug,?go?to:
>https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/424655/+subscribe

Revision history for this message
valindil89 (jsduncan98) wrote :

in response to post #109 this little tweak of stopping and starting the pulseaudio does stop the memory leak, but it does not drop the Proc usage from around 50% usage all of the time... ETA on possible fix? its almost the new year....

Revision history for this message
Daniel T Chen (crimsun) wrote :

I don't have free time until next year to look at this bug, but if an
enterprising user wants to start debugging, look in
src/modules/module-udev-detect.c at the inotify pieces.

Revision history for this message
gpstar (michael-rajotte) wrote :

valindil89

read post #73

https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/424655/comments/73

you have to revert back to the older udev for now to stop the leak and extra cpu usage.

Revision history for this message
valindil89 (jsduncan98) wrote :

gpstar,

I have already done that, Reverand_of_War proposed that alternate option which would be fine for the select few people that were not having the CPU issue because it does fix the leak until you restart the computer. But for the CPU issue being there also it is best to revert to the older udev like in post #73 instead of just stopping and starting audioPulse.

Revision history for this message
vaughn (vaughngrisham) wrote :

Can anyone comment on whether this bug is present in Lucid Lynx. I know it's still in Alpha, but I'm hoping for a light at the end of the tunnel.

Revision history for this message
sektor (sektor-1) wrote :
Revision history for this message
Daniel T Chen (crimsun) wrote :

Summary: Yes, the bug is still present in Lucid. I have a candidate for Karmic that's currently building in my PPA (https://launchpad.net/~crimsun/+archive/ppa); please confirm that it resolves the symptom.

Changed in pulseaudio (Ubuntu Karmic):
assignee: nobody → Daniel T Chen (crimsun)
importance: Undecided → High
status: New → In Progress
Revision history for this message
Daniel T Chen (crimsun) wrote :

Also, please use:

udevadm monitor --property > ~/udevadm-monitor.log

and attach the log here. Thanks!

Revision history for this message
stfoull (stfouill) wrote :

Hello, I had the same problem with pulseaudio, and I have tried adding your PPA. And it seems to work! Pulseaudio only uses 1.7Mio and the computer is on for a couple of hours now. Thanks a lot!

Revision history for this message
gpstar (michael-rajotte) wrote :

I'm having problems trying to install the Pulseaudio package from your ppa.

I get these errors when i remove pulseaudio from my system and try to install the one from your ppa

"pulseaudio:
  Depends: libpulse0 (=1:0.9.19-0ubuntu4.1~crimsun1) but 1:0.9.21-0ubuntu3~~karmic~ubuntuaudiodev1 is to be installed
 Depends: pulseaudio-module-udev
 Recommends: pulseaudio-module-x11 but it is not going to be installed
 Recommends: pulseaudio-esound-compat but it is not going to be installed"

when I try to force version of the pulseaudio from your ppa i get this

"To be removed
rtkit"

then when i click apply i get

"E: Unable to correct problems, you have held broken packages.
E: Unable to lock the download directory"

Revision history for this message
Daniel T Chen (crimsun) wrote :

On Wed, Jan 13, 2010 at 1:08 PM, gpstar wrote:
> "pulseaudio:
>  Depends: libpulse0 (=1:0.9.19-0ubuntu4.1~crimsun1) but 1:0.9.21-0ubuntu3~~karmic~ubuntuaudiodev1 is to be installed

sudo dpkg -P --force-depends libpulse0 && sudo apt-get -f install

Revision history for this message
gpstar (michael-rajotte) wrote :

doing the "sudo dpkg -P --force-depends libpulse0 && sudo apt-get -f install" wants to remove some gnome stuff

The following packages will be REMOVED:
  gnome-applets gnome-control-center gnome-media gnome-panel gnome-session gnome-settings-daemon indicator-applet
  indicator-applet-session indicator-messages indicator-session libpulse-browse0 libpulse-dev libpulse-mainloop-glib0 paman
  pavucontrol pavumeter pulseaudio-utils
The following NEW packages will be installed:
  libpulse0

Revision history for this message
Daniel T Chen (crimsun) wrote :

You need to remove all the pulseaudio packages already installed
forcibly (--force-depends), then reinstall the version from the ppa.

Revision history for this message
gpstar (michael-rajotte) wrote :

Ok managed to get pulseaudio switched over. updated udev to the latest version (147~6.1) and attached is the udevadm-monitor.log

the memory leak is now gone, however there are still many udev processes which are eating up CPU usage still.

sudo stop udev

to stop udev will bring my CPU usage back down

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pulseaudio - 1:0.9.22~0.9.21+341-g62bf-0ubuntu1

---------------
pulseaudio (1:0.9.22~0.9.21+341-g62bf-0ubuntu1) lucid; urgency=low

  * New snapshot based on stable-queue git branch (testing requested
    specifically by upstream)
    - LP: #164745, #173212, #201391, #204536, #207796, #210016, #221038,
    - LP: #226342, #230408, #236423, #237443, #250059, #269585, #274304,
    - LP: #274577, #275474, #277532, #277566, #277932, #278025, #280534,
    - LP: #283049, #286816, #287036, #292732, #298011, #298301, #300290,
    - LP: #302038, #311497, #311853, #324062, #339448, #344057, #348979,
    - LP: #350829, #356206, #367379, #367544, #369822, #371897, #374846,
    - LP: #375570, #381801, #399515, #402950, #403786, #408169, #409322,
    - LP: #409723, #410326, #410446, #417695, #417976, #419271, #421072,
    - LP: #422774, #423979, #424655, #425028, #427016, #431072, #432660,
    - LP: #437640, #437996, #442191, #443306, #443389, #446719, #449762,
    - LP: #455417, #461532, #464652, #483191, #497537, #503780
  * debian/patches/:
    + add: 0099-change-configure-git-version-tag.patch: Match released
           upstream 0.9.21 for shlibs and LIBPULSE_VERSION_INFO
    - drop: 0004-set-tsched0.patch (no longer relevant)
            0050-revert-pacmd-poll-argv.patch (no longer relevant)
            0056-dont-bail-on-sound-class-modem.patch (merged)
            0056-ignore-sound-class-modem.patch (merged)
            0058-Backport-4c793.patch (merged)
            0059-Backport-978d3.patch (merged)
            0060-fix-implicit-func-decl-cpu-arm.patch (merged)
            0061-Backport-c5fdb.patch (merged)
            0070-dont-bail-on-sound-class-modem-devs.patch (merged)
    + refresh: 0001-change-resample-and-buffering.patch
               0090-disable-flat-volumes.patch
               0091-dont-load-cork-music-on-phone.patch
               0057-load-module-x11-bell.patch
 -- Daniel T Chen <email address hidden> Thu, 14 Jan 2010 20:33:05 -0500

Changed in pulseaudio (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Andrew McWhirter (andrew-mcwhirter) wrote :

Everything is working good now! I have the latest version of udev running (147-6.1 ) with pulseaudio from the crimson ppa. Pulseaudio is not draining memory, and my usb keys are being mounted without restarting udev. It's been running solid for a good 12 hours.

1) Add ppa:crimsun/ppa to your software resources under the Administration menu in the Other Software tab.
2) Run in terminal: sudo dpkg -P --force-depends libpulse0 && sudo apt-get -f install
3) Update your udev back to version 147-6.1 (if you reverted to the previous version to fix this bug) either in Synaptic or from terminal: sudo apt-get install udev which should install the latest version.

Revision history for this message
Daniel T Chen (crimsun) wrote :
description: updated
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted pulseaudio into karmic-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in pulseaudio (Ubuntu Karmic):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
sektor (sektor-1) wrote :

I confirm that the proposed pulseaudio package is not leaking here.

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
jonee316 (jonee316) wrote :

i am sorry but how does one fix this in 9.10? why is it called a "minimal fix"?

don't you plan to provide a proper update to remedy this bug which has been around at the start- at least two months old?

Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 424655] Re: using module-udev-detect leaks memory

jonee316, clearly you haven't read Martin Pitt's instructions above
for enabling the karmic-proposed repository to test the provided fix.

It's called a minimal fix because the actual changes to the source
code should be as noninvasive as possible.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pulseaudio - 1:0.9.19-0ubuntu4.1

---------------
pulseaudio (1:0.9.19-0ubuntu4.1) karmic-proposed; urgency=low

  * debian/patches/0080-unref-unused-udev.patch (LP: #424655):
    + Add from upstream stable-queue branch; we should free
      the udev context for unused devices. Failing to do so
      causes some nasty memory leaks.
 -- Daniel T Chen <email address hidden> Tue, 12 Jan 2010 17:41:27 -0500

Changed in pulseaudio (Ubuntu Karmic):
status: Fix Committed → Fix Released
valindil89 (jsduncan98)
Changed in pulseaudio (Ubuntu):
status: Fix Released → Fix Committed
status: Fix Committed → In Progress
status: In Progress → Fix Released
Revision history for this message
Tom Pringle (thomas-b-pringle) wrote :

It sounds like the fix is supposed to be released yet I just ran into something that seems very similar to this bug on a fully updated version of karmic.

Revision history for this message
Daniel T Chen (crimsun) wrote :

Tom, please file a separate bug.

On Mon, Apr 19, 2010 at 4:13 PM, Tom Pringle <email address hidden> wrote:
> It sounds like the fix is supposed to be released yet I just ran into
> something that seems very similar to this bug on a fully updated version
> of karmic.

Changed in pulseaudio (Fedora):
importance: Unknown → Medium
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.