gmediarender segfaults on startup

Bug #1392850 reported by Ayke on 2014-11-14
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Raspbian
Undecided
Unassigned

Bug Description

GMediaRender does not start when started as a service, and crashes when started on the command line.

package version: 0.0.7~git20140302+repack-2

$ gmediarender --logfile=/dev/stdout
INFO [2014-11-14 20:13:18.578340 | main] gmediarender 0.0.7-git log started [ gmediarender 0.0.7-git (libupnp-1.6.17; glib-2.42.0; gstreamer-1.4.3) ]
INFO [2014-11-14 20:13:18.584364 | output] Using output module: gst (GStreamer multimedia framework)
INFO [2014-11-14 20:13:18.633999 | connmgr] Registering support for 'application/x-hls'
INFO [2014-11-14 20:13:18.639542 | connmgr] Registering support for 'audio/*'
INFO [2014-11-14 20:13:18.651792 | connmgr] Registering support for 'audio/x-raw'
INFO [2014-11-14 20:13:18.743386 | connmgr] Registering support for 'video/mpeg'
INFO [2014-11-14 20:13:18.748977 | connmgr] Registering support for 'audio/mpeg'
INFO [2014-11-14 20:13:18.751780 | connmgr] Registering support for 'audio/x-mpeg'
INFO [2014-11-14 20:13:18.752076 | connmgr] Registering support for 'audio/x-scpls'
INFO [2014-11-14 20:13:18.752261 | connmgr] Registering support for 'audio/L16;rate=44100;channels=2'
INFO [2014-11-14 20:13:18.752437 | connmgr] Registering support for 'audio/x-ac3'
[...snip...]
INFO [2014-11-14 20:13:23.107708 | connmgr] Registering support for 'application/x-bzip'
INFO [2014-11-14 20:13:23.139872 | connmgr] Registering support for 'video/x-mimic'
INFO [2014-11-14 20:13:23.177525 | connmgr] Registering support for 'audio/x-amr-nb-sh'
INFO [2014-11-14 20:13:23.182473 | connmgr] Registering support for 'audio/x-amr-wb-sh'
INFO [2014-11-14 20:13:23.189737 | connmgr] Registering support for 'audio/x-private1-ac3'
INFO [2014-11-14 20:13:23.221377 | connmgr] Registering support for 'application/x-icy'
INFO [2014-11-14 20:13:23.303935 | connmgr] Registering support for 'image/jp2'
INFO [2014-11-14 20:13:23.357466 | connmgr] Registering support for 'application/x-teletext'
INFO [2014-11-14 20:13:23.400098 | connmgr] Registering support for 'application/mxf'
Segmentation fault

The same using gdb:

[...snip...]
INFO [2014-11-14 20:29:35.304225 | connmgr] Registering support for 'audio/x-xi'
INFO [2014-11-14 20:29:40.014707 | connmgr] Registering support for 'application/x-bzip'
INFO [2014-11-14 20:29:44.959509 | connmgr] Registering support for 'video/x-mimic'
INFO [2014-11-14 20:29:48.203822 | connmgr] Registering support for 'audio/x-amr-nb-sh'
INFO [2014-11-14 20:29:48.212237 | connmgr] Registering support for 'audio/x-amr-wb-sh'
INFO [2014-11-14 20:29:48.217083 | connmgr] Registering support for 'audio/x-private1-ac3'
INFO [2014-11-14 20:29:51.762901 | connmgr] Registering support for 'application/x-icy'
[New Thread 0xb0b0c460 (LWP 12893)]
INFO [2014-11-14 20:30:06.846872 | connmgr] Registering support for 'image/jp2'
INFO [2014-11-14 20:30:12.866230 | connmgr] Registering support for 'application/x-teletext'
INFO [2014-11-14 20:30:14.753974 | connmgr] Registering support for 'application/mxf'
[Thread 0xb0b0c460 (LWP 12893) exited]

Program received signal SIGSEGV, Segmentation fault.
strchr () at ../ports/sysdeps/arm/armv6/strchr.S:28
28 ../ports/sysdeps/arm/armv6/strchr.S: No such file or directory.
(gdb) bt
#0 strchr () at ../ports/sysdeps/arm/armv6/strchr.S:28
#1 0xb6d688d8 in g_param_spec_pool_lookup () from /usr/lib/arm-linux-gnueabihf/libgobject-2.0.so.0
#2 0xb6d636a4 in g_object_set_valist () from /usr/lib/arm-linux-gnueabihf/libgobject-2.0.so.0
#3 0xb6d6400c in g_object_set () from /usr/lib/arm-linux-gnueabihf/libgobject-2.0.so.0
Cannot access memory at address 0x140
#4 0xaffa0110 in ?? () from /usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstdvb.so
Cannot access memory at address 0x140
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) info threads
  Id Target Id Frame
  2 Thread 0xb600a460 (LWP 10864) "gmediarender" 0xb6c437a4 in __pthread_cond_wait (cond=0x2a135e70,
    cond@entry=<error reading variable: Cannot access memory at address 0x7268636a>, mutex=0x2a135e24) at pthread_cond_wait.c:187
* 1 Thread 0xb6a21000 (LWP 10754) "gmediarender" strchr () at ../ports/sysdeps/arm/armv6/strchr.S:28
(gdb) thread 2
[Switching to thread 2 (Thread 0xb600a460 (LWP 10864))]
#0 0xb6c437a4 in __pthread_cond_wait (cond=0x2a135e70, cond@entry=<error reading variable: Cannot access memory at address 0x7268636a>, mutex=0x2a135e24)
    at pthread_cond_wait.c:187
187 pthread_cond_wait.c: No such file or directory.
(gdb) bt
#0 0xb6c437a4 in __pthread_cond_wait (cond=0x2a135e70, mutex=0x2a135e24) at pthread_cond_wait.c:187
#1 0xb6040ca4 in ?? () from /usr/lib/arm-linux-gnueabihf/libschroedinger-1.0.so.0
/build/gdb-xaye8S/gdb-7.7.1+dfsg/gdb/frame.c:472: internal-error: get_frame_id: Assertion `fi->this_id.p' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n)

Ayke (ayke) wrote :

This bug is worked-around by uninstalling gstreamer1.0-plugins-bad. It looks like the actual bug is within that package, looking at the stack trace.

Here is a more useful stack trace (I installed some relevant -dbg packages):

Program received signal SIGSEGV, Segmentation fault.
strchr () at ../ports/sysdeps/arm/armv6/strchr.S:28
28 ../ports/sysdeps/arm/armv6/strchr.S: No such file or directory.
(gdb) bt
#0 strchr () at ../ports/sysdeps/arm/armv6/strchr.S:28
#1 0xb6d678d8 in g_param_spec_pool_lookup (pool=0x32cd8, param_name=param_name@entry=0x2 <error: Cannot access memory at address 0x2>,
    owner_type=11052728, walk_ancestors=walk_ancestors@entry=1) at /build/glib2.0-87CS9e/glib2.0-2.42.0/./gobject/gparam.c:1070
#2 0xb6d626a4 in g_object_set_valist (object=object@entry=0xdb2a70,
    first_property_name=first_property_name@entry=0xaf93ce68 "max-size-buffers", var_args=..., var_args@entry=...)
    at /build/glib2.0-87CS9e/glib2.0-2.42.0/./gobject/gobject.c:2121
#3 0xb6d6300c in g_object_set (_object=0xdb2a70, first_property_name=0xaf93ce68 "max-size-buffers")
    at /build/glib2.0-87CS9e/glib2.0-2.42.0/./gobject/gobject.c:2269
#4 0xaf934110 in dvb_base_bin_init (dvbbasebin=0xa008a8) at dvbbasebin.c:419
#5 0xb6d80d48 in g_type_create_instance (type=<optimized out>) at /build/glib2.0-87CS9e/glib2.0-2.42.0/./gobject/gtype.c:1865
#6 0xb6d5fee4 in g_object_new_internal (class=0x0, class@entry=0xffdd58, params=params@entry=0x0, n_params=n_params@entry=0)
    at /build/glib2.0-87CS9e/glib2.0-2.42.0/./gobject/gobject.c:1774
#7 0xb6d61ed8 in g_object_newv (object_type=16768120, n_parameters=n_parameters@entry=0, parameters=parameters@entry=0x0)
    at /build/glib2.0-87CS9e/glib2.0-2.42.0/./gobject/gobject.c:1922
#8 0xb6df4424 in gst_element_factory_create (factory=0x75120, name=name@entry=0x0) at gstelementfactory.c:376
#9 0x0001804c in scan_mime_list () at output_gstreamer.c:133
#10 output_gstreamer_init () at output_gstreamer.c:494
#11 0x000126f4 in main (argc=<optimized out>, argv=<optimized out>) at main.c:249

Ayke (ayke) wrote :

I reported the issue in GStreamer itself, as I believe there lies the real issue.

    https://bugzilla.gnome.org/show_bug.cgi?id=740191

Ayke (ayke) wrote :
Changed in raspbian:
status: New → Fix Committed
peter green (plugwash) wrote :

Are you running wheezy or jessie?

What does

apt-cache policy gstreamer1.0-plugins-bad say?

Ayke (ayke) wrote :

I am running jessie.

Right now it isn't installed (as a workaround), but here you go:

$ apt-cache policy gstreamer1.0-plugins-bad
gstreamer1.0-plugins-bad:
  Installed: (none)
  Candidate: 1.4.3-2+b1
  Version table:
     1.4.3-2+b1 0
        500 http://mirrordirector.raspbian.org/raspbian/ jessie/main armhf Packages
     1.2.1-0+rpi1rpi3 0
        500 http://archive.raspberrypi.org/debian/ wheezy/main armhf Packages

Of course, it would be version 1.4.3-2+b1 if it were installed.

peter green (plugwash) wrote :

It would be helpful if you could try this on an i386 Debian install to find out whether it's a general 32-bit issue or a Pi specific issue. If the former then this really needs to be pushed to Debian.

peter green (plugwash) wrote :

Also can you tell me where I can actually find the commit in question, i'm not too familiar with how gstreamer upstream arrange things.

Ayke (ayke) wrote :

I assume you're familiar with git.

The commit hash is 3e1d7630187dd96b137553aec2c6edb60c213682.
The repositories are listed here (it's gst-plugins-bad):
    http://gstreamer.freedesktop.org/modules/
The actual commit (a small one-liner) is visible online here:
    http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=3e1d7630187dd96b137553aec2c6edb60c213682

Testing it on 32-bit Debian will take some more work, and thus time.

Ayke (ayke) wrote :

I just tested it on a minimal installation of Debian jessie 32 bit, and could not reproduce the bug. I have upgraded my Pi because there was an update for gstreamer1.0 (just to be sure), but the fix wasn't included in that update. So it looks like this bug only appears on the Raspberry Pi or maybe only on ARM hardware. I have no other ARM hardware I could test this on.

Note: I have tested Debian jessie 32bit in a virtual machine (VirtualBox) running on a 64bit host. I don't know whether that matters.

peter green (plugwash) wrote :

I've just uploaded an updated package to raspbian which should fix this. Thanks.

Changed in raspbian:
status: Fix Committed → Fix Released
Ayke (ayke) wrote :

Version 1.4.4-2+rpi1 doesn't fix the issue. I still get the same backtrace.

$ pi:~$ dpkg -l | grep gst
ii gstreamer1.0-alsa:armhf 1.4.4-2 armhf GStreamer plugin for ALSA
ii gstreamer1.0-plugins-bad:armhf 1.4.4-2+rpi1 armhf GStreamer plugins from the "bad" set
ii gstreamer1.0-plugins-bad-dbg:armhf 1.4.4-2+rpi1 armhf GStreamer plugins from the "bad" set (debug symbols)
ii gstreamer1.0-plugins-base:armhf 1.4.4-2 armhf GStreamer plugins from the "base" set
ii gstreamer1.0-plugins-good:armhf 1.4.4-2 armhf GStreamer plugins from the "good" set
ii gstreamer1.0-plugins-ugly:armhf 1.4.4-2 armhf GStreamer plugins from the "ugly" set
ii gstreamer1.0-x:armhf 1.4.4-2 armhf GStreamer plugins for X11 and Pango
ii libgstreamer-plugins-bad1.0-0:armhf 1.4.4-2+rpi1 armhf GStreamer development files for libraries from the "bad" set
ii libgstreamer-plugins-bad1.0-dev 1.4.4-2+rpi1 armhf GStreamer development files for libraries from the "bad" set
ii libgstreamer-plugins-base1.0-0:armhf 1.4.4-2 armhf GStreamer libraries from the "base" set
ii libgstreamer1.0-0:armhf 1.4.4-2 armhf Core GStreamer libraries and elements
ii libgstreamer1.0-0-dbg:armhf 1.4.4-2 armhf Core GStreamer libraries and elements

Ayke (ayke) on 2015-02-03
Changed in raspbian:
status: Fix Released → Fix Committed
peter green (plugwash) on 2015-02-03
Changed in raspbian:
status: Fix Committed → New
peter green (plugwash) wrote :

DOH

I added the patch to the source package but forgot to add it to the list of patches to apply.

peter green (plugwash) wrote :

should be fied in version 1.4.4-2+rpi2

Ayke (ayke) wrote :

Yes, I saw the update yesterday or something. It is fixed! Thank you! Now gmediarender can render AAC files and doesn't segfault.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.