Bug 356957 - Crash in KRunner with un-threadsafe KIconLoader
Summary: Crash in KRunner with un-threadsafe KIconLoader
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (show other bugs)
Version: 5.4.3
Platform: openSUSE Linux
: NOR crash
Target Milestone: 1.0
Assignee: David Edmundson
URL:
Keywords: drkonqi
: 360103 368788 372031 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-12-20 14:41 UTC by derwesermann
Modified: 2016-11-04 12:06 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description derwesermann 2015-12-20 14:41:26 UTC
Application: plasmashell (5.4.3)

Qt Version: 5.5.0
Operating System: Linux 4.1.13-5-default x86_64
Distribution: "openSUSE Leap 42.1 (x86_64)"

-- Information about the crash:
- What I was doing when the application crashed:

I just booted. While KDE showed up everything looked normal to me as always. I looked into the Wifi overview, opened the setting but did not change to my 2nd wifinetwork. Closed wifi settings window. This time i dont understand the error message because i did it this time like several times before. But i know there is an issue with showing my batterie stats. 
Im counting on you guys.

p.s.: new kernel improves hardware support very well.


p.p.s.: sorry for this worse report. I was used to that everything works fine while booting.

-- Backtrace:
Application: Plasma (plasmashell), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fb8724d17c0 (LWP 1891))]

Thread 12 (Thread 0x7fb85bf5b700 (LWP 1892)):
#0  0x00007fb86ba1fc1d in poll () from /lib64/libc.so.6
#1  0x00007fb870946422 in ?? () from /usr/lib64/libxcb.so.1
#2  0x00007fb87094800f in xcb_wait_for_event () from /usr/lib64/libxcb.so.1
#3  0x00007fb85e0abc29 in ?? () from /usr/lib64/libQt5XcbQpa.so.5
#4  0x00007fb86c11655f in QThreadPrivate::start (arg=0x1a3b9b0) at thread/qthread_unix.cpp:331
#5  0x00007fb86b2290a4 in start_thread () from /lib64/libpthread.so.0
#6  0x00007fb86ba2804d in clone () from /lib64/libc.so.6

Thread 11 (Thread 0x7fb859333700 (LWP 1967)):
#0  0x00007ffdc33bbb26 in clock_gettime ()
#1  0x00007fb86ba34c9d in clock_gettime () from /lib64/libc.so.6
#2  0x00007fb86c1c6b06 in qt_clock_gettime (ts=0x7fb859332b80, clock=<optimized out>) at tools/qelapsedtimer_unix.cpp:105
#3  do_gettime (frac=<synthetic pointer>, sec=<synthetic pointer>) at tools/qelapsedtimer_unix.cpp:156
#4  qt_gettime () at tools/qelapsedtimer_unix.cpp:165
#5  0x00007fb86c346089 in QTimerInfoList::updateCurrentTime (this=this@entry=0x7fb84c002ed0) at kernel/qtimerinfo_unix.cpp:84
#6  0x00007fb86c346615 in QTimerInfoList::timerWait (this=0x7fb84c002ed0, tm=...) at kernel/qtimerinfo_unix.cpp:381
#7  0x00007fb86c34782e in timerSourcePrepareHelper (timeout=0x7fb859332c34, src=<optimized out>) at kernel/qeventdispatcher_glib.cpp:127
#8  timerSourcePrepare (source=<optimized out>, timeout=0x7fb859332c34) at kernel/qeventdispatcher_glib.cpp:160
#9  0x00007fb8681004ad in g_main_context_prepare () from /usr/lib64/libglib-2.0.so.0
#10 0x00007fb868100d80 in ?? () from /usr/lib64/libglib-2.0.so.0
#11 0x00007fb868100f7c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#12 0x00007fb86c347a5b in QEventDispatcherGlib::processEvents (this=0x7fb84c0008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:420
#13 0x00007fb86c2eea63 in QEventLoop::exec (this=this@entry=0x7fb859332df0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#14 0x00007fb86c11184a in QThread::exec (this=this@entry=0x1b18270) at thread/qthread.cpp:503
#15 0x00007fb86f3fa5f8 in QQmlThreadPrivate::run (this=0x1b18270) at /usr/src/debug/qtdeclarative-opensource-src-5.5.0/src/qml/qml/ftw/qqmlthread.cpp:141
#16 0x00007fb86c11655f in QThreadPrivate::start (arg=0x1b18270) at thread/qthread_unix.cpp:331
#17 0x00007fb86b2290a4 in start_thread () from /lib64/libpthread.so.0
#18 0x00007fb86ba2804d in clone () from /lib64/libc.so.6

Thread 10 (Thread 0x7fb848318700 (LWP 1993)):
#0  0x00007fb86810048b in g_main_context_prepare () from /usr/lib64/libglib-2.0.so.0
#1  0x00007fb868100d80 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007fb868100f7c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007fb86c347a5b in QEventDispatcherGlib::processEvents (this=0x7fb8400008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:420
#4  0x00007fb86c2eea63 in QEventLoop::exec (this=this@entry=0x7fb848317df0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#5  0x00007fb86c11184a in QThread::exec (this=this@entry=0x1e32e60) at thread/qthread.cpp:503
#6  0x00007fb86f3fa5f8 in QQmlThreadPrivate::run (this=0x1e32e60) at /usr/src/debug/qtdeclarative-opensource-src-5.5.0/src/qml/qml/ftw/qqmlthread.cpp:141
#7  0x00007fb86c11655f in QThreadPrivate::start (arg=0x1e32e60) at thread/qthread_unix.cpp:331
#8  0x00007fb86b2290a4 in start_thread () from /lib64/libpthread.so.0
#9  0x00007fb86ba2804d in clone () from /lib64/libc.so.6

Thread 9 (Thread 0x7fb84686a700 (LWP 2000)):
#0  0x00007fb86ba1fc1d in poll () from /lib64/libc.so.6
#1  0x00007fb868100e64 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007fb868100f7c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007fb86c347a5b in QEventDispatcherGlib::processEvents (this=0x7fb8380008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:420
#4  0x00007fb86c2eea63 in QEventLoop::exec (this=this@entry=0x7fb846869df0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#5  0x00007fb86c11184a in QThread::exec (this=this@entry=0x1e2f610) at thread/qthread.cpp:503
#6  0x00007fb86f3fa5f8 in QQmlThreadPrivate::run (this=0x1e2f610) at /usr/src/debug/qtdeclarative-opensource-src-5.5.0/src/qml/qml/ftw/qqmlthread.cpp:141
#7  0x00007fb86c11655f in QThreadPrivate::start (arg=0x1e2f610) at thread/qthread_unix.cpp:331
#8  0x00007fb86b2290a4 in start_thread () from /lib64/libpthread.so.0
#9  0x00007fb86ba2804d in clone () from /lib64/libc.so.6

Thread 8 (Thread 0x7fb844de1700 (LWP 2002)):
#0  0x00007fb86b22d05f in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fb871bad7eb in ?? () from /usr/lib64/libQt5Script.so.5
#2  0x00007fb871bad819 in ?? () from /usr/lib64/libQt5Script.so.5
#3  0x00007fb86b2290a4 in start_thread () from /lib64/libpthread.so.0
#4  0x00007fb86ba2804d in clone () from /lib64/libc.so.6

Thread 7 (Thread 0x7fb83cbaa700 (LWP 2005)):
#0  0x00007ffdc33bbb26 in clock_gettime ()
#1  0x00007fb86ba34c9d in clock_gettime () from /lib64/libc.so.6
#2  0x00007fb86c1c6b06 in qt_clock_gettime (ts=0x7fb83cba9b40, clock=<optimized out>) at tools/qelapsedtimer_unix.cpp:105
#3  do_gettime (frac=<synthetic pointer>, sec=<synthetic pointer>) at tools/qelapsedtimer_unix.cpp:156
#4  qt_gettime () at tools/qelapsedtimer_unix.cpp:165
#5  0x00007fb86c346089 in QTimerInfoList::updateCurrentTime (this=this@entry=0x7fb7b4002ed0) at kernel/qtimerinfo_unix.cpp:84
#6  0x00007fb86c346615 in QTimerInfoList::timerWait (this=0x7fb7b4002ed0, tm=...) at kernel/qtimerinfo_unix.cpp:381
#7  0x00007fb86c34782e in timerSourcePrepareHelper (timeout=0x7fb83cba9bf4, src=<optimized out>) at kernel/qeventdispatcher_glib.cpp:127
#8  timerSourcePrepare (source=<optimized out>, timeout=0x7fb83cba9bf4) at kernel/qeventdispatcher_glib.cpp:160
#9  0x00007fb8681004ad in g_main_context_prepare () from /usr/lib64/libglib-2.0.so.0
#10 0x00007fb868100d80 in ?? () from /usr/lib64/libglib-2.0.so.0
#11 0x00007fb868100f7c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#12 0x00007fb86c347a5b in QEventDispatcherGlib::processEvents (this=0x7fb7b40008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:420
#13 0x00007fb86c2eea63 in QEventLoop::exec (this=this@entry=0x7fb83cba9db0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#14 0x00007fb86c11184a in QThread::exec (this=this@entry=0x2060140) at thread/qthread.cpp:503
#15 0x00007fb86ff8df82 in QQuickPixmapReader::run (this=0x2060140) at /usr/src/debug/qtdeclarative-opensource-src-5.5.0/src/quick/util/qquickpixmapcache.cpp:754
#16 0x00007fb86c11655f in QThreadPrivate::start (arg=0x2060140) at thread/qthread_unix.cpp:331
#17 0x00007fb86b2290a4 in start_thread () from /lib64/libpthread.so.0
#18 0x00007fb86ba2804d in clone () from /lib64/libc.so.6

Thread 6 (Thread 0x7fb7ae00a700 (LWP 2010)):
#0  0x00007ffdc33bbb26 in clock_gettime ()
#1  0x00007fb86ba34c9d in clock_gettime () from /lib64/libc.so.6
#2  0x00007fb86c1c6b06 in qt_clock_gettime (ts=0x7fb7ae009bb0, clock=<optimized out>) at tools/qelapsedtimer_unix.cpp:105
#3  do_gettime (frac=<synthetic pointer>, sec=<synthetic pointer>) at tools/qelapsedtimer_unix.cpp:156
#4  qt_gettime () at tools/qelapsedtimer_unix.cpp:165
#5  0x00007fb86c346089 in QTimerInfoList::updateCurrentTime (this=this@entry=0x7fb7a8002cd0) at kernel/qtimerinfo_unix.cpp:84
#6  0x00007fb86c3484e0 in timerSourceCheckHelper (src=<optimized out>) at kernel/qeventdispatcher_glib.cpp:141
#7  timerSourceCheck (source=<optimized out>) at kernel/qeventdispatcher_glib.cpp:168
#8  0x00007fb8681008f1 in g_main_context_check () from /usr/lib64/libglib-2.0.so.0
#9  0x00007fb868100df8 in ?? () from /usr/lib64/libglib-2.0.so.0
#10 0x00007fb868100f7c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#11 0x00007fb86c347a5b in QEventDispatcherGlib::processEvents (this=0x7fb7a80008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:420
#12 0x00007fb86c2eea63 in QEventLoop::exec (this=this@entry=0x7fb7ae009dd0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#13 0x00007fb86c11184a in QThread::exec (this=<optimized out>) at thread/qthread.cpp:503
#14 0x00007fb7af657cf7 in KCupsConnection::run() () from /usr/lib64/libkcupslib.so
#15 0x00007fb86c11655f in QThreadPrivate::start (arg=0x4fa5f10) at thread/qthread_unix.cpp:331
#16 0x00007fb86b2290a4 in start_thread () from /lib64/libpthread.so.0
#17 0x00007fb86ba2804d in clone () from /lib64/libc.so.6

Thread 5 (Thread 0x7fb79edb7700 (LWP 2241)):
#0  0x00007fb86b22d05f in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fb86c11757b in wait (time=18446744073709551615, this=0x59abf20) at thread/qwaitcondition_unix.cpp:136
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x6997640, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:208
#3  0x00007fb7b274665f in ThreadWeaver::Weaver::takeFirstAvailableJobOrSuspendOrWait(ThreadWeaver::Thread*, bool, bool, bool) () from /usr/lib64/libKF5ThreadWeaver.so.5
#4  0x00007fb7b274a43a in ?? () from /usr/lib64/libKF5ThreadWeaver.so.5
#5  0x00007fb7b27446cb in ThreadWeaver::Weaver::applyForWork(ThreadWeaver::Thread*, bool) () from /usr/lib64/libKF5ThreadWeaver.so.5
#6  0x00007fb7b274a481 in ?? () from /usr/lib64/libKF5ThreadWeaver.so.5
#7  0x00007fb7b27446cb in ThreadWeaver::Weaver::applyForWork(ThreadWeaver::Thread*, bool) () from /usr/lib64/libKF5ThreadWeaver.so.5
#8  0x00007fb7b2748005 in ThreadWeaver::Thread::run() () from /usr/lib64/libKF5ThreadWeaver.so.5
#9  0x00007fb86c11655f in QThreadPrivate::start (arg=0x5a8d0f0) at thread/qthread_unix.cpp:331
#10 0x00007fb86b2290a4 in start_thread () from /lib64/libpthread.so.0
#11 0x00007fb86ba2804d in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7fb79cd94700 (LWP 2242)):
#0  0x00007fb86b22d05f in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fb86c11757b in wait (time=18446744073709551615, this=0x59abf20) at thread/qwaitcondition_unix.cpp:136
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x6997640, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:208
#3  0x00007fb7b274665f in ThreadWeaver::Weaver::takeFirstAvailableJobOrSuspendOrWait(ThreadWeaver::Thread*, bool, bool, bool) () from /usr/lib64/libKF5ThreadWeaver.so.5
#4  0x00007fb7b274a43a in ?? () from /usr/lib64/libKF5ThreadWeaver.so.5
#5  0x00007fb7b27446cb in ThreadWeaver::Weaver::applyForWork(ThreadWeaver::Thread*, bool) () from /usr/lib64/libKF5ThreadWeaver.so.5
#6  0x00007fb7b274a481 in ?? () from /usr/lib64/libKF5ThreadWeaver.so.5
#7  0x00007fb7b27446cb in ThreadWeaver::Weaver::applyForWork(ThreadWeaver::Thread*, bool) () from /usr/lib64/libKF5ThreadWeaver.so.5
#8  0x00007fb7b2748005 in ThreadWeaver::Thread::run() () from /usr/lib64/libKF5ThreadWeaver.so.5
#9  0x00007fb86c11655f in QThreadPrivate::start (arg=0x5c5a6c0) at thread/qthread_unix.cpp:331
#10 0x00007fb86b2290a4 in start_thread () from /lib64/libpthread.so.0
#11 0x00007fb86ba2804d in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7fb797fff700 (LWP 2243)):
#0  0x00007fb86b22d05f in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fb86c11757b in wait (time=18446744073709551615, this=0x59abf20) at thread/qwaitcondition_unix.cpp:136
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x6997640, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:208
#3  0x00007fb7b274665f in ThreadWeaver::Weaver::takeFirstAvailableJobOrSuspendOrWait(ThreadWeaver::Thread*, bool, bool, bool) () from /usr/lib64/libKF5ThreadWeaver.so.5
#4  0x00007fb7b274a43a in ?? () from /usr/lib64/libKF5ThreadWeaver.so.5
#5  0x00007fb7b27446cb in ThreadWeaver::Weaver::applyForWork(ThreadWeaver::Thread*, bool) () from /usr/lib64/libKF5ThreadWeaver.so.5
#6  0x00007fb7b274a481 in ?? () from /usr/lib64/libKF5ThreadWeaver.so.5
#7  0x00007fb7b27446cb in ThreadWeaver::Weaver::applyForWork(ThreadWeaver::Thread*, bool) () from /usr/lib64/libKF5ThreadWeaver.so.5
#8  0x00007fb7b2748005 in ThreadWeaver::Thread::run() () from /usr/lib64/libKF5ThreadWeaver.so.5
#9  0x00007fb86c11655f in QThreadPrivate::start (arg=0x7fb7980031c0) at thread/qthread_unix.cpp:331
#10 0x00007fb86b2290a4 in start_thread () from /lib64/libpthread.so.0
#11 0x00007fb86ba2804d in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7fb7977fe700 (LWP 2244)):
[KCrash Handler]
#6  QHashData::rehash (this=0x1acf5f0, hint=9) at tools/qhash.cpp:602
#7  0x00007fb86ecbddbc in KIconLoader::hasIcon(QString const&) const () from /usr/lib64/libKF5IconThemes.so.5
#8  0x00007fb86ecb5cf1 in KIconEngine::availableSizes(QIcon::Mode, QIcon::State) const () from /usr/lib64/libKF5IconThemes.so.5
#9  0x00007fb86c8c18c3 in QIcon::availableSizes(QIcon::Mode, QIcon::State) const () from /usr/lib64/libQt5Gui.so.5
#10 0x00007fb86c8c2222 in QIcon::fromTheme(QString const&, QIcon const&) () from /usr/lib64/libQt5Gui.so.5
#11 0x00007fb79da7339f in ?? () from /usr/lib64/qt5/plugins/krunner_services.so
#12 0x00007fb79da745ba in ?? () from /usr/lib64/qt5/plugins/krunner_services.so
#13 0x00007fb7b2d99106 in Plasma::AbstractRunner::performMatch(Plasma::RunnerContext&) () from /usr/lib64/libKF5Runner.so.5
#14 0x00007fb7b2749ba0 in ThreadWeaver::Executor::run(QSharedPointer<ThreadWeaver::JobInterface> const&, ThreadWeaver::Thread*) () from /usr/lib64/libKF5ThreadWeaver.so.5
#15 0x00007fb7b2748930 in ThreadWeaver::Job::execute(QSharedPointer<ThreadWeaver::JobInterface> const&, ThreadWeaver::Thread*) () from /usr/lib64/libKF5ThreadWeaver.so.5
#16 0x00007fb7b2747f3a in ThreadWeaver::Thread::run() () from /usr/lib64/libKF5ThreadWeaver.so.5
#17 0x00007fb86c11655f in QThreadPrivate::start (arg=0x66fa310) at thread/qthread_unix.cpp:331
#18 0x00007fb86b2290a4 in start_thread () from /lib64/libpthread.so.0
#19 0x00007fb86ba2804d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7fb8724d17c0 (LWP 1891)):
#0  0x00007fb86ba1fc1d in poll () from /lib64/libc.so.6
#1  0x00007fb868100e64 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007fb868100f7c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007fb86c347a3c in QEventDispatcherGlib::processEvents (this=0x1a59b70, flags=...) at kernel/qeventdispatcher_glib.cpp:418
#4  0x00007fb86c2eea63 in QEventLoop::exec (this=this@entry=0x7ffdc320fc90, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#5  0x00007fb86c2f65d6 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1229
#6  0x000000000043467b in main ()

Reported using DrKonqi
Comment 1 David Edmundson 2015-12-20 20:36:31 UTC
Thread 2.
>#6 QHashData::rehash (this=0x1acf5f0, hint=9) at tools/qhash.cpp:602 #7 0x00007fb86ecbddbc in KIconLoader::hasIcon(QString const&) const () from /usr/lib64/libKF5IconThemes.so.5

Thanks.

I imagine this is KIconLoader not being thread safe.
Comment 2 Marco Martin 2016-03-17 15:07:29 UTC
*** Bug 360103 has been marked as a duplicate of this bug. ***
Comment 3 Martin Klapetek 2016-03-21 22:27:19 UTC
Should be moved to frameworks-iconthemes then?
Comment 4 David Edmundson 2016-03-23 13:28:57 UTC
Maybe. Though then it would just get ignored there and it only affects plasma/krunner so it's us who have to fix it.

It would also be fixed by
https://codereview.qt-project.org/#/c/140446/

which is blocked because although it fixes a problem we do encounter, it doesn't also fix some hypothetical problem that we don't have \o/
Comment 5 Rich Coe 2016-08-23 16:41:05 UTC
krunner did not crash -- two threads are stuck in an endless cycle
two threads are attempting to reshash the same KIconLoader object mAvailableIcons
Qt v5.6.1
plasma5-workspace-5.7.3

  17   Thread 0x7fa67f7fe700 (LWP 7391) "GlobalQueue[05]" 0x00007fa6dab99c33 in QHashData::rehash (this=0x2670c70, hint=<optimized out>) at tools/qhash.cpp:642
* 24   Thread 0x7fa67ffff700 (LWP 7398) "GlobalQueue[12]" 0x00007fa6dab99c3b in QHashData::rehash (this=0x2670c70, hint=<optimized out>) at tools/qhash.cpp:642

p this  $3 = (QHashData * const) 0x2670c70
[Switching to thread 17 (Thread 0x7fa67f7fe700 (LWP 7391))]
p this  $4 = (QHashData * const) 0x2670c70
Comment 7 David Edmundson 2016-08-28 00:04:03 UTC
It's not quite the same, but it is still fixed by those commits
Comment 8 Wolfgang Bauer 2016-08-29 20:42:58 UTC
(In reply to David Edmundson from comment #7)
> It's not quite the same, but it is still fixed by those commits

I meant that it seems to be the same underlying issue... ;-)
Comment 9 David Edmundson 2016-09-14 12:29:06 UTC
*** Bug 368788 has been marked as a duplicate of this bug. ***
Comment 10 Marco Martin 2016-11-04 12:06:05 UTC
*** Bug 372031 has been marked as a duplicate of this bug. ***