Bug 385679

Summary: Discover crashes in QObjectPrivate::addConnection() while searching
Product: Discover Reporter: Ian McGrath <ian>
Component: discoverAssignee: Aleix Pol <aleixpol>
Status: RESOLVED FIXED    
Severity: crash CC: bjiang738, nate, nicolas.fella, nnc.hnd, rdieter, wenifede
Priority: NOR Keywords: drkonqi
Version: 5.10.5   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In: 5.11.4

Description Ian McGrath 2017-10-12 21:15:54 UTC
Application: plasma-discover (5.10.5)

Qt Version: 5.7.1
Frameworks Version: 5.36.0
Operating System: Linux 4.13.4-200.fc26.x86_64 x86_64
Distribution (Platform): Fedora RPMs

-- Information about the crash:
- What I was doing when the application crashed: searching for "skype". I had just opened the app and the first thing I did was search

The crash can be reproduced every time.

-- Backtrace:
Application: Discover (plasma-discover), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fa84c4a38c0 (LWP 2800))]

Thread 10 (Thread 0x7fa8053ba700 (LWP 2814)):
#0  0x00007fa8484a3d7d in postEventSourcePrepare(_GSource*, int*) () from /lib64/libQt5Core.so.5
#1  0x00007fa8409a0ac9 in g_main_context_prepare () from /lib64/libglib-2.0.so.0
#2  0x00007fa8409a149b in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#3  0x00007fa8409a167c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#4  0x00007fa8484a3e6b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#5  0x00007fa84845460a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#6  0x00007fa8482ac99a in QThread::exec() () from /lib64/libQt5Core.so.5
#7  0x00007fa8482b0c9e in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#8  0x00007fa8461fa36d in start_thread () from /lib64/libpthread.so.0
#9  0x00007fa847697bbf in clone () from /lib64/libc.so.6

Thread 9 (Thread 0x7fa8077fe700 (LWP 2812)):
#0  0x00007fa84768bacd in poll () from /lib64/libc.so.6
#1  0x00007fa8409a1569 in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#2  0x00007fa8409a167c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3  0x00007fa8484a3e6b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#4  0x00007fa84845460a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#5  0x00007fa8482ac99a in QThread::exec() () from /lib64/libQt5Core.so.5
#6  0x00007fa8482b0c9e in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#7  0x00007fa8461fa36d in start_thread () from /lib64/libpthread.so.0
#8  0x00007fa847697bbf in clone () from /lib64/libc.so.6

Thread 8 (Thread 0x7fa807fff700 (LWP 2811)):
#0  0x00007ffffcbbfc1b in clock_gettime ()
#1  0x00007fa8476a6ca6 in clock_gettime () from /lib64/libc.so.6
#2  0x00007fa848347a91 in qt_gettime() () from /lib64/libQt5Core.so.5
#3  0x00007fa8484a2539 in QTimerInfoList::updateCurrentTime() () from /lib64/libQt5Core.so.5
#4  0x00007fa8484a2935 in QTimerInfoList::timerWait(timespec&) () from /lib64/libQt5Core.so.5
#5  0x00007fa8484a3b0c in timerSourcePrepareHelper(GTimerSource*, int*) () from /lib64/libQt5Core.so.5
#6  0x00007fa8484a3bae in timerSourcePrepare(_GSource*, int*) () from /lib64/libQt5Core.so.5
#7  0x00007fa8409a0ac9 in g_main_context_prepare () from /lib64/libglib-2.0.so.0
#8  0x00007fa8409a149b in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#9  0x00007fa8409a167c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#10 0x00007fa8484a3e6b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#11 0x00007fa84845460a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#12 0x00007fa8482ac99a in QThread::exec() () from /lib64/libQt5Core.so.5
#13 0x00007fa8482b0c9e in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#14 0x00007fa8461fa36d in start_thread () from /lib64/libpthread.so.0
#15 0x00007fa847697bbf in clone () from /lib64/libc.so.6

