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.

Martin Pitt (pitti)
Changed in udev (Ubuntu):
status: New → Incomplete
importance: Undecided → High
Changed in pulseaudio (Ubuntu):
importance: Undecided → High
Martin Pitt (pitti)
Changed in udev (Ubuntu):
status: Incomplete → Invalid
Changed in udev (Ubuntu Karmic):
status: New → Invalid
Martin Pitt (pitti)
Changed in pulseaudio (Ubuntu):
status: Confirmed → Incomplete
Martin Pitt (pitti)
Changed in pulseaudio (Ubuntu):
assignee: nobody → Luke Yelavich (themuso)
55 comments hidden view all 135 comments
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
Displaying first 40 and last 40 comments. View all 135 comments or add a comment.
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.