[Bug 727193] New: Heap grows continuously when playbin used for gapless audio playback.

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Thu Mar 27 15:25:37 PDT 2014


https://bugzilla.gnome.org/show_bug.cgi?id=727193
  GStreamer | gst-plugins-base | 1.2.3

           Summary: Heap grows continuously when playbin used for gapless
                    audio playback.
    Classification: Platform
           Product: GStreamer
           Version: 1.2.3
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gst-plugins-base
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: jlitzinger at control4.com
         QAContact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---


Created an attachment (id=273116)
 --> (https://bugzilla.gnome.org/attachment.cgi?id=273116)
Playbin test using alsasink

When playbin is used for gapless playback on a 32 bit platform, the heap grows
continuously (monitored via monitor_playbin.sh), with the largest growth
typically occurring at a song transition.  The growth from song to song is
typically 100+K, and over the course of a day I've seen the heap sitting at
10M.  The longer it runs gapless, the larger the heap.  After the pipeline is
taken to NULL and playbin is unref'd, the memory is still not returned to the
system.

Valgrind only shows 96 bytes lost, though possibly and still reachable are
larger, output attached as valgrind.txt, consisting of ~3 tracks.  As stated
previously, the longer it goes, the larger the heap.

Massif output attached as massif.out.4975 from ~3 tracks.

I have run the test code and observed this behavior under the following
configurations:

- Ubuntu 12.04 32-bit VM
--  Glib 2.36.2/3 built from source (also required building autoconf, automake,
m4).
--  Gstreamer 1.1.3, 1.2.0, 1.2.3, master (except plugins-bad, which remained
at 1.2 because the build failed during the docs in master).
----  Gstreamer compiled with --with-memory-alignment=malloc and 8
--  With and without orc.  The issue was originally observed with orc, but my
recent testing has been without in an effort to reduce variables.
--  mpg123 1.15.4
--  G_SLICE set to always-malloc or unset
--  G_DEBUG set to gc-friendly or unset

- Ubuntu 13.1 32-bit VM
--  Glib 2.38 (system pkg)
--  Gstreamer 1.2.0

-  Attached playbin.c modified to use GLib main loop.
-  Attached code on an ARM target.

On 64 bit platforms (ubuntu 12.04 and 13.1), the heap does not grow, though the
overall memory footprint of the process does.  At the moment, I suspect this is
due to libc's more frequent use of mmap, though I haven't proven that out.  I
do know that the heap does not grow at all on a 64-bit target.

Test code, valgrind output, and massif output attached.  The "songs" and
"prefix" need to be filled in with whatever you are playing and any prefix to
the directory, but I've tried a variety of mp3s, the behavior occurs with all
of them.  To stop playback, 'echo 123 > stop' in the directory the test is
executed from.

One modification I have found useful is to use a fakesink instead of playbin's
default sink as this causes the heap to grow much faster.  I have attached the
modified file as playbin_fakesink.c.  Valgrind and massif output attached for
this configuration as valgrind_fakesink.txt and massif.out.5586.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list