Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 608956 - media-sound/clementine-1.3.1-r5 segfaults when media-libs/qt-gstreamer[qt5] is installed
Summary: media-sound/clementine-1.3.1-r5 segfaults when media-libs/qt-gstreamer[qt5] i...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Fat-Zer
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-11 13:23 UTC by Fernando Rodriguez
Modified: 2017-02-16 09:46 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fernando Rodriguez 2017-02-11 13:23:07 UTC
Clementine segfaults at startup when media-libs/qt-gstreamer[qt5] is installed as it tries to load both qt4 and qt5 libraries. I had to disable qt5 to get it working, if I enable both it still tries to load the qt5 versions.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f315a976700 (LWP 1915)]
0x00007f3114f48097 in QMetaObject::className() const () from /usr/lib64/libQt5Core.so.5
(gdb) bt
#0  0x00007f3114f48097 in QMetaObject::className() const () from /usr/lib64/libQt5Core.so.5
#1  0x00007f3115933e57 in ?? () from /usr/lib64/libQt5Widgets.so.5
#2  0x00007f31158bb867 in ?? () from /usr/lib64/libQt5Widgets.so.5
#3  0x00007f3173c123aa in ?? () from /lib64/ld-linux-x86-64.so.2
#4  0x00007f3173c124bb in ?? () from /lib64/ld-linux-x86-64.so.2
#5  0x00007f3173c16a88 in ?? () from /lib64/ld-linux-x86-64.so.2
#6  0x00007f3173c12254 in ?? () from /lib64/ld-linux-x86-64.so.2
#7  0x00007f3173c16109 in ?? () from /lib64/ld-linux-x86-64.so.2
#8  0x00007f316c47cfd9 in ?? () from /lib64/libdl.so.2
#9  0x00007f3173c12254 in ?? () from /lib64/ld-linux-x86-64.so.2
#10 0x00007f316c47d589 in ?? () from /lib64/libdl.so.2
#11 0x00007f316c47d071 in dlopen () from /lib64/libdl.so.2
#12 0x00007f316a961952 in g_module_open () from /usr/lib64/libgmodule-2.0.so.0
#13 0x00007f31705ac775 in _priv_gst_plugin_load_file_for_registry (filename=filename@entry=0x7f31541cc170 "/usr/lib64/gstreamer-1.0/libgstqt5videosink.so", 
    registry=0x7f315405c160, error=error@entry=0x0) at /var/tmp/portage/media-libs/gstreamer-1.8.3/work/gstreamer-1.8.3/gst/gstplugin.c:745
#14 0x00007f31705b9d38 in gst_registry_scan_plugin_file (context=context@entry=0x7f315a975b40, 
    filename=filename@entry=0x7f31541cc170 "/usr/lib64/gstreamer-1.0/libgstqt5videosink.so", file_size=156112, file_mtime=1486816871)
    at /var/tmp/portage/media-libs/gstreamer-1.8.3/work/gstreamer-1.8.3/gst/gstregistry.c:1180
#15 0x00007f31705baaeb in gst_registry_scan_path_level (context=context@entry=0x7f315a975b40, path=path@entry=0x7f317061b3ce "/usr/lib64/gstreamer-1.0", 
    level=level@entry=10) at /var/tmp/portage/media-libs/gstreamer-1.8.3/work/gstreamer-1.8.3/gst/gstregistry.c:1338
#16 0x00007f31705bafc6 in gst_registry_scan_path_internal (context=context@entry=0x7f315a975b40, path=path@entry=0x7f317061b3ce "/usr/lib64/gstreamer-1.0")
    at /var/tmp/portage/media-libs/gstreamer-1.8.3/work/gstreamer-1.8.3/gst/gstregistry.c:1365
#17 0x00007f31705bcbb2 in scan_and_update_registry (write_changes=1, error=0x7f315a975b38, 
    registry_file=0x7f315405ec10 "/home/fernan/.cache/gstreamer-1.0/registry.x86_64.bin", default_registry=0x7f315405c160)
    at /var/tmp/portage/media-libs/gstreamer-1.8.3/work/gstreamer-1.8.3/gst/gstregistry.c:1660
#18 ensure_current_registry (error=0x7f315a975b38) at /var/tmp/portage/media-libs/gstreamer-1.8.3/work/gstreamer-1.8.3/gst/gstregistry.c:1752
#19 gst_update_registry () at /var/tmp/portage/media-libs/gstreamer-1.8.3/work/gstreamer-1.8.3/gst/gstregistry.c:1828
#20 0x00007f3170550bf6 in init_post (context=<optimized out>, group=<optimized out>, data=<optimized out>, error=<optimized out>)
    at /var/tmp/portage/media-libs/gstreamer-1.8.3/work/gstreamer-1.8.3/gst/gst.c:720