Thread 7 (Thread 0x7fa80cabe700 (LWP 2808)):
#0  0x00007fa84768bacd in poll () from /lib64/libc.so.6
#1  0x00007fa8409a1569 in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#2  0x00007fa8409a1902 in g_main_loop_run () from /lib64/libglib-2.0.so.0
#3  0x00007fa83329ccb6 in gdbus_shared_thread_func () from /lib64/libgio-2.0.so.0
#4  0x00007fa8409c8536 in g_thread_proxy () from /lib64/libglib-2.0.so.0
#5  0x00007fa8461fa36d in start_thread () from /lib64/libpthread.so.0
#6  0x00007fa847697bbf in clone () from /lib64/libc.so.6

Thread 6 (Thread 0x7fa80d2bf700 (LWP 2807)):
#0  0x00007fa8409e64a9 in g_mutex_lock () from /lib64/libglib-2.0.so.0
#1  0x00007fa8409a044e in g_main_context_acquire () from /lib64/libglib-2.0.so.0
#2  0x00007fa8409a1425 in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#3  0x00007fa8409a167c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#4  0x00007fa8409a16c1 in glib_worker_main () from /lib64/libglib-2.0.so.0
#5  0x00007fa8409c8536 in g_thread_proxy () from /lib64/libglib-2.0.so.0
#6  0x00007fa8461fa36d in start_thread () from /lib64/libpthread.so.0
#7  0x00007fa847697bbf in clone () from /lib64/libc.so.6

