Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 501850 - dev-qt/qtdbus with media-video/vlc[qt] on exit after using the Qt file selection dialog - in QDBusAdaptorConnector::relaySlot (this=this@entry=0x7fb1dc7657c0, argv=argv@entry=0x7fff5cc2c840) at qdbusabstractadaptor.cpp:270
Summary: dev-qt/qtdbus with media-video/vlc[qt] on exit after using the Qt file select...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
URL: https://forum.videolan.org/viewtopic....
Whiteboard:
Keywords: PATCH
Depends on: 510042
Blocks:
  Show dependency tree
 
Reported: 2014-02-19 23:07 UTC by Greg Turner
Modified: 2014-11-20 02:24 UTC (History)
0 users

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


Attachments
qtdbus-4.8.5-dont-crash-if-signaled-from-wrong-thread.patch (qtdbus-4.8.5-dont-crash-if-signaled-from-wrong-thread.patch,2.81 KB, patch)
2014-02-19 23:09 UTC, Greg Turner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Turner 2014-02-19 23:07:25 UTC
greg@moneypit ~/src/dulwich $ gdb /usr/bin/vlc --core /home/greg/delme/core
GNU gdb (Gentoo 7.6.2 p1) 7.6.2
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /usr/bin/vlc...Reading symbols from /usr/lib64/debug/usr/bin/vlc.debug...done.
done.
[New LWP 22526]
[New LWP 22532]

warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

warning: the debug information found in "/usr/lib64/debug//lib64/libm-2.17.so.debug" does not match "/lib64/libm.so.6" (CRC mismatch).


warning: the debug information found in "/usr/lib64/debug/lib64/libm-2.17.so.debug" does not match "/lib64/libm.so.6" (CRC mismatch).


Core was generated by `vlc'.
Program terminated with signal 11, Segmentation fault.
#0  0x00007fb1e018216b in QDBusAdaptorConnector::relaySlot (this=this@entry=0x7fb1dc7657c0, argv=argv@entry=0x7fff5cc2c840) at qdbusabstractadaptor.cpp:270
270         relay(d->currentSender->sender, d->currentSender->signal, argv);
(gdb) 
(gdb) bt
#0  0x00007fb1e018216b in QDBusAdaptorConnector::relaySlot (this=this@entry=0x7fb1dc7657c0, argv=argv@entry=0x7fff5cc2c840) at qdbusabstractadaptor.cpp:270
#1  0x00007fb1e0182817 in QDBusAdaptorConnector::qt_metacall (this=0x7fb1dc7657c0, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fff5cc2c840)
    at qdbusabstractadaptor.cpp:366
#2  0x00007fb1ed46ae42 in QMetaObject::activate (sender=sender@entry=0x7fb1dc765910, m=m@entry=0x7fb1ed7b5c40 <QObject::staticMetaObject>, 
    local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fff5cc2c840) at kernel/qobject.cpp:3577
#3  0x00007fb1ed46b64f in QObject::destroyed (this=this@entry=0x7fb1dc765910, _t1=_t1@entry=0x7fb1dc765910) at .moc/release-shared/moc_qobject.cpp:148
#4  0x00007fb1ed46f533 in QObject::~QObject (this=0x7fb1dc765910, __in_chrg=<optimized out>) at kernel/qobject.cpp:843
#5  0x00007fb1e236c1e1 in KIO::Scheduler::~Scheduler (this=0x7fb1dc765910, __in_chrg=<optimized out>)
    at /usr/src/debug/kde-base/kdelibs-4.12.1/kdelibs-4.12.1/kio/kio/scheduler.cpp:791
#6  0x00007fb1e237856b in KIO::SchedulerPrivate::~SchedulerPrivate (this=0x7fb1dc765af0, __in_chrg=<optimized out>)
    at /usr/src/debug/kde-base/kdelibs-4.12.1/kdelibs-4.12.1/kio/kio/scheduler.cpp:667
#7  0x00007fb1e236f057 in destroy () at /usr/src/debug/kde-base/kdelibs-4.12.1/kdelibs-4.12.1/kio/kio/scheduler.cpp:748
#8  0x00007fb1fb0af5c9 in __run_exit_handlers (status=0, listp=0x7fb1fb4165a8 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true) at exit.c:77
#9  0x00007fb1fb0af60d in __GI_exit (status=<optimized out>) at exit.c:99
#10 0x00007fb1fb09989c in __libc_start_main (main=0x401070 <main>, argc=1, ubp_av=0x7fff5cc2ca98, init=<optimized out>, fini=<optimized out>, 
    rtld_fini=<optimized out>, stack_end=0x7fff5cc2ca88) at libc-start.c:292
#11 0x00000000004013f7 in _start ()

Although, after some research, I'd confidently wager this is a vlc bug more than anything else I think it's going to be hard to fix in vlc and easy to fix in qtdbus.  A patch is enclsoed.

Reproducible: Always

Steps to Reproduce:
1. vlc
2. open file
3. exit vlc
Actual Results:  
core dump

Expected Results:  
vlc exits cleanly

I will enclose a patch that can be applied to dev-qt/qtdbus to resolve the problem.  I can't really guarantee the patch is safe/good/beautiful as I haven't done enough homework on but just kind of pieced together various other people's statements to quickly figure out what might be done about it, without fact checking my sources.

But, it W4M.  The patch prevents a null pointer deference, so... how much worse than crashing can it be to not crash in this case?  Conceivably, lots, I suppose, but I'm fairly confident that not crashing is the lesser of two evils in this instance.
Comment 1 Greg Turner 2014-02-19 23:09:29 UTC
Created attachment 370844 [details, diff]
qtdbus-4.8.5-dont-crash-if-signaled-from-wrong-thread.patch

Prevents crash due to null pointer deference when vlc (or, presumably, anyone else) decides to signal qtdbus from the wrong thread.
Comment 2 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2014-02-22 14:30:30 UTC
Patch appears to be addressed at Qt, I've assigned to them such that they can decide whether or not to apply it; as for the other situations possible, please report those upstream with VLC and/or Qt-DBUS. Thank you in advance.
Comment 3 Davide Pesavento (RETIRED) gentoo-dev 2014-03-26 16:59:53 UTC
The patch will be in qt 4.8.6 right?
Comment 4 Davide Pesavento (RETIRED) gentoo-dev 2014-11-20 02:24:42 UTC
Fixed in 4.8.6