#21 0x00007f3170b24b29 in g_option_context_parse () from /usr/lib64/libglib-2.0.so.0
#22 0x00007f3170551567 in gst_init_check (argc=0x0, argv=0x0, err=0x7f315a975cb8) at /var/tmp/portage/media-libs/gstreamer-1.8.3/work/gstreamer-1.8.3/gst/gst.c:354
#23 0x00007f31705515a7 in gst_init (argc=<optimized out>, argv=<optimized out>) at /var/tmp/portage/media-libs/gstreamer-1.8.3/work/gstreamer-1.8.3/gst/gst.c:400
#24 0x0000000000636e1a in GstEngine::InitialiseGstreamer() ()
#25 0x00000000005ca9cd in QtConcurrent::RunFunctionTask<void>::run() ()
#26 0x00007f3172b3516a in ?? () from /usr/lib64/qt4/libQtCore.so.4
#27 0x00007f3172b436cd in ?? () from /usr/lib64/qt4/libQtCore.so.4
#28 0x00007f31714c2454 in start_thread () from /lib64/libpthread.so.0
#29 0x00007f316ce5428d in clone () from /lib64/libc.so.6
Comment 1 Fat-Zer 2017-02-11 19:45:08 UTC
I can't reproduce the segfault.

Generally it doesn't sounds like a clementine's issue: the clementine doesn't depends upon media-libs/qt-gstreamer. Could you try to reproduce this with some other gstreamer software? e.g. media-video/totem?
Comment 2 Fernando Rodriguez 2017-02-12 00:14:05 UTC
Can you delete any gstreamer directories on your home directory and make sure that clementine actually closed before restarting it. AFAIU gstreamer keeps a registry of installed plugins but its updated when you restart the program.

I'm not sure who's bug is it but it happens when clementine calls gst_init(nullptr, nullptr). According to gstreamer's documentation it is supposed to load all system-wide plugins so gstreamer is doing the right thing as per the docs. Clementine can pass a custom plugin registry via an environment variable to only load the plugins it needs.

I haven't tried media-video/totem yet but I'm pretty sure I won't have exactly the same problem since it's not a Qt application. But I will try it later with both qt4 and qt5 enabled for qt-gstreamer and see what happens.
Comment 3 Fat-Zer 2017-02-15 13:59:26 UTC
I finally managed to reproduce the failure by setting GST_REGISTRY_FORK=no. Do you somewhy have it in your environment? Have you some other wierd GST variables set? If you don't the failure likely indicates that gst registry helper fails to start. Could you post the output of "GST_DEBUG=5 GST_DEBUG_NO_COLOR=yes clementine 2>&1"?

(In reply to Fernando Rodriguez from comment #2)
> Can you delete any gstreamer directories on your home directory and make
> sure that clementine actually closed before restarting it. AFAIU gstreamer
> keeps a registry of installed plugins but its updated when you restart the
> program.

As you can already understood the removing of cache haven't brought any results as well as running under a crystal clean profile.

> I'm not sure who's bug is it but it happens when clementine calls
> gst_init(nullptr, nullptr). According to gstreamer's documentation it is
> supposed to load all system-wide plugins so gstreamer is doing the right
> thing as per the docs. Clementine can pass a custom plugin registry via an
> environment variable to only load the plugins it needs.

The call gst_init() loads only standerd plugins (i.e. that come with gstreamer itself), not all system-wide plugins. The failure happens during registering of installed plugins. Normally it should be done in a separate process (/usr/lib64/gstreamer-1.0/gst-plugin-scanner) and shouldn't interact with the main one, but it seems somewhy on your system it's disabled or fails. If it is so, I don't really see a way how to sanely support it (i.e. AFAIS there are no ways to prevent registration of certain gstreamer plugins).
Comment 4 Fernando Rodriguez 2017-02-15 18:03:11 UTC
Thanks, that was helpful. AppArmor was preventing execution of gst-plugin-scanner. That's the first thing I should've checked, sorry.
Comment 5 Fat-Zer 2017-02-16 01:14:10 UTC
(In reply to Fernando Rodriguez from comment #4)
> Thanks, that was helpful. AppArmor was preventing execution of
> gst-plugin-scanner. That's the first thing I should've checked, sorry.

Shouldn't it be workarounded in gstreamer or whatever somehow?
Comment 6 Michael Palimaka (kensington) gentoo-dev 2017-02-16 09:46:15 UTC
(In reply to Fat-Zer from comment #5)
> (In reply to Fernando Rodriguez from comment #4)
> > Thanks, that was helpful. AppArmor was preventing execution of
> > gst-plugin-scanner. That's the first thing I should've checked, sorry.
> 
> Shouldn't it be workarounded in gstreamer or whatever somehow?

If an AppArmor profile breaks an application, the profile needs updating. If the application could work around it, it'd default the point of AppArmor. :-)