Bug 163751 - KRunner crashes sometimes when pressing return before all matches have completed. Program still launches though.
Summary: KRunner crashes sometimes when pressing return before all matches have comple...
Status: RESOLVED FIXED
Alias: None
Product: krunner
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash (vote)
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-11 05:55 UTC by George Goldberg
Modified: 2010-01-09 00:58 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description George Goldberg 2008-06-11 05:55:26 UTC
Version:           4.0.81 (using Devel)
Installed from:    Compiled sources
Compiler:          gcc version 4.2.3 (4.2.3-6mnb1) Mandriva Linux 2008.1 x86_64
OS:                Linux

When I type an application name and hit return really fast, sometimes (about 1/10 of the time) KRunner crashes with the following backtrace, despite still launching the application OK. I'm currently using svn trunk r818299

Application: Run Command Interface (krunner), signal SIGSEGV
Using host libthread_db library "/lib64/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 47503933781552 (LWP 6701)]
[New Thread 1115720016 (LWP 6753)]
[New Thread 1107327312 (LWP 6752)]
[New Thread 1098934608 (LWP 6751)]
[New Thread 1090541904 (LWP 6750)]
[New Thread 1082149200 (LWP 6749)]
[KCrash handler]
#5  0x00002b3456579714 in QBasicAtomicInt::operator= (this=0x0, value=1)
    at /opt/qt-copy/include/QtCore/qbasicatomic.h:89
#6  0x00002b345660e1b1 in QVector<KService::ServiceTypeAndPreference>::realloc
    (this=0x8a69e0, asize=1761633024, aalloc=-1652517760)
    at /opt/qt-copy/include/QtCore/qvector.h:464
#7  0x00002b345660e5ca in QVector<KService::ServiceTypeAndPreference>::resize
    (this=0x8a69e0, asize=1761633024)
    at /opt/qt-copy/include/QtCore/qvector.h:315
#8  0x00002b345660e600 in operator>><KService::ServiceTypeAndPreference> (
    s=@0x88a6c0, v=@0x8a69e0) at /opt/qt-copy/include/QtCore/qdatastream.h:289
#9  0x00002b345660a5f1 in KServicePrivate::load (this=0x8a6970, s=@0x88a6c0)
    at /home/george/kde/src/KDE/kdelibs/kdecore/services/kservice.cpp:323
#10 0x00002b345660e780 in KServicePrivate (this=0x8a6970, _str=@0x88a6c0, 
    _offset=540996)
    at /home/george/kde/src/KDE/kdelibs/kdecore/services/kservice_p.h:41
#11 0x00002b345660a6b6 in KService (this=0x988290, _str=@0x88a6c0, 
    _offset=540996)
    at /home/george/kde/src/KDE/kdelibs/kdecore/services/kservice.cpp:389
#12 0x00002b345660fc95 in KServiceFactory::createEntry (this=0x98dce0, 
    offset=540996)
    at /home/george/kde/src/KDE/kdelibs/kdecore/services/kservicefactory.cpp:181
#13 0x00002b345660f95b in KServiceFactory::serviceOffers (this=0x98dce0, 
    serviceTypeOffset=22500, serviceOffersOffset=7632)
    at /home/george/kde/src/KDE/kdelibs/kdecore/services/kservicefactory.cpp:266
#14 0x00002b345661cab5 in KServiceTypeTrader::defaultOffers (this=0x80ab60, 
    serviceType=@0x41805cc0, constraint=@0x41805c70)
    at /home/george/kde/src/KDE/kdelibs/kdecore/services/kservicetypetrader.cpp:125
#15 0x00002b345661cb2b in KServiceTypeTrader::query (this=0x80ab60, 
    serviceType=@0x41805cc0, constraint=@0x41805c70)
    at /home/george/kde/src/KDE/kdelibs/kdecore/services/kservicetypetrader.cpp:141
#16 0x00002b346765cb90 in ServiceRunner::match (this=0x8fbae0, 
    context=@0x41805e30)
    at /home/george/kde/src/KDE/kdebase/workspace/plasma/runners/services/servicerunner.cpp:55
#17 0x00002b3454258a4c in Plasma::AbstractRunner::performMatch (
    this=0x8fbae0, globalContext=@0x7f3fd0)
    at /home/george/kde/src/KDE/kdebase/workspace/libs/plasma/abstractrunner.cpp:131
#18 0x00002b34542b2feb in Plasma::FindMatchesJob::run (this=0x88abb0)
    at /home/george/kde/src/KDE/kdebase/workspace/libs/plasma/runnermanager.cpp:171
#19 0x00002b3456947a2b in ThreadWeaver::JobRunHelper::runTheJob (
    this=0x41805f70, th=0x8ad6a0, job=0x88abb0)
    at /home/george/kde/src/KDE/kdelibs/threadweaver/Weaver/Job.cpp:106