Thread 5 (Thread 0x7fa822888700 (LWP 2806)):
#0  0x00007fa84c4872b0 in update_get_addr () from /lib64/ld-linux-x86-64.so.2
#1  0x00007fa84c48d0f8 in __tls_get_addr () from /lib64/ld-linux-x86-64.so.2
#2  0x00007fa8482afc26 in QThreadData::current(bool) () from /lib64/libQt5Core.so.5
#3  0x00007fa8484a3d1a in postEventSourcePrepare(_GSource*, int*) () from /lib64/libQt5Core.so.5
#4  0x00007fa8409a0ac9 in g_main_context_prepare () from /lib64/libglib-2.0.so.0
#5  0x00007fa8409a149b in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#6  0x00007fa8409a167c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#7  0x00007fa8484a3e6b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#8  0x00007fa84845460a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#9  0x00007fa8482ac99a in QThread::exec() () from /lib64/libQt5Core.so.5
#10 0x00007fa84bb36ff6 in QQuickPixmapReader::run() () from /lib64/libQt5Quick.so.5
#11 0x00007fa8482b0c9e in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#12 0x00007fa8461fa36d in start_thread () from /lib64/libpthread.so.0
#13 0x00007fa847697bbf in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7fa8290f4700 (LWP 2804)):
#0  0x00007fa8409e64a9 in g_mutex_lock () from /lib64/libglib-2.0.so.0
#1  0x00007fa8409a0ad6 in g_main_context_prepare () from /lib64/libglib-2.0.so.0
#2  0x00007fa8409a149b in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#3  0x00007fa8409a167c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#4  0x00007fa8484a3e6b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#5  0x00007fa84845460a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#6  0x00007fa8482ac99a in QThread::exec() () from /lib64/libQt5Core.so.5
#7  0x00007fa848d559b5 in QQmlThreadPrivate::run() () from /lib64/libQt5Qml.so.5
#8  0x00007fa8482b0c9e in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#9  0x00007fa8461fa36d in start_thread () from /lib64/libpthread.so.0
#10 0x00007fa847697bbf in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7fa82a305700 (LWP 2803)):
#0  0x00007fa84768bacd in poll () from /lib64/libc.so.6
#1  0x00007fa8409a1569 in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#2  0x00007fa8409a167c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3  0x00007fa8484a3e6b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#4  0x00007fa84845460a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#5  0x00007fa8482ac99a in QThread::exec() () from /lib64/libQt5Core.so.5
#6  0x00007fa84c5f3a39 in QDBusConnectionManager::run() () from /lib64/libQt5DBus.so.5
#7  0x00007fa8482b0c9e in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#8  0x00007fa8461fa36d in start_thread () from /lib64/libpthread.so.0
#9  0x00007fa847697bbf in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7fa832926700 (LWP 2802)):
#0  0x00007fa84768bacd in poll () from /lib64/libc.so.6
#1  0x00007fa84029fc97 in _xcb_conn_wait () from /lib64/libxcb.so.1
#2  0x00007fa8402a1a8a in xcb_wait_for_event () from /lib64/libxcb.so.1
#3  0x00007fa836fd9ba9 in QXcbEventReader::run() () from /lib64/libQt5XcbQpa.so.5
#4  0x00007fa8482b0c9e in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#5  0x00007fa8461fa36d in start_thread () from /lib64/libpthread.so.0
#6  0x00007fa847697bbf in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7fa84c4a38c0 (LWP 2800)):
[KCrash Handler]
#6  0x00007fa84847e550 in QObjectPrivate::addConnection(int, QObjectPrivate::Connection*) () from /lib64/libQt5Core.so.5
#7  0x00007fa848482074 in QObjectPrivate::connectImpl(QObject const*, int, QObject const*, void**, QtPrivate::QSlotObjectBase*, Qt::ConnectionType, int const*, QMetaObject const*) () from /lib64/libQt5Core.so.5
#8  0x00007fa848482382 in QObject::connectImpl(QObject const*, void**, QObject const*, void**, QtPrivate::QSlotObjectBase*, Qt::ConnectionType, int const*, QMetaObject const*) () from /lib64/libQt5Core.so.5
#9  0x00007fa80c0abec6 in QtPrivate::QFunctorSlotObject<KNSBackend::searchStream(QString const&)::{lambda()#2}, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) () from /usr/lib64/qt5/plugins/discover/kns-backend.so
#10 0x00007fa84847d8da in QObject::event(QEvent*) () from /lib64/libQt5Core.so.5
#11 0x00007fa8494855dc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5
#12 0x00007fa84948cc74 in QApplication::notify(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5
#13 0x00007fa848455627 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib64/libQt5Core.so.5
#14 0x00007fa84845785b in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /lib64/libQt5Core.so.5
#15 0x00007fa8484a3dd3 in postEventSourceDispatch(_GSource*, int (*)(void*), void*) () from /lib64/libQt5Core.so.5
#16 0x00007fa8409a1247 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#17 0x00007fa8409a15e8 in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#18 0x00007fa8409a167c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#19 0x00007fa8484a3e4f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#20 0x00007fa84845460a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#21 0x00007fa84845c27c in QCoreApplication::exec() () from /lib64/libQt5Core.so.5
#22 0x0000560530176750 in main ()

Possible duplicates by query: bug 384871, bug 383246, bug 382509.

Reported using DrKonqi
Comment 1 Nate Graham 2017-10-20 20:39:15 UTC
*** Bug 386001 has been marked as a duplicate of this bug. ***
Comment 2 Nate Graham 2017-11-07 16:21:15 UTC
*** Bug 386319 has been marked as a duplicate of this bug. ***
Comment 3 Nate Graham 2017-11-07 17:34:19 UTC
*** Bug 386137 has been marked as a duplicate of this bug. ***
Comment 4 Nate Graham 2017-11-16 22:09:30 UTC
*** Bug 386999 has been marked as a duplicate of this bug. ***
Comment 5 Aleix Pol 2017-11-17 13:18:11 UTC
Note to self.

Here's the backtrace with symbols from one of the duplicates:

