After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 522336 - Change Playbin state back to NULL on error and EOS : fix potential memory leak when using pulsaudio
Change Playbin state back to NULL on error and EOS : fix potential memory lea...
Status: RESOLVED FIXED
Product: gnome-power-manager
Classification: Deprecated
Component: gnome-power-manager
2.22.x
Other All
: Normal critical
: ---
Assigned To: GNOME Power Manager Maintainer(s)
GNOME Power Manager Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2008-03-13 23:22 UTC by Florent Mertens
Modified: 2008-03-16 19:00 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
Watch gst message bus for EOS or error message. (1.40 KB, patch)
2008-03-13 23:26 UTC, Florent Mertens
none Details | Review

Description Florent Mertens 2008-03-13 23:22:25 UTC
Please describe the problem:
gnome-power-manager never change state of the playbin back to NULL when
it play sound event. This as multiple problems :
- lock indefinitely the mixer when using ALSA as gstreamer audio sink :
  No possibilty to start for ex. pulsaudio without killing gnome-power-manager.
- Create an HUGE leak when using pulsaudio as gstreamer audio sink and for
  some reasons pulsaudio crash, or you terminate the stream in pavucontrol.
  Don't know what cause this leak but in 2min this leaded to a total freeze
  (65% of memory).

Steps to reproduce:
1. Do an event that play a sound. Unplug/plug your ac power for ex.


Actual results:
If you use ALSA :
lsof | grep /dev/snd
show indefinitely gnome-power-manager.

If you use pulsaudio :
Look at pavucontrol, see the gnome-power-manager stream setting there.
Terminate the stream (right click) and see gnome-power-manager taking more and more ressource.

Expected results:
Nothing like that

Does this happen every time?
yes

Other information:
I'll post a patch to stop the stream properly by watching message bus.
Comment 1 Florent Mertens 2008-03-13 23:26:01 UTC
Created attachment 107255 [details] [review]
Watch gst message bus for EOS or error message.
Comment 2 Richard Hughes 2008-03-16 19:00:06 UTC
Well done for finding this! Thanks!

2008-03-16  Richard Hughes  <richard@hughsie.com>

	* src/gpm-sound.c: (gpm_sound_gst_bus_cb), (gpm_sound_init):
	We never change state of the playbin back to NULL when playing a sound
	event.
	This as multiple problems :
	- lock indefinitely the mixer when using ALSA as gstreamer audio sink :
	- Create an HUGE leak when using pulsaudio as gstreamer audio sink and for
	  some reasons pulsaudio crash, or you terminate the stream in pavucontrol.

	Patch by Florent Mertens <outpourav@yahoo.fr>, and slightly tweaked by
	me. Fixes #522336