#20 0x00002b3456947c2b in ThreadWeaver::Job::execute (this=0x88abb0, 
    th=0x8ad6a0)
    at /home/george/kde/src/KDE/kdelibs/threadweaver/Weaver/Job.cpp:135
#21 0x00002b3456946f76 in ThreadWeaver::ThreadRunHelper::run (
    this=0x41806010, parent=0x7f1340, th=0x8ad6a0)
    at /home/george/kde/src/KDE/kdelibs/threadweaver/Weaver/Thread.cpp:95
#22 0x00002b3456947085 in ThreadWeaver::Thread::run (this=0x8ad6a0)
    at /home/george/kde/src/KDE/kdelibs/threadweaver/Weaver/Thread.cpp:142
#23 0x00002b3459d2492e in QThreadPrivate::start (arg=0x8ad6a0)
    at thread/qthread_unix.cpp:190
#24 0x00002b345a1223e0 in start_thread () from /lib64/libpthread.so.0
#25 0x00002b345c2a487d in clone () from /lib64/libc.so.6

Thread 3 (Thread 1107327312 (LWP 6752)):
#0  0x00002b345a126719 in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib64/libpthread.so.0
#1  0x00002b3459d252a3 in QWaitConditionPrivate::wait (this=0x7f1470, 
    time=18446744073709551615) at thread/qwaitcondition_unix.cpp:88
#2  0x00002b3459d24e02 in QWaitCondition::wait (this=0x7f1368, 
    mutex=0x7f05b0, time=18446744073709551615)
    at thread/qwaitcondition_unix.cpp:265
#3  0x00002b34569444e5 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x7f1340, th=0x8b0d40)
    at /home/george/kde/src/KDE/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:365
#4  0x00002b3456948b27 in ThreadWeaver::WorkingHardState::waitForAvailableJob
    (this=0x7fbe10, th=0x8b0d40)
    at /home/george/kde/src/KDE/kdelibs/threadweaver/Weaver/WorkingHardState.cpp:80
#5  0x00002b3456943c5a in ThreadWeaver::WeaverImpl::waitForAvailableJob (
    this=0x7f1340, th=0x8b0d40)
    at /home/george/kde/src/KDE/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:356
#6  0x00002b3456948c1f in ThreadWeaver::WorkingHardState::applyForWork (
    this=0x7fbe10, th=0x8b0d40)
    at /home/george/kde/src/KDE/kdelibs/threadweaver/Weaver/WorkingHardState.cpp:71
#7  0x00002b3456944721 in ThreadWeaver::WeaverImpl::applyForWork (
    this=0x7f1340, th=0x8b0d40, previous=0x91f6a0)
    at /home/george/kde/src/KDE/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:351
#8  0x00002b3456946f2a in ThreadWeaver::ThreadRunHelper::run (
    this=0x42007010, parent=0x7f1340, th=0x8b0d40)
    at /home/george/kde/src/KDE/kdelibs/threadweaver/Weaver/Thread.cpp:87
#9  0x00002b3456947085 in ThreadWeaver::Thread::run (this=0x8b0d40)
    at /home/george/kde/src/KDE/kdelibs/threadweaver/Weaver/Thread.cpp:142
#10 0x00002b3459d2492e in QThreadPrivate::start (arg=0x8b0d40)
    at thread/qthread_unix.cpp:190
#11 0x00002b345a1223e0 in start_thread () from /lib64/libpthread.so.0
#12 0x00002b345c2a487d in clone () from /lib64/libc.so.6

Thread 2 (Thread 1115720016 (LWP 6753)):
#0  0x00002b345c29db02 in select () from /lib64/libc.so.6
#1  0x00002b3459df64e3 in QProcessManager::run (this=0x62fec0)
    at io/qprocess_unix.cpp:307
#2  0x00002b3459d2492e in QThreadPrivate::start (arg=0x62fec0)
    at thread/qthread_unix.cpp:190
#3  0x00002b345a1223e0 in start_thread () from /lib64/libpthread.so.0
#4  0x00002b345c2a487d in clone () from /lib64/libc.so.6

Thread 1 (Thread 47503933781552 (LWP 6701)):
#0  0x00002b345a126719 in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib64/libpthread.so.0
#1  0x00002b3459d252a3 in QWaitConditionPrivate::wait (this=0x630180, 
    time=18446744073709551615) at thread/qwaitcondition_unix.cpp:88
#2  0x00002b3459d24e02 in QWaitCondition::wait (this=0x638640, 
    mutex=0x638620, time=18446744073709551615)
    at thread/qwaitcondition_unix.cpp:265
#3  0x00002b3459d23e1c in QThread::wait (this=0x62fec0, 
    time=18446744073709551615) at thread/qthread_unix.cpp:561
#4  0x00002b3459df57fe in ~QProcessManager (this=0x62fec0)
    at io/qprocess_unix.cpp:270
#5  0x00002b3459df66e0 in ~QGlobalStaticDeleter (this=0x2b345a11b968)
    at ../../include/QtCore/../../src/corelib/global/qglobal.h:1568
#6  0x00002b3459df2490 in __tcf_0 () at io/qprocess_unix.cpp:235
#7  0x00002b345c2047d0 in exit () from /lib64/libc.so.6
#8  0x00002b345aa25e31 in qt_xio_errhandler ()
    at kernel/qapplication_x11.cpp:590
#9  0x00002b3456f66358 in KApplication::xioErrhandler (this=0x62b1d0, 
    dpy=0x620df0)
    at /home/george/kde/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:418
#10 0x00002b3456f66387 in kde_xio_errhandler (dpy=0x620df0)
    at /home/george/kde/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:130
#11 0x00002b3457c78b74 in _XIOError () from /usr/lib64/libX11.so.6
#12 0x00002b3457c7fc69 in ?? () from /usr/lib64/libX11.so.6
#13 0x00002b3457c7ff73 in _XEventsQueued () from /usr/lib64/libX11.so.6
#14 0x00002b3457c69e8b in XEventsQueued () from /usr/lib64/libX11.so.6
#15 0x00002b345aa5bff4 in x11EventSourceCheck (s=0x62fc80)
    at kernel/qguieventdispatcher_glib.cpp:89
#16 0x00002b345d450b84 in g_main_context_check ()
   from /usr/lib64/libglib-2.0.so.0
#17 0x00002b345d450ec5 in ?? () from /usr/lib64/libglib-2.0.so.0
#18 0x00002b345d4515df in g_main_context_iteration ()
   from /usr/lib64/libglib-2.0.so.0
#19 0x00002b3459e40b8c in QEventDispatcherGlib::processEvents (this=0x6148d0, 
    flags=@0x7fff56d63c60) at kernel/qeventdispatcher_glib.cpp:325
#20 0x00002b345aa5bb6f in QGuiEventDispatcherGlib::processEvents (
    this=0x6148d0, flags=@0x7fff56d63cc0)
    at kernel/qguieventdispatcher_glib.cpp:204
#21 0x00002b3459e0fb54 in QEventLoop::processEvents (this=0x7fff56d63d70, 
    flags=@0x7fff56d63d20) at kernel/qeventloop.cpp:149
#22 0x00002b3459e0fd50 in QEventLoop::exec (this=0x7fff56d63d70, 
    flags=@0x7fff56d63d80) at kernel/qeventloop.cpp:196
#23 0x00002b3459e13270 in QCoreApplication::exec ()
    at kernel/qcoreapplication.cpp:845
#24 0x00002b345a9bab08 in QApplication::exec ()
    at kernel/qapplication.cpp:3304
#25 0x00002b3453f7d942 in kdemain (argc=1, argv=0x7fff56d64028)
    at /home/george/kde/src/KDE/kdebase/workspace/krunner/main.cpp:53
#26 0x0000000000400913 in main (argc=1, argv=0x7fff56d64028)
    at /home/george/kde/build/KDE/kdebase/workspace/krunner/krunner_dummy.cpp:3
#0  0x00002b345a126719 in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib64/libpthread.so.0
Comment 1 Lubos Lunak 2008-07-21 16:23:12 UTC
SVN commit 835987 by lunakl:

Remove emitting of aboutToQuit() from KApplication::xioErrhandler() - the application
is not about to quit, it is about to fall flat on its face. There is really not that
much to do once KDE apps lose their connection to the X server. How that can happen
while the X server still continues to run is a different question and I don't know
the answer. It is quite possible it is caused by careless usage of one X connection
from several threads concurrently without proper locking.

CCBUG: 166685
CCBUG: 166432
CCBUG: 166401
CCBUG: 166179
CCBUG: 165451
CCBUG: 165307
CCBUG: 165059
CCBUG: 164740
CCBUG: 164665
CCBUG: 163751
CCBUG: 163355
CCBUG: 161787
CCBUG: 160692
CCBUG: 160458
CCBUG: 158194
CCBUG: 158088
CCBUG: 157607
CCBUG: 154011
CCBUG: 151293
CCBUG: 146891
CCBUG: 146700
CCBUG: 146562
CCBUG: 144383
CCBUG: 143375
CCBUG: 141871
BUG: 140683
CCBUG: 139162
CCBUG: 134708
CCBUG: 133332
CCBUG: 128588
CCBUG: 112960



 M  +0 -1      kapplication.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=835987
Comment 2 Jacopo De Simoi 2009-04-04 00:04:51 UTC
Can you reproduce it again with 4.2.2? This testcase has been worked out quite hard lately, and this backtrace *should* just not happen.
Comment 3 Jacopo De Simoi 2010-01-09 00:58:44 UTC
according to dfaure this is related to ksycoca not being thread-safe, which was fixed some time ago. 
Closing