Bug 305361 - Kwin crashed after changing qtcurve configuration
Summary: Kwin crashed after changing qtcurve configuration
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 4.9.0
Platform: Ubuntu Linux
: NOR crash
Target Milestone: 4.9.2
Assignee: KWin default assignee
: 306155 306405 306806 (view as bug list)
Depends on:
Reported: 2012-08-17 23:05 UTC by Mirza
Modified: 2013-06-24 20:02 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.9.2

New crash information added by DrKonqi (9.39 KB, text/plain)
2013-06-24 01:00 UTC, Hrvoje Senjan

Note You need to log in before you can comment on or make changes to this bug.
Description Mirza 2012-08-17 23:05:29 UTC
Application: kwin (4.9.00)
KDE Platform Version: 4.9.00
Qt Version: 4.8.1
Operating System: Linux 3.2.0-29-generic i686
Distribution: Ubuntu 12.04.1 LTS

-- Information about the crash:
- What I was doing when the application crashed:
Kwin crashed after changing qtcurve configuration.
Crashes also happen often when resuming from standby, or dissconecting external display from laptop, but I can't say if this is related.

-- Backtrace:
Application: KWin (kwin), signal: Segmentation fault
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0xb5dd9740 (LWP 2274))]

Thread 3 (Thread 0xb1a89b40 (LWP 2280)):
#0  0x00d45416 in __kernel_vsyscall ()
#1  0x0365896b in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0x003643dc in __pthread_cond_wait (cond=0x299f890, mutex=0x299f878) at forward.c:139
#3  0x0289b029 in ?? () from /usr/lib/i386-linux-gnu/libQtScript.so.4
#4  0x0289b06f in ?? () from /usr/lib/i386-linux-gnu/libQtScript.so.4
#5  0x03654d4c in start_thread (arg=0xb1a89b40) at pthread_create.c:308
#6  0x00356ace in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 2 (Thread 0xb3fc5b40 (LWP 3226)):
[KCrash Handler]
#7  __memcmp_ssse3 () at ../sysdeps/i386/i686/multiarch/memcmp-ssse3.S:2102
#8  0x0557592b in qstrcmp (str1=..., str2=...) at tools/qbytearray.cpp:346
#9  0x0449f43f in operator< (k2=..., k1=...) at ../../kdecore/config/kconfigdata.h:122
#10 qMapLessThanKey<KEntryKey> (key2=..., key1=...) at /usr/include/qt4/QtCore/qmap.h:107
#11 findNode (akey=..., this=0x8858808) at /usr/include/qt4/QtCore/qmap.h:487
#12 find (akey=..., this=0x8858808) at /usr/include/qt4/QtCore/qmap.h:608
#13 findEntry (flags=..., key=..., group=..., this=0x8858808) at ../../kdecore/config/kconfigdata.h:211
#14 getEntryOption (option=KEntryMap::EntryImmutable, flags=..., key=..., group=..., this=0x8858808) at ../../kdecore/config/kconfigdata.h:403
#15 KConfig::isGroupImmutableImpl (this=0x8861f08, aGroup=...) at ../../kdecore/config/kconfig.cpp:743
#16 0x044a8677 in KConfigBase::isGroupImmutable (this=0x8861f08, aGroup=...) at ../../kdecore/config/kconfigbase.cpp:91
#17 0x044a9640 in KConfigGroupPrivate (name=..., owner=..., this=0xb36053e8) at ../../kdecore/config/kconfiggroup.cpp:55
#18 KConfigGroup::KConfigGroup (this=0xb3fc4cf0, master=..., _group=0x46a5c8d "KSycoca") at ../../kdecore/config/kconfiggroup.cpp:493
#19 0x0462ad4f in KSycocaPrivate::KSycocaPrivate (this=0xb36058b0) at ../../kdecore/sycoca/ksycoca.cpp:106
#20 0x0462b037 in KSycoca::KSycoca (this=0xb3600e20) at ../../kdecore/sycoca/ksycoca.cpp:181
#21 0x0462b936 in sycoca (this=0xb3605718) at ../../kdecore/sycoca/ksycoca.cpp:166
#22 KSycoca::self () at ../../kdecore/sycoca/ksycoca.cpp:295
#23 0x04631641 in KSycocaFactory::KSycocaFactory (this=0xb3600468, factory_id=KST_KServiceTypeFactory) at ../../kdecore/sycoca/ksycocafactory.cpp:53
#24 0x045a5079 in KServiceTypeFactory::KServiceTypeFactory (this=0xb3600468) at ../../kdecore/services/kservicetypefactory.cpp:31
#25 0x045a552c in self (this=<optimized out>) at ../../kdecore/sycoca/ksycocafactory.h:200
#26 KServiceTypeFactory::self () at ../../kdecore/services/kservicetypefactory.cpp:65
#27 0x045922fb in KServicePrivate::property (this=0x8f7bc00, _name=..., t=QVariant::Invalid) at ../../kdecore/services/kservice.cpp:547
#28 0x04592c78 in KServicePrivate::property (this=0x8f7bc00, _name=...) at ../../kdecore/services/kservice.cpp:485
#29 0x04630dc3 in KSycocaEntry::property (this=0x8f56d08, name=...) at ../../kdecore/sycoca/ksycocaentry.cpp:172
#30 0x045b4735 in KPluginInfo::KPluginInfo (this=0xb3fc517c, service=...) at ../../kdecore/services/kplugininfo.cpp:125
#31 0x006d076e in KWin::Scripting::queryScriptsToLoad (this=0x87f81d8, pluginStates=..., offers=...) at ../../kwin/scripting/scripting.cpp:487
#32 0x006d3632 in QtConcurrent::StoredMemberFunctionPointerCall2<QList<QPair<bool, QPair<QString, QString> > >, KWin::Scripting, QMap<QString, QString>&, QMap<QString, QString>, QList<KSharedPtr<KService> >&, QList<KSharedPtr<KService> > >::runFunctor (this=0x897a6b0) at /usr/include/qt4/QtCore/qtconcurrentstoredfunctioncall.h:599
#33 0x006d36de in run (this=0x897a6b0) at /usr/include/qt4/QtCore/qtconcurrentrunbase.h:106
#34 QtConcurrent::RunFunctionTask<QList<QPair<bool, QPair<QString, QString> > > >::run (this=0x897a6b0) at /usr/include/qt4/QtCore/qtconcurrentrunbase.h:97
#35 0x0556639b in QThreadPoolThread::run (this=0x8945b80) at concurrent/qthreadpool.cpp:107
#36 0x05573de0 in QThreadPrivate::start (arg=0x8945b80) at thread/qthread_unix.cpp:298
#37 0x03654d4c in start_thread (arg=0xb3fc5b40) at pthread_create.c:308
#38 0x00356ace in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 1 (Thread 0xb5dd9740 (LWP 2274)):
#0  0x00d45416 in __kernel_vsyscall ()
#1  0x0365896b in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0x003643dc in __pthread_cond_wait (cond=0x8945b40, mutex=0x8945b28) at forward.c:139
#3  0x05574350 in wait (time=4294967295, this=0x8945b28) at thread/qwaitcondition_unix.cpp:86
#4  QWaitCondition::wait (this=0x8945a88, mutex=0x8945a74, time=4294967295) at thread/qwaitcondition_unix.cpp:158
#5  0x05565b81 in QThreadPoolPrivate::waitForDone (this=0x8945a28, msecs=-1) at concurrent/qthreadpool.cpp:298
#6  0x05567598 in QThreadPool::~QThreadPool (this=0x8945a18, __in_chrg=<optimized out>) at concurrent/qthreadpool.cpp:440
#7  0x055675f2 in QThreadPool::~QThreadPool (this=0x8945a18, __in_chrg=<optimized out>) at concurrent/qthreadpool.cpp:442
#8  0x05567628 in QGlobalStaticDeleter<QThreadPool>::~QGlobalStaticDeleter (this=0x57e7aa0, __in_chrg=<optimized out>) at ../../include/QtCore/../../src/corelib/global/qglobal.h:1923
#9  0x0029ef61 in __run_exit_handlers (status=1, listp=0x40d3e4, run_list_atexit=true) at exit.c:78
#10 0x0029efed in __GI_exit (status=1) at exit.c:100
#11 0x015fca88 in qt_xio_errhandler () at kernel/qapplication_x11.cpp:780
#12 0x00ab0f09 in KApplication::xioErrhandler (this=0xbfc95494, dpy=0x8805ca0) at ../../kdeui/kernel/kapplication.cpp:419
#13 0x00ab0f44 in kde_xio_errhandler (dpy=0x8805ca0) at ../../kdeui/kernel/kapplication.cpp:126
#14 0x0044ab74 in _XIOError () from /usr/lib/i386-linux-gnu/libX11.so.6
#15 0x0044840f in _XEventsQueued () from /usr/lib/i386-linux-gnu/libX11.so.6
#16 0x0044847a in _XFlush () from /usr/lib/i386-linux-gnu/libX11.so.6
#17 0x00428a81 in XFlush () from /usr/lib/i386-linux-gnu/libX11.so.6
#18 0x006b5a7a in KWin::SceneOpenGL::flushBuffer (this=0x8991418, mask=8, damage=...) at ../../kwin/scene_opengl_glx.cpp:612
#19 0x006b61e4 in KWin::SceneOpenGL::idle (this=0x8991418) at ../../kwin/scene_opengl.cpp:113
#20 0x00695f46 in performCompositing (this=0x8941d08) at ../../kwin/composite.cpp:404
#21 KWin::Workspace::performCompositing (this=0x8941d08) at ../../kwin/composite.cpp:397
#22 0x056a3ac4 in QObject::event (this=0x8941d08, e=0xbfc951ac) at kernel/qobject.cpp:1157
#23 0x01584ed4 in notify_helper (e=0xbfc951ac, receiver=0x8941d08, this=0x87f5860) at kernel/qapplication.cpp:4559
#24 QApplicationPrivate::notify_helper (this=0x87f5860, receiver=0x8941d08, e=0xbfc951ac) at kernel/qapplication.cpp:4531
#25 0x0158a30d in QApplication::notify (this=0xbfc951ac, receiver=0x8941d08, e=0xbfc951ac) at kernel/qapplication.cpp:4288
#26 0x00ab2e41 in KApplication::notify (this=0xbfc95494, receiver=0x8941d08, event=0xbfc951ac) at ../../kdeui/kernel/kapplication.cpp:311
#27 0x0063d33f in notify (e=0xbfc951ac, o=0x8941d08, this=0xbfc95494) at ../../kwin/main.cpp:371
#28 KWin::Application::notify (this=0xbfc95494, o=0x8941d08, e=0xbfc951ac) at ../../kwin/main.cpp:367
#29 0x0568897e in QCoreApplication::notifyInternal (this=0xbfc95494, receiver=0x8941d08, event=0xbfc951ac) at kernel/qcoreapplication.cpp:876
#30 0x056bd990 in sendEvent (event=0xbfc951ac, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#31 QTimerInfoList::activateTimers (this=0x87f6144) at kernel/qeventdispatcher_unix.cpp:611
#32 0x056be207 in QEventDispatcherUNIX::processEvents (this=0x87abea0, flags=...) at kernel/qeventdispatcher_unix.cpp:930
#33 0x0163eb6e in QEventDispatcherX11::processEvents (this=0x87abea0, flags=...) at kernel/qeventdispatcher_x11.cpp:152
#34 0x0568750d in QEventLoop::processEvents (this=0xbfc953f4, flags=...) at kernel/qeventloop.cpp:149
#35 0x056877a9 in QEventLoop::exec (this=0xbfc953f4, flags=...) at kernel/qeventloop.cpp:204
#36 0x0568ceba in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1148
#37 0x01582a74 in QApplication::exec () at kernel/qapplication.cpp:3820
#38 0x006401f6 in kdemain (argc=3, argv=0xbfc95734) at ../../kwin/main.cpp:545
#39 0x0804850b in main (argc=3, argv=0xbfc95734) at kwin_dummy.cpp:3