Thread 1 (Thread 0x7fb17e0c55c0 (LWP 8483)):
[KCrash Handler]
#6  0x0000000100000001 in ?? ()
#7  0x00007fb17a10ace2 in QObjectPrivate::connectImpl (sender=sender@entry=0x55f64e5f9f20, signal_index=9, receiver=receiver@entry=0x55f64e6c7ab0, slot=slot@entry=0x7ffc1cd93f20, slotObj=slotObj@entry=0x7fb16400ab60, type=<optimized out>, types=<optimized out>, senderMetaObject=<optimized out>) at kernel/qobject.cpp:4847
#8  0x00007fb17a10aeb2 in QObject::connectImpl (sender=sender@entry=0x55f64e5f9f20, signal=signal@entry=0x7ffc1cd93f10, receiver=0x55f64e6c7ab0, slot=slot@entry=0x7ffc1cd93f20, slotObj=0x7fb16400ab60, type=Qt::AutoConnection, types=0x0, senderMetaObject=0x7fb11d6f6c20 <KNSBackend::staticMetaObject>) at kernel/qobject.cpp:4784
#9  0x00007fb11d4e6336 in QObject::connect<void (KNSBackend::*)(QVector<AbstractResource*> const&), void (ResultsStream::*)(QVector<AbstractResource*> const&)> (type=Qt::AutoConnection, slot=(void (ResultsStream::*)(ResultsStream * const, const QVector<AbstractResource*> &)) 0x7fb17d038670 <ResultsStream::resourcesFound(QVector<AbstractResource*> const&)>, receiver=<optimized out>, signal=(void (KNSBackend::*)(KNSBackend * const, const QVector<AbstractResource*> &)) 0x7fb11d4f1120 <KNSBackend::receivedResources(QVector<AbstractResource*> const&)>, sender=0x55f64e5f9f20) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject.h:259
#10 KNSBackend::<lambda()>::operator() (__closure=0x55f64eaf6ca0) at ./libdiscover/backends/KNSBackend/KNSBackend.cpp:357
#11 QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, KNSBackend::searchStream(const QString&)::<lambda()> >::call (arg=<optimized out>, f=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:130
#12 QtPrivate::Functor<KNSBackend::searchStream(const QString&)::<lambda()>, 0>::call<QtPrivate::List<>, void> (arg=<optimized out>, f=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:240
#13 QtPrivate::QFunctorSlotObject<KNSBackend::searchStream(const QString&)::<lambda()>, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=<optimized out>, this_=0x55f64eaf6c90, r=<optimized out>, a=<optimized out>, ret=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject_impl.h:168
#14 0x00007fb17a107452 in QObject::event (this=0x55f64e6c7ab0, e=<optimized out>) at kernel/qobject.cpp:1246
#15 0x00007fb17b6d646c in QApplicationPrivate::notify_helper (this=this@entry=0x55f64bd9d290, receiver=receiver@entry=0x55f64e6c7ab0, e=e@entry=0x55f64e603320) at kernel/qapplication.cpp:3717
#16 0x00007fb17b6ddd34 in QApplication::notify (this=0x7ffc1cd94550, receiver=0x55f64e6c7ab0, e=0x55f64e603320) at kernel/qapplication.cpp:3476
#17 0x00007fb17a0d7de8 in QCoreApplication::notifyInternal2 (receiver=0x55f64e6c7ab0, event=event@entry=0x55f64e603320) at kernel/qcoreapplication.cpp:1018
#18 0x00007fb17a0da55d in QCoreApplication::sendEvent (event=0x55f64e603320, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:233
#19 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x55f64bda2df0) at kernel/qcoreapplication.cpp:1678
#20 0x00007fb17a0daae8 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1532
#21 0x00007fb17a130e53 in postEventSourceDispatch (s=0x55f64bdff0f0) at kernel/qeventdispatcher_glib.cpp:276
#22 0x00007fb1741a5fb7 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007fb1741a61f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x00007fb1741a627c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#25 0x00007fb17a13047f in QEventDispatcherGlib::processEvents (this=0x55f64be05dc0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#26 0x00007fb17a0d5e3a in QEventLoop::exec (this=this@entry=0x7ffc1cd94490, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#27 0x00007fb17a0deda4 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1291
#28 0x000055f64aab4fa8 in main (argc=<optimized out>, argv=<optimized out>) at ./discover/main.cpp:151
Comment 6 Aleix Pol 2018-01-29 16:14:15 UTC
This should be fixed as of the specified commit.