Several memory/file descriptor leaks in gstreamer 1.6.0

Bug #1529445 reported by dx on 2015-12-27
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
gst-plugins-base1.0 (Ubuntu)
Medium
Unassigned
Wily
Undecided
Iain Lane
gstreamer1.0 (Ubuntu)
Medium
Unassigned
Wily
Undecided
Iain Lane

Bug Description

Ubuntu 15.10 includes gstreamer 1.6.0. There were several important leak fixes in 1.6.1, some of which also meant holding references to file descriptors around, which can result in crashes once the fd limit is hit.

Upstream bugs:

https://bugzilla.gnome.org/show_bug.cgi?id=755867
https://bugzilla.gnome.org/show_bug.cgi?id=756552
https://bugzilla.gnome.org/show_bug.cgi?id=756611

All of these were fixed in 1.6.1

What motivated me to investigate this bug is a 'random' crash in pidgin after several hours of leaking file descriptors, which looks exactly like bug #1479715 but happened even after applying that patch. Turns out that it wasn't pidgin holding the references that kept those file descriptors open, but it was gstreamer itself.

I'd fill the whole SRU template here but i'm afraid there are too many patches that need to be applied to fix these bugs properly (some of them in gst-plugins-base, some of them in libgstreamer, and I don't know exactly which ones are needed) and anything less than updating to 1.6.1 or 1.6.2 would be wrong, IMO. The whole 1.6.x branch is bugfixes only.

[Test Case]

 * Download https://bugzilla.gnome.org/attachment.cgi?id=313241 to playbin-leak.c

 * Optionally change the "a.ogg" uri to a valid path to a sound in the local system (maybe "file:///usr/share/sounds/alsa/Noise.wav"). Some leaks and warnings appear anyway even without changing this.

 * Build with:

gcc -Wall $(pkg-config --cflags gstreamer-1.0 gtk+-3.0 glib-2.0) playbin-leak.c $(pkg-config --libs gstreamer-1.0 gtk+-3.0 glib-2.0)

 * Run as:

GOBJECT_DEBUG=instance-count GTK_DEBUG=interactive ./a.out

* Let it run, see warnings after some iterations, watch it leak.

Alternatively, how i've been testing this so far, which roughly imitates the pidgin crash (but probably only applies to a subset of the leaks)

 * Get a ubuntu 15.10 VM without sound card (so that pulseaudio fails to play sounds)

 * Do this:

cd /usr/share/sounds/alsa
valgrind --track-fds=yes gst-play-1.0 --audiosink=pulsesink Noise.wav Noise.wav Noise.wav

 * File descriptors open at exit should be 4, not 10 (it leaks two for each time it plays)

dx (dx) on 2015-12-27
description: updated
Changed in gst-plugins-base1.0 (Ubuntu):
importance: Undecided → Medium
Changed in gstreamer1.0 (Ubuntu):
importance: Undecided → Medium
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gst-plugins-base1.0 (Ubuntu):
status: New → Confirmed
Changed in gstreamer1.0 (Ubuntu):
status: New → Confirmed
Iain Lane (laney) on 2016-01-27
Changed in gst-plugins-base1.0 (Ubuntu):
status: Confirmed → Fix Released
Changed in gstreamer1.0 (Ubuntu):
status: Confirmed → Fix Released
Iain Lane (laney) wrote :

I uploaded 1.6.3 to wily --- it should be accepted soon, hopefully.

Changed in gst-plugins-base1.0 (Ubuntu Wily):
status: New → In Progress
Changed in gstreamer1.0 (Ubuntu Wily):
status: New → In Progress
Changed in gst-plugins-base1.0 (Ubuntu Wily):
assignee: nobody → Iain Lane (laney)
Changed in gstreamer1.0 (Ubuntu Wily):
assignee: nobody → Iain Lane (laney)

Hello Dx, or anyone else affected,

Accepted gst-plugins-base1.0 into wily-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gst-plugins-base1.0/1.6.3-1ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in gst-plugins-base1.0 (Ubuntu Wily):
status: In Progress → Fix Committed
tags: added: verification-needed
Brian Murray (brian-murray) wrote :

Hello Dx, or anyone else affected,

Accepted gstreamer1.0 into wily-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gstreamer1.0/1.6.3-1ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in gstreamer1.0 (Ubuntu Wily):
status: In Progress → Fix Committed
dx (dx) wrote :

Sorry for the delay testing this, just got my dev pc back.

Both test cases from the description are passing with the wily-proposed packages, version 1.6.3-1ubuntu1

Thanks!

tags: added: verification-done
removed: verification-needed
Iain Lane (laney) wrote :

thanks!

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gst-plugins-base1.0 - 1.6.3-1ubuntu1

---------------
gst-plugins-base1.0 (1.6.3-1ubuntu1) wily; urgency=medium

  * Merge from Debian unstable for wily SRU (LP: #1538524, #1529445).
    Remaining changes:
    + 0001-riff-Add-input-buffer-size-to-GstCaps.patch: Take patch from
      Alfonso Sanchez-Beato on upstream bug #737599 to add a field in the
      GstCaps containing the suggested buffer size for this stream.
    + Update Vcs-* for Ubuntu

gst-plugins-base1.0 (1.6.3-1) unstable; urgency=medium

  * New upstream bugfix release.

gst-plugins-base1.0 (1.6.2-1ubuntu1) xenial; urgency=medium

  * Merge from Debian unstable. Remaining changes:
    + 0001-riff-Add-input-buffer-size-to-GstCaps.patch: Take patch from
      Alfonso Sanchez-Beato on upstream bug #737599 to add a field in the
      GstCaps containing the suggested buffer size for this stream.
    + Update Vcs-* for Ubuntu

gst-plugins-base1.0 (1.6.2-1) unstable; urgency=medium

  * New upstream bugfix release.

gst-plugins-base1.0 (1.6.1-1ubuntu1) xenial; urgency=medium

  * Merge from Debian unstable. Remaining changes:
    + 0001-riff-Add-input-buffer-size-to-GstCaps.patch: Take patch from
      Alfonso Sanchez-Beato on upstream bug #737599 to add a field in the
      GstCaps containing the suggested buffer size for this stream.
    + Update Vcs-* for Ubuntu

gst-plugins-base1.0 (1.6.1-1) unstable; urgency=medium

  * debian/control.in:
    + Remove Recommends on alsa-base, it's a useless dummy package
      and not needed anyway (Closes: #785268).
  * New upstream bugfix release.

 -- Iain Lane <email address hidden> Wed, 27 Jan 2016 12:48:06 +0000

Changed in gst-plugins-base1.0 (Ubuntu Wily):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for gst-plugins-base1.0 has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gstreamer1.0 - 1.6.3-1ubuntu1

---------------
gstreamer1.0 (1.6.3-1ubuntu1) wily; urgency=medium

  * Upload from Debian unstable to wily. (LP: #1538524, #1529445)

gstreamer1.0 (1.6.3-1) unstable; urgency=medium

  * debian/control.in:
    + Build-depend on libgsl-dev | libgsl0-dev instead of just the latter.
  * New upstream bugfix release.

gstreamer1.0 (1.6.2-1) unstable; urgency=medium

  * New upstream bugfix release.

gstreamer1.0 (1.6.1-1) unstable; urgency=medium

  * New upstream bugfix release.

 -- Iain Lane <email address hidden> Wed, 27 Jan 2016 12:24:32 +0000

Changed in gstreamer1.0 (Ubuntu Wily):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers