Bug 354815 - krunner sometimes crashes when used as calculator
Summary: krunner sometimes crashes when used as calculator
Status: RESOLVED DUPLICATE of bug 355122
Alias: None
Product: krunner
Classification: Plasma
Component: general (show other bugs)
Version: 5.4.2
Platform: Kubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Vishesh Handa
URL:
Keywords:
: 345477 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-11-04 05:13 UTC by Sergey Basalaev
Modified: 2015-11-10 11:39 UTC (History)
3 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 Sergey Basalaev 2015-11-04 05:13:22 UTC
Sometimes when I type arithmetic in krunner it crashes. Crashes are unpredictable, the same expression may or may not crash it next time.

I wasn't able to send this bug using DrKonqi because it recognized krunner version as 0.1 (another bug?) and server does not accept report with such a version.

Reproducible: Sometimes




DrKonqi information:

Qt Version: 5.4.2
Operating System: Linux 4.2.0-16-generic x86_64
Distribution: Ubuntu 15.10

-- Backtrace:
Application: krunner (krunner), signal: Aborted
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
[Current thread is 1 (Thread 0x7f8688973800 (LWP 1366))]

Thread 7 (Thread 0x7f8674c89700 (LWP 1369)):
#0  0x00007f86854288dd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f868491abd2 in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#2  0x00007f868491c74f in xcb_wait_for_event () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#3  0x00007f8676fd3a39 in QXcbEventReader::run (this=0x194eb10) at qxcbconnection.cpp:1105
#4  0x00007f8685b1b2be in QThreadPrivate::start (arg=0x194eb10) at thread/qthread_unix.cpp:337
#5  0x00007f86836876aa in start_thread (arg=0x7f8674c89700) at pthread_create.c:333
#6  0x00007f8685433eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 6 (Thread 0x7f866cf62700 (LWP 1377)):
#0  0x00007f8682b08070 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007f8682b082fc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f8685d5229b in QEventDispatcherGlib::processEvents (this=0x7f86680008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:420
#3  0x00007f8685cf875a in QEventLoop::exec (this=this@entry=0x7f866cf61da0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#4  0x00007f8685b163d4 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:503
#5  0x00007f868791df85 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#6  0x00007f8685b1b2be in QThreadPrivate::start (arg=0x1b8c780) at thread/qthread_unix.cpp:337
#7  0x00007f86836876aa in start_thread (arg=0x7f866cf62700) at pthread_create.c:333
#8  0x00007f8685433eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 5 (Thread 0x7f865e5f8700 (LWP 1561)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f8685b1c55b in QWaitConditionPrivate::wait (time=18446744073709551615, this=0x19a57a0) at thread/qwaitcondition_unix.cpp:136
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x19a5930, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:208
#3  0x00007f8665ca74eb in ThreadWeaver::Weaver::blockThreadUntilJobsAreBeingAssigned_locked (this=this@entry=0x1d5a630, th=<optimized out>) at ../../src/weaver.cpp:594
#4  0x00007f8665ca829f in ThreadWeaver::Weaver::takeFirstAvailableJobOrSuspendOrWait (this=0x1d5a630, th=th@entry=0x383f4b0, threadWasBusy=threadWasBusy@entry=true, suspendIfInactive=suspendIfInactive@entry=false, justReturning=justReturning@entry=false) at ../../src/weaver.cpp:554
#5  0x00007f8665cac4c8 in ThreadWeaver::WorkingHardState::applyForWork (this=0x20ac7b0, th=0x383f4b0, wasBusy=<optimized out>) at ../../src/workinghardstate.cpp:66
#6  0x00007f8665ca744d in ThreadWeaver::Weaver::applyForWork (this=<optimized out>, th=0x383f4b0, wasBusy=<optimized out>) at ../../src/weaver.cpp:568
#7  0x00007f8665caa423 in ThreadWeaver::Thread::run (this=0x383f4b0) at ../../src/thread.cpp:103
#8  0x00007f8685b1b2be in QThreadPrivate::start (arg=0x383f4b0) at thread/qthread_unix.cpp:337
#9  0x00007f86836876aa in start_thread (arg=0x7f865e5f8700) at pthread_create.c:333
#10 0x00007f8685433eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 4 (Thread 0x7f8657fff700 (LWP 1562)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f8685b1c55b in QWaitConditionPrivate::wait (time=18446744073709551615, this=0x19a57a0) at thread/qwaitcondition_unix.cpp:136
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x19a5930, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:208
#3  0x00007f8665ca74eb in ThreadWeaver::Weaver::blockThreadUntilJobsAreBeingAssigned_locked (this=this@entry=0x1d5a630, th=<optimized out>) at ../../src/weaver.cpp:594
#4  0x00007f8665ca829f in ThreadWeaver::Weaver::takeFirstAvailableJobOrSuspendOrWait (this=0x1d5a630, th=th@entry=0x3841810, threadWasBusy=threadWasBusy@entry=true, suspendIfInactive=suspendIfInactive@entry=false, justReturning=justReturning@entry=false) at ../../src/weaver.cpp:554
#5  0x00007f8665cac4c8 in ThreadWeaver::WorkingHardState::applyForWork (this=0x20ac7b0, th=0x3841810, wasBusy=<optimized out>) at ../../src/workinghardstate.cpp:66
#6  0x00007f8665ca744d in ThreadWeaver::Weaver::applyForWork (this=<optimized out>, th=0x3841810, wasBusy=<optimized out>) at ../../src/weaver.cpp:568
#7  0x00007f8665caa423 in ThreadWeaver::Thread::run (this=0x3841810) at ../../src/thread.cpp:103
#8  0x00007f8685b1b2be in QThreadPrivate::start (arg=0x3841810) at thread/qthread_unix.cpp:337
#9  0x00007f86836876aa in start_thread (arg=0x7f8657fff700) at pthread_create.c:333
#10 0x00007f8685433eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 3 (Thread 0x7f865ddf7700 (LWP 1563)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f8685b1c55b in QWaitConditionPrivate::wait (time=18446744073709551615, this=0x19a57a0) at thread/qwaitcondition_unix.cpp:136
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x19a5930, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:208
#3  0x00007f8665ca74eb in ThreadWeaver::Weaver::blockThreadUntilJobsAreBeingAssigned_locked (this=this@entry=0x1d5a630, th=<optimized out>) at ../../src/weaver.cpp:594
#4  0x00007f8665ca829f in ThreadWeaver::Weaver::takeFirstAvailableJobOrSuspendOrWait (this=0x1d5a630, th=th@entry=0x3836ea0, threadWasBusy=threadWasBusy@entry=true, suspendIfInactive=suspendIfInactive@entry=false, justReturning=justReturning@entry=false) at ../../src/weaver.cpp:554
#5  0x00007f8665cac4c8 in ThreadWeaver::WorkingHardState::applyForWork (this=0x20ac7b0, th=0x3836ea0, wasBusy=<optimized out>) at ../../src/workinghardstate.cpp:66
#6  0x00007f8665ca744d in ThreadWeaver::Weaver::applyForWork (this=<optimized out>, th=0x3836ea0, wasBusy=<optimized out>) at ../../src/weaver.cpp:568
#7  0x00007f8665caa423 in ThreadWeaver::Thread::run (this=0x3836ea0) at ../../src/thread.cpp:103
#8  0x00007f8685b1b2be in QThreadPrivate::start (arg=0x3836ea0) at thread/qthread_unix.cpp:337
#9  0x00007f86836876aa in start_thread (arg=0x7f865ddf7700) at pthread_create.c:333
#10 0x00007f8685433eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 2 (Thread 0x7f865d5f6700 (LWP 1564)):
[KCrash Handler]
#6  0x00007f8685362267 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55
#7  0x00007f8685363eca in __GI_abort () at abort.c:89
#8  0x00007f86853a5c53 in __libc_message (do_abort=do_abort@entry=1, fmt=fmt@entry=0x7f86854be1a8 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/posix/libc_fatal.c:175
#9  0x00007f86853adc69 in malloc_printerr (ptr=<optimized out>, str=0x7f86854be270 "double free or corruption (fasttop)", action=1) at malloc.c:4965
#10 _int_free (av=<optimized out>, p=<optimized out>, have_lock=0) at malloc.c:3834
#11 0x00007f86853b189c in __GI___libc_free (mem=<optimized out>) at malloc.c:2950
#12 0x00007f868609ef8e in QHash<QString, QCache<QString, QIcon>::Node>::deleteNode (node=<optimized out>, this=0x7f868646e2d0 <(anonymous namespace)::Q_QGS_qtIconCache::innerFunction()::holder+16>) at ../../include/QtCore/../../src/corelib/tools/qhash.h:536
#13 QHash<QString, QCache<QString, QIcon>::Node>::remove (this=this@entry=0x7f868646e2d0 <(anonymous namespace)::Q_QGS_qtIconCache::innerFunction()::holder+16>, akey=...) at ../../include/QtCore/../../src/corelib/tools/qhash.h:806
#14 0x00007f868609f973 in QCache<QString, QIcon>::unlink (n=..., this=0x7f868646e2c0 <(anonymous namespace)::Q_QGS_qtIconCache::innerFunction()::holder>) at ../../include/QtCore/../../src/corelib/tools/qcache.h:62
#15 QCache<QString, QIcon>::trim (m=99, this=0x7f868646e2c0 <(anonymous namespace)::Q_QGS_qtIconCache::innerFunction()::holder>) at ../../include/QtCore/../../src/corelib/tools/qcache.h:187
#16 QCache<QString, QIcon>::insert (this=0x7f868646e2c0 <(anonymous namespace)::Q_QGS_qtIconCache::innerFunction()::holder>, akey=..., aobject=0x7f8648055540, acost=1) at ../../include/QtCore/../../src/corelib/tools/qcache.h:167
#17 0x00007f868609cb46 in QIcon::fromTheme (name=..., fallback=...) at image/qicon.cpp:1177
#18 0x00007f8663be3621 in CalculatorRunner::match (this=0x382aba0, context=...) at ../../../runners/calculator/calculatorrunner.cpp:267
#19 0x00007f8665ec7540 in Plasma::AbstractRunner::performMatch (this=0x382aba0, localContext=...) at ../../src/abstractrunner.cpp:131
#20 0x00007f8665cabc70 in ThreadWeaver::Executor::run (this=<optimized out>, job=..., thread=<optimized out>) at ../../src/executor.cpp:52
#21 0x00007f8665caa8b0 in ThreadWeaver::Job::execute (this=<optimized out>, self=..., th=0x7f8658002d90) at ../../src/job.cpp:83
#22 0x00007f8665caa35a in ThreadWeaver::Thread::run (this=0x7f8658002d90) at ../../src/thread.cpp:114
#23 0x00007f8685b1b2be in QThreadPrivate::start (arg=0x7f8658002d90) at thread/qthread_unix.cpp:337
#24 0x00007f86836876aa in start_thread (arg=0x7f865d5f6700) at pthread_create.c:333
#25 0x00007f8685433eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7f8688973800 (LWP 1366)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f868491ae29 in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#2  0x00007f868491c4df in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#3  0x00007f868491c5f1 in xcb_wait_for_reply () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#4  0x00007f8684b6fa47 in _XReply () from /usr/lib/x86_64-linux-gnu/libX11.so.6
#5  0x00007f8681dac26a in ?? () from /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1
#6  0x00007f8681dac5a7 in ?? () from /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1
#7  0x00007f866ec48b6b in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#8  0x00007f866ec49071 in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#9  0x00007f866ec3cd60 in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#10 0x00007f8687dbd37a in QSGBatchRenderer::Renderer::renderBatches() () from /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#11 0x00007f8687dc1b3a in QSGBatchRenderer::Renderer::render() () from /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#12 0x00007f8687dcca1c in QSGRenderer::renderScene(QSGBindable const&) () from /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#13 0x00007f8687dcce9b in QSGRenderer::renderScene(unsigned int) () from /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#14 0x00007f8687ddb5be in QSGRenderContext::renderNextFrame(QSGRenderer*, unsigned int) () from /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#15 0x00007f8687e2520c in QQuickWindowPrivate::renderSceneGraph(QSize const&) () from /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#16 0x00007f8687df5bac in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#17 0x00007f8687df66d1 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#18 0x00007f868684db8c in QApplicationPrivate::notify_helper (this=this@entry=0x19380d0, receiver=receiver@entry=0x19c4b70, e=e@entry=0x7ffc26c16070) at kernel/qapplication.cpp:3720
#19 0x00007f8686853230 in QApplication::notify (this=0x7ffc26c16380, receiver=0x19c4b70, e=0x7ffc26c16070) at kernel/qapplication.cpp:3503
#20 0x00007f8685cfaf1b in QCoreApplication::notifyInternal (this=0x7ffc26c16380, receiver=0x19c4b70, event=event@entry=0x7ffc26c16070) at kernel/qcoreapplication.cpp:935
#21 0x00007f8685d5109d in QCoreApplication::sendEvent (event=0x7ffc26c16070, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:228
#22 QTimerInfoList::activateTimers (this=0x196f3b0) at kernel/qtimerinfo_unix.cpp:635
#23 0x00007f8685d515d9 in timerSourceDispatch (source=<optimized out>) at kernel/qeventdispatcher_glib.cpp:177
#24 idleTimerSourceDispatch (source=<optimized out>) at kernel/qeventdispatcher_glib.cpp:224
#25 0x00007f8682b07ff7 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#26 0x00007f8682b08250 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#27 0x00007f8682b082fc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#28 0x00007f8685d5229b in QEventDispatcherGlib::processEvents (this=0x1970490, flags=...) at kernel/qeventdispatcher_glib.cpp:420
#29 0x00007f8685cf875a in QEventLoop::exec (this=this@entry=0x7ffc26c162b0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#30 0x00007f8685d002cc in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1188
#31 0x00007f868601500c in QGuiApplication::exec () at kernel/qguiapplication.cpp:1510
#32 0x00007f868684a025 in QApplication::exec () at kernel/qapplication.cpp:2956
#33 0x0000000000407b89 in main (argc=1, argv=<optimized out>) at ../../krunner/main.cpp:80

Possible duplicates by query: bug 348699, bug 347139, bug 347134, bug 347050, bug 346742.
Comment 1 Christoph Feck 2015-11-04 20:37:04 UTC
It looks like QIcon can no longer be used outside of the UI (main) thread, because QIcon uses a global QCache, which is accessed without mutex protection.

The runners should simply return a QString for the icon name, and let the UI thread construct the QIcon.
Comment 2 Christoph Feck 2015-11-04 20:39:15 UTC
*** Bug 345477 has been marked as a duplicate of this bug. ***
Comment 3 David Edmundson 2015-11-10 11:39:54 UTC

*** This bug has been marked as a duplicate of bug 355122 ***