Extreme memory leak in Pidgin when attempting to play sound

Bug #200392 reported by Removed by request
32
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Pidgin
Fix Released
Unknown
pidgin (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: pidgin

Pidgin sits usually between 10mb and 12mb memory usage, but since a very recent update (today, 9th March), as soon as I recieve a message, the memory usage jumps within seconds to nearly a gigabyte.

Always reproducible on my computer. Tested with no other programs running.

Pidgin 2.4.0 (bug happened in older version too)
Ubuntu 8.04 alpha6 amd64
Gnome 2.21.92
linux-image-generic 2.6.24.12-11

Revision history for this message
Removed by request (removed1836289) wrote :
Revision history for this message
Removed by request (removed1836289) wrote :

Ok, I found what was wrong after messing in .purple/prefs.xml

  <pref name='sound'>
   <pref name='while_status' type='int' value='1'/>
  </pref>

The default value of 1 works. Changing this to

  <pref name='sound'>
   <pref name='while_status' type='int' value='3'/>
  </pref>

will make the program die on message reception.

Revision history for this message
Removed by request (removed1836289) wrote :

This is likely related to https://bugs.launchpad.net/ubuntu/+source/linux/+bug/200338/ - does not happen in kernel 11. Best probably to close.

Revision history for this message
ski (skibrianski) wrote :

Adys - I am having this problem with linux-image-2.6.24-12-generic (2.6.24-12.22), so this should not be closed.

Revision history for this message
ski (skibrianski) wrote :

Can no longer reproduce with the latest versions of everything as of Mon Mar 24 21:54:56 GMT 2008. Previous to that apport was telling me something about not being able to submit a bug report because applicable libraries were out of date, so I guess that fixed it.

Revision history for this message
ski (skibrianski) wrote :

I was wrong. With the latest versions of everything as of Thu Mar 27 23:04 GMT 2008, this bug actually is still there, it just takes awhile longer for it to trigger itself. In this case, sitting in two moderately heavy IRC channels for about an hour did the trick.

Revision history for this message
Removed by request (removed1836289) wrote :

Sounds like a different bug to me. The one I was experimenting was directly related to Pidgin trying to play sound but not being able to - due to PulseAudio implementation.

Revision history for this message
Removed by request (removed1836289) wrote :

Closing this. Please reopen it if the issues are related with sound.

Changed in pidgin:
status: New → Invalid
Revision history for this message
jtm (jtm297) wrote :

I experience this problem and I am quite positive it is related to sound. My sound has been really buggy lately and I lose it a random times (most likely watching a flash video, then waiting a little while). I am not sure of the exact cause, whether it's a sound from pidgin occurring while I watch the flash video or whatever. The point is this when I lost my sound my computer began to go really slow. I checked top and sorted by memory usage, and pidgin was around 1.7gb My guess is a memory leak, and it only happened when I lost audio. I'd definitely check into the sound portion of the code to see if there is a leak there when pidgin cannot play a sound because /dev/dsp is unabled to be opened (it's not busy...)

Revision history for this message
Jeremy Visser (jeremy-visser) wrote :

This is _definitely_ related to sound. I can easily reproduce this bug by setting up my Bluetooth headset with PulseAudio. Then, I turn the headset off, which in turn crashes PulseAudio. Then, next time I receive a message in Pidgin, it will attempt to play the sound through PulseAudio, which fails, which sends Pidgin's memory usage through the use, and if I don't manage to open a terminal in 15 seconds and type "killall -9 pidgin" without any typos, my system will crash.

"killall -9 pidgin" immediately stops the high memory usage.

Changed in pidgin:
status: Invalid → Confirmed
Revision history for this message
Jeremy Visser (jeremy-visser) wrote :

Typo above:

    which sends Pidgin's memory usage through the _roof_

Revision history for this message
Craig Maloney (craig-decafbad) wrote :

I've noticed this behavior with Pidgin 2.5.2 under Intrepid.

Steps to reproduce:

1) Bring up pidgin and top
2) Sort top by memory usage
3) Bring up the sound tab under preferences
4) Make sure you have a sound event selected for this next part
5) click on preview and note pidgin's memory usage

Do it several times for added effect.

Revision history for this message
Alex Forencich (alex-alexelectronics) wrote :

I can confirm this in Intrepid as well. I had to restart pulseaudio after resuming from hibernate, and pidgin's memory usage went through the roof. I was at 96% of 3.2 GB RAM and 50% of 8 GB swap. pkill -sigkill pidgin made my memory use drop to 30% and swap drop to 12%. This bug should be marked critical because it brings the system to its knees almost immediately and it is essentially impossible to set straight without completely killing pidgin.

Revision history for this message
James McPhee (jmcphe) wrote :

Also running intrepid and getting the memory leak problem. If I set the sound device to ALSA in pidgin (tools->preferences->sounds->method=alsa), it seems to slow down the issue. Found that hint in pidgin's bug #7519.
http://developer.pidgin.im/ticket/7519

Revision history for this message
Brad Clements (bkc) wrote :

I am seeing the same problem with 8.10

 PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
21084 bkc 20 0 2995m 64m 23m S 0 0.8 0:29.14 gaim

in my case, there isn't any process with 'pulse' in it, and audacious fails to run w/ pulse output (but works with alsa)

I just upgraded from 7.04 to 8.10 over the weekend, so still working out the bugs..

Now I have killed and restarted it (as pidgin). Here's something interesting.

go to preferences, sounds. Change 'method' to "ALSA" and then click the preview button a bunch of times, watch top report.. memory usage doesn't change too much.

Now change "method" to "automatic". Every time I click preview, top shows a 10megabyte increase in VIRT for pidgin.

change method back to "alsa" and click preview a few more times, memory does not increase.

meanwhile pulse doesn't seem to be running (I guess). syslog shows this:

ec 2 22:51:12 fire pulseaudio[19617]: ltdl-bind-now.c: Failed to find original dlopen loader.
Dec 2 22:51:12 fire pulseaudio[19617]: pid.c: Stale PID file, overwriting.
Dec 2 22:51:12 fire pulseaudio[19617]: main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
Dec 2 22:51:12 fire pulseaudio[19617]: main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted

tried /etc/init.d/pulseaudio start, that failed, but after reading the notes, as the logged in user I tried:

fire:/vmware/Phoenix> pulseaudio --daemonize
W: ltdl-bind-now.c: Failed to find original dlopen loader.

anyway, for pidgin I'll stick to alsa for now.

Revision history for this message
sreque (seanthenewt) wrote :

I saw this bug in 8.10 as well. After switching from one user to another my sound went completely haywire, blaring a beeping noise incessantly, so I killed all instances of pulseaudio. A little bit later, I noticed my machine slow to a crawl and that all 2 GB of RAM were in use. Top revealed pidgin to be the culprit.

Changed in pidgin:
status: Unknown → Fix Released
Revision history for this message
Utkarsh Sengar (utkarsh2012) wrote :

Same problem in Ubuntu 10.04 when I use my cam on Jabber

Revision history for this message
Pedro Villavicencio (pedro) wrote :

Thanks for the report, it has been some time without any response or feedback in this bug report and we are wondering if this is still an issue for you with the latest release of Ubuntu the Natty Narwhal, May you please test with that version and comment back if you're still having or not the issue? Please have a look at http://www.ubuntu.com/download to know how to install that version.Thanks in advance.

Changed in pidgin (Ubuntu):
status: Confirmed → Fix Released
description: updated
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.