Possible duplicates by query: bug 303713.

Reported using DrKonqi
Comment 1 Thomas Lübking 2012-08-17 23:44:09 UTC
given KConfigGroup is invoked by KPluginInfo -> KSycoca there's just one thing left to do.

There's KSycoca::disableAutoRebuild() - but no apparent way to re-enable it or ensure it to be updated (in a sync way)

And the most sad thing is that this is because:

KConfigGroup config(KGlobal::config(), "KSycoca");

Which will probably be configured on n < 2 systems ... :-\
Comment 2 Christoph Feck 2012-08-18 00:43:58 UTC
queryScriptsToLoad() still runs in separate thread.
Comment 3 Thomas Lübking 2012-08-18 00:54:44 UTC
Yes, sure.
We just moved parts into the sync execution after their KConfigGroup invocation emerged - but since with KPluginInfo the core part of the script loader is affected, the only remaining option (unless we can prevent that sycoca behavior w/o preventing wanted updates) is to revert the async script loading - what i actually didn't want to say this directly ;-)
Comment 4 Martin Flöser 2012-08-18 06:17:35 UTC
yeah seems to be needed *sigh*
Comment 5 Martin Flöser 2012-09-02 11:42:46 UTC
*** Bug 306155 has been marked as a duplicate of this bug. ***
Comment 6 Thomas Lübking 2012-09-07 15:27:45 UTC
*** Bug 306405 has been marked as a duplicate of this bug. ***
Comment 7 Thomas Lübking 2012-09-14 18:31:48 UTC
*** Bug 306806 has been marked as a duplicate of this bug. ***
Comment 8 Thomas Lübking 2012-09-19 19:09:19 UTC
Git commit 958eb66e979e002123d72339796d21df6e3d6160 by Thomas Lübking.
Committed on 14/09/2012 at 16:08.
Pushed by luebking into branch 'KDE/4.9'.

Sync script loading, KConfGroup is not thread safe

REVIEW: 106377
FIXED-IN: 4.9.2

M  +21   -4    kwin/scripting/scripting.cpp
M  +1    -1    kwin/scripting/scripting.h

Comment 9 Hrvoje Senjan 2013-06-24 01:00:52 UTC
Created attachment 80741 [details]
New crash information added by DrKonqi

kwin (4.10.80 "release 150") on KDE Platform 4.10.80 "release 150" using Qt 4.8.5

- What I was doing when the application crashed:

@Thomas, Martin, sorry if spamming here, drkonqi suggested also this one (as also the one i opened with "fast enough comp. changing", but backtrace i have now also references KWin scripting...)
Doubt this one is related though :-(

cd ~/.fonts/
git clone -b in-progress kde:oxygen-fonts
fc-cache -fv
App. appearance -> general font -> changed to oxy. sans -> apply -> crash

I cannot imagine this will be reproducible

-- Backtrace (Reduced):
#6  0x00007fb3b33886eb in qstrcmp (str1=..., str2=0xa1bbbf "") at tools/qbytearray.cpp:330
#10 0x00007fb3b3b08e23 in operator< (k2=..., k1=...) at /usr/src/debug/kdelibs-git/kdecore/config/kconfigdata.h:126
#11 qMapLessThanKey<KEntryKey> (key2=..., key1=...) at /usr/include/QtCore/qmap.h:107
#12 findNode (akey=..., this=0x90b070) at /usr/include/QtCore/qmap.h:487
#13 find (akey=..., this=0x90b070) at /usr/include/QtCore/qmap.h:608
Comment 10 Thomas Lübking 2013-06-24 20:02:05 UTC
(In reply to comment #9)
> I cannot imagine this will be reproducible
Apparently is - bug #321576