Application: kdevelop (5.0.0) (Compiled from sources) Qt Version: 5.7.1 Frameworks Version: 5.25.0 Operating System: Linux 4.6.2-400.surfacebook.fc23.x86_64 x86_64 Distribution: "Fedora release 24 (Twenty Four)" -- Information about the crash: - What I was doing when the application crashed: The crash happens when starting KDevelop with a session containing a few open projects. Next start after the crash is fine. The crash does not seem to be reproducible. -- Backtrace: Application: KDevelop (kdevelop), signal: Segmentation fault Using host libthread_db library "/lib64/libthread_db.so.1". [Current thread is 1 (Thread 0x7f42ab8f0940 (LWP 3634))] Thread 5 (Thread 0x7f4280f6e700 (LWP 3639)): #0 0x00007f42c6665d5f in __libc_enable_asynccancel () at /lib64/libc.so.6 #1 0x00007f42c664c3e2 in poll () at /lib64/libc.so.6 #2 0x00007f42ba30ba06 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0 #3 0x00007f42ba30bb1c in g_main_context_iteration () at /lib64/libglib-2.0.so.0 #4 0x00007f42c74864db in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7f427c0008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:425 #5 0x00007f42c74332da in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7f4280f6dbd0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212 #6 0x00007f42c726674b in QThread::exec() (this=this@entry=0x2caded0) at thread/qthread.cpp:507 #7 0x00007f42c47b0b9c in KDevelop::CompletionWorkerThread::run() (this=0x2caded0) at /home/eike/devel/src/extragear/kdevelop/kdevplatform/language/codecompletion/codecompletionmodel.cpp:89 #8 0x00007f42c726b189 in QThreadPrivate::start(void*) (arg=0x2caded0) at thread/qthread_unix.cpp:368 #9 0x00007f42bea3d5ca in start_thread () at /lib64/libpthread.so.0 #10 0x00007f42c6657f6d in clone () at /lib64/libc.so.6 Thread 4 (Thread 0x7f428f03b700 (LWP 3638)): #0 0x00007f42bea42f79 in pthread_cond_timedwait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0 #1 0x00007f42c726be86 in QWaitCondition::wait(QMutex*, unsigned long) (time=1000, this=0x2ba6b30) at thread/qwaitcondition_unix.cpp:133 #2 0x00007f42c726be86 in QWaitCondition::wait(QMutex*, unsigned long) (time=1000, this=0x2ba6b30) at thread/qwaitcondition_unix.cpp:141 #3 0x00007f42c726be86 in QWaitCondition::wait(QMutex*, unsigned long) (this=this@entry=0x2ba61b8, mutex=mutex@entry=0x2ba61c0, time=time@entry=1000) at thread/qwaitcondition_unix.cpp:215 #4 0x00007f42c46bd0e8 in KDevelop::DUChainPrivate::CleanupThread::run() (this=0x2ba61a0) at /home/eike/devel/src/extragear/kdevelop/kdevplatform/language/duchain/duchain.cpp:282 #5 0x00007f42c726b189 in QThreadPrivate::start(void*) (arg=0x2ba61a0) at thread/qthread_unix.cpp:368 #6 0x00007f42bea3d5ca in start_thread () at /lib64/libpthread.so.0 #7 0x00007f42c6657f6d in clone () at /lib64/libc.so.6 Thread 3 (Thread 0x7f42a13cc700 (LWP 3636)): #0 0x00007f42c664c3ed in poll () at /lib64/libc.so.6 #1 0x00007f42ba30ba06 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0 #2 0x00007f42ba30bb1c in g_main_context_iteration () at /lib64/libglib-2.0.so.0 #3 0x00007f42c74864db in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7f42940008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:425 #4 0x00007f42c74332da in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7f42a13cbc60, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212 #5 0x00007f42c726674b in QThread::exec() (this=this@entry=0x7f42cd60bf20 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread.cpp:507 #6 0x00007f42cd59b6c5 in QDBusConnectionManager::run() (this=0x7f42cd60bf20 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at qdbusconnection.cpp:196 #7 0x00007f42c726b189 in QThreadPrivate::start(void*) (arg=0x7f42cd60bf20 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:368 #8 0x00007f42bea3d5ca in start_thread () at /lib64/libpthread.so.0 #9 0x00007f42c6657f6d in clone () at /lib64/libc.so.6 Thread 2 (Thread 0x7f42a22f7700 (LWP 3635)): #0 0x00007f42c664c3ed in poll () at /lib64/libc.so.6 #1 0x00007f42b933bf80 in _xcb_conn_wait () at /lib64/libxcb.so.1 #2 0x00007f42b933db79 in xcb_wait_for_event () at /lib64/libxcb.so.1 #3 0x00007f42a4a79559 in QXcbEventReader::run() (this=0x24e4810) at qxcbconnection.cpp:1343 #4 0x00007f42c726b189 in QThreadPrivate::start(void*) (arg=0x24e4810) at thread/qthread_unix.cpp:368 #5 0x00007f42bea3d5ca in start_thread () at /lib64/libpthread.so.0 #6 0x00007f42c6657f6d in clone () at /lib64/libc.so.6 Thread 1 (Thread 0x7f42ab8f0940 (LWP 3634)): [KCrash Handler] #6 0x00007f42c46e0d7e in KDevelop::TopDUContextDynamicData::DUChainItemStorage<KDevelop::DUContext*>::getItemForIndex(unsigned int) const (this=0x5d0e9c0, index=1) at /home/eike/devel/src/extragear/kdevelop/kdevplatform/language/duchain/topducontextdynamicdata.cpp:407 #7 0x00007f42c46de27e in KDevelop::TopDUContextDynamicData::getContextForIndex(unsigned int) const (this=<optimized out>, index=<optimized out>) at /home/eike/devel/src/extragear/kdevelop/kdevplatform/language/duchain/topducontextdynamicdata.cpp:813 #8 0x00007f42c46d15b1 in KDevelop::LocalIndexedDUContext::data(KDevelop::TopDUContext*) const (this=<optimized out>, top=<optimized out>) at /home/eike/devel/src/extragear/kdevelop/kdevplatform/language/duchain/localindexedducontext.cpp:57 #9 0x00007f42c46c915e in KDevelop::DUContext::rebuildDynamicData(KDevelop::DUContext*, unsigned int) (this=0x5baa270, parent=<optimized out>, ownIndex=<optimized out>) at /home/eike/devel/src/extragear/kdevelop/kdevplatform/language/duchain/ducontext.cpp:121 #10 0x00007f42c46def44 in KDevelop::TopDUContextDynamicData::load(unsigned int) (topContextIndex=509) at /home/eike/devel/src/extragear/kdevelop/kdevplatform/language/duchain/topducontextdynamicdata.cpp:609 #11 0x00007f42c46be225 in KDevelop::DUChainPrivate::loadChain(unsigned int, QSet<unsigned int>&) (this=0x7f42c4e80c40 <KDevelop::(anonymous namespace)::Q_QGS_sdDUChainPrivate::innerFunction()::holder>, index=<optimized out>, index@entry=509, loaded=...) at /home/eike/devel/src/extragear/kdevelop/kdevplatform/language/duchain/duchain.cpp:579 #12 0x00007f42c46aa275 in KDevelop::DUChain::loadChain(unsigned int) (this=<optimized out>, index=509) at /home/eike/devel/src/extragear/kdevelop/kdevplatform/language/duchain/duchain.cpp:1311 #13 0x00007f42c46d1529 in KDevelop::IndexedTopDUContext::data() const (index=<optimized out>, this=<optimized out>) at /home/eike/devel/src/extragear/kdevelop/kdevplatform/language/duchain/duchain.h:186 #14 0x00007f42c46d1529 in KDevelop::IndexedTopDUContext::data() const (this=this@entry=0x7ffe75be7880) at /home/eike/devel/src/extragear/kdevelop/kdevplatform/language/duchain/indexedtopducontext.cpp:49 #15 0x00007f42c470a5e0 in KDevelop::ParsingEnvironmentFile::topContext() const (this=0x5bac530) at /home/eike/devel/src/extragear/kdevelop/kdevplatform/language/duchain/parsingenvironment.cpp:140 #16 0x00007f42c46a8557 in KDevelop::DUChain::environmentFileForDocument(KDevelop::IndexedString const&, KDevelop::ParsingEnvironment const*, bool) const (this=this@entry=0x2ba5d80, document=..., environment=0x0, environment@entry=0x7ffe75be7980, proxyContext=proxyContext@entry=false) at /home/eike/devel/src/extragear/kdevelop/kdevplatform/language/duchain/duchain.cpp:1400 #17 0x00007f42c46a868f in KDevelop::DUChain::chainForDocument(KDevelop::IndexedString const&, KDevelop::ParsingEnvironment const*, bool) const (this=this@entry=0x2ba5d80, document=..., environment=environment@entry=0x7ffe75be7980, proxyContext=proxyContext@entry=false) at /home/eike/devel/src/extragear/kdevelop/kdevplatform/language/duchain/duchain.cpp:1423 #18 0x00007f42c46a86ec in KDevelop::DUChain::chainForDocument(QUrl const&, KDevelop::ParsingEnvironment const*, bool) const (this=0x2ba5d80, document=..., environment=environment@entry=0x7ffe75be7980, proxyContext=proxyContext@entry=false) at /home/eike/devel/src/extragear/kdevelop/kdevplatform/language/duchain/duchain.cpp:1382 #19 0x00007f42877945aa in ClangSupport::standardContext(QUrl const&, bool) (this=<optimized out>, url=...) at /home/eike/devel/src/extragear/kdevelop/kdevelop/languages/clang/clangsupport.cpp:351 #20 0x00007f42c471be3b in KDevelop::DUChainUtils::standardContextForUrl(QUrl const&, bool) (url=..., preferProxyContext=preferProxyContext@entry=false) at /home/eike/devel/src/extragear/kdevelop/kdevplatform/language/duchain/duchainutils.cpp:282 #21 0x00007f428d2ad62f in (anonymous namespace)::getContextAt(QUrl const&, KTextEditor::Cursor) (url=..., cursor=...) at /home/eike/devel/src/extragear/kdevelop/kdevplatform/plugins/contextbrowser/contextbrowser.cpp:112 #22 0x00007f428d2b2f09 in ContextBrowserPlugin::documentJumpPerformed(KDevelop::IDocument*, KTextEditor::Cursor const&, KDevelop::IDocument*, KTextEditor::Cursor const&) (this=0x2bd07c0, newDocument=0x5d13be0, newCursor=..., previousDocument=<optimized out>, previousCursor=...) at /home/eike/devel/src/extragear/kdevelop/kdevplatform/plugins/contextbrowser/contextbrowser.cpp:1175 #23 0x00007f42c745ee6e in QMetaObject::activate(QObject*, int, int, void**) (a=0x7ffe75be7c70, r=0x2bd07c0, this=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobject_impl.h:101 #24 0x00007f42c745ee6e in QMetaObject::activate(QObject*, int, int, void**) (sender=0x2985ca0, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7ffe75be7c70) at kernel/qobject.cpp:3723 #25 0x00007f42c745f407 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=<optimized out>, m=m@entry=0x7f42cbcab5c0 <KDevelop::IDocumentController::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7ffe75be7c70) at kernel/qobject.cpp:3602 #26 0x00007f42cba981f9 in KDevelop::IDocumentController::documentJumpPerformed(KDevelop::IDocument*, KTextEditor::Cursor, KDevelop::IDocument*, KTextEditor::Cursor) (this=<optimized out>, _t1=<optimized out>, _t1@entry=0x5d13be0, _t2=..., _t3=<optimized out>, _t3@entry=0x0, _t4=...) at /home/eike/devel/build/extragear/kdevelop/kdevplatform/interfaces/moc_idocumentcontroller.cpp:509 #27 0x00007f42cd10dc46 in KDevelop::DocumentControllerPrivate::openDocumentInternal(KDevelop::IDocument*, KTextEditor::Range const&, QFlags<KDevelop::IDocumentController::DocumentActivation>, KDevelop::IDocument*) (this=this@entry=0x29dd460, doc=doc@entry=0x5d13be0, range=..., activationParams=..., activationParams@entry=..., buddy=<optimized out>, buddy@entry=0x0) at /home/eike/devel/src/extragear/kdevelop/kdevplatform/shell/documentcontroller.cpp:546 #28 0x00007f42cd10ec6a in KDevelop::DocumentControllerPrivate::openDocumentInternal(QUrl const&, QString const&, KTextEditor::Range const&, QString const&, QFlags<KDevelop::IDocumentController::DocumentActivation>, KDevelop::IDocument*) (this=0x29dd460, inputUrl=..., prefName=..., range=..., encoding=..., activationParams=..., buddy=0x0) at /home/eike/devel/src/extragear/kdevelop/kdevplatform/shell/documentcontroller.cpp:341 #29 0x00007f42cd10b895 in KDevelop::DocumentController::openDocument(QUrl const&, KTextEditor::Range const&, QFlags<KDevelop::IDocumentController::DocumentActivation>, QString const&, KDevelop::IDocument*) (this=0x2985ca0, inputUrl=..., range=..., activationParams=..., encoding=..., buddy=0x0) at /home/eike/devel/src/extragear/kdevelop/kdevplatform/shell/documentcontroller.cpp:701 #30 0x00007f42cba8cef8 in KDevelop::IDocumentController::openDocument(QUrl const&, KTextEditor::Cursor const&, QFlags<KDevelop::IDocumentController::DocumentActivation>, QString const&) (this=<optimized out>, url=..., cursor=..., activationParams=..., activationParams@entry=..., encoding=...) at /home/eike/devel/src/extragear/kdevelop/kdevplatform/interfaces/idocumentcontroller.cpp:33 #31 0x00007f42cd0ad947 in KDevelop::WorkingSet::loadToArea(Sublime::Area*, Sublime::AreaIndex*, KConfigGroup, KConfigGroup, QMultiMap<QString, Sublime::View*>&) (this=this@entry=0x2ba8680, area=area@entry=0x26970e0, areaIndex=areaIndex@entry=0x26971e0, setGroup=..., areaGroup=..., recycle=...) at /home/eike/devel/src/extragear/kdevelop/kdevplatform/shell/workingsets/workingset.cpp:329 #32 0x00007f42cd0ae60a in KDevelop::WorkingSet::loadToArea(Sublime::Area*, Sublime::AreaIndex*) (this=this@entry=0x2ba8680, area=area@entry=0x26970e0, areaIndex=0x26971e0) at /home/eike/devel/src/extragear/kdevelop/kdevplatform/shell/workingsets/workingset.cpp:253 #33 0x00007f42cd0a79d1 in KDevelop::WorkingSetController::changedWorkingSet(Sublime::Area*, QString const&, QString const&) (this=0x258df50, area=0x26970e0, from=..., to=...) at /home/eike/devel/src/extragear/kdevelop/kdevplatform/shell/workingsetcontroller.cpp:300 #34 0x00007f42c745ee6e in QMetaObject::activate(QObject*, int, int, void**) (a=0x7ffe75be8370, r=0x258df50, this=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobject_impl.h:101 #35 0x00007f42c745ee6e in QMetaObject::activate(QObject*, int, int, void**) (sender=sender@entry=0x26970e0, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=8, argv=argv@entry=0x7ffe75be8370) at kernel/qobject.cpp:3723 #36 0x00007f42c745f407 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=sender@entry=0x26970e0, m=m@entry=0x7f42cc5ec860 <Sublime::Area::staticMetaObject>, local_signal_index=local_signal_index@entry=8, argv=argv@entry=0x7ffe75be8370) at kernel/qobject.cpp:3602 #37 0x00007f42cc3d96ac in Sublime::Area::changedWorkingSet(Sublime::Area*, QString, QString) (this=this@entry=0x26970e0, _t1=<optimized out>, _t1@entry=0x26970e0, _t2=..., _t3=...) at /home/eike/devel/build/extragear/kdevelop/kdevplatform/sublime/moc_area.cpp:332 #38 0x00007f42cc3aa273 in Sublime::Area::setWorkingSet(QString) (this=0x26970e0, name=...) at /home/eike/devel/src/extragear/kdevelop/kdevplatform/sublime/area.cpp:407 #39 0x00007f42cc3abc7a in Sublime::Area::load(KConfigGroup const&) (this=this@entry=0x26970e0, group=...) at /home/eike/devel/src/extragear/kdevelop/kdevplatform/sublime/area.cpp:344 #40 0x00007f42cd0e08f6 in KDevelop::UiController::loadArea(Sublime::Area*, KConfigGroup const&) (this=<optimized out>, area=0x26970e0, group=...) at /home/eike/devel/src/extragear/kdevelop/kdevplatform/shell/uicontroller.cpp:556 #41 0x00007f42cd0e3a8d in KDevelop::UiController::loadAllAreas(QExplicitlySharedDataPointer<KSharedConfig>) (this=0x258caa0, config=...) at /home/eike/devel/src/extragear/kdevelop/kdevplatform/shell/uicontroller.cpp:642 #42 0x00007f42cd0dddb8 in KDevelop::CorePrivate::initialize(KDevelop::Core::Setup, QString) (this=0x2556300, mode=mode@entry=KDevelop::Core::Default, session=...) at /home/eike/devel/src/extragear/kdevelop/kdevplatform/shell/core.cpp:278 #43 0x00007f42cd0df1cd in KDevelop::Core::initialize(QObject*, KDevelop::Core::Setup, QString const&) (splash=splash@entry=0x0, mode=mode@entry=KDevelop::Core::Default, session=...) at /home/eike/devel/src/extragear/kdevelop/kdevplatform/shell/core.cpp:361 #44 0x000000000040a9e1 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /home/eike/devel/src/extragear/kdevelop/kdevelop/app/main.cpp:632 Reported using DrKonqi
Did it crash before that? Looks like the DUChain info got messed up and then triggered a crash further down the road :( not much we can do about this if you cannot reproduce it, I fear. Except rewriting the whole serialization to introduce more safeguards, like checksumming and stuff
I can reproduce it in the sense that it crashes every first run :) If I wipe the cache it eventually happens again, too.
Valgrind requested by kfunk: [eike@ehl1 ~/devel/src/kde/workspace/plasma-desktop (master) 272K]$ KDEV_DISABLE_JIT=1 valgrind --track-origins=yes kdevelop ==21625== Memcheck, a memory error detector ==21625== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al. ==21625== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info ==21625== Command: kdevelop ==21625== kdevelop(21625)/default unknown: Failed to load item with identity 111 ==21625== Invalid read of size 8 ==21625== at 0xCA93D7E: KDevelop::TopDUContextDynamicData::DUChainItemStorage<KDevelop::DUContext*>::getItemForIndex(unsigned int) const (topducontextdynamicdata.cpp:407) ==21625== by 0xCA7C15D: KDevelop::DUContext::rebuildDynamicData(KDevelop::DUContext*, unsigned int) (ducontext.cpp:121) ==21625== by 0xCA91F43: KDevelop::TopDUContextDynamicData::load(unsigned int) (topducontextdynamicdata.cpp:609) ==21625== by 0xCA71224: KDevelop::DUChainPrivate::loadChain(unsigned int, QSet<unsigned int>&) (duchain.cpp:579) ==21625== by 0xCA5D274: KDevelop::DUChain::loadChain(unsigned int) (duchain.cpp:1311) ==21625== by 0xCABD5DF: KDevelop::ParsingEnvironmentFile::topContext() const (parsingenvironment.cpp:140) ==21625== by 0xCA5B556: KDevelop::DUChain::environmentFileForDocument(KDevelop::IndexedString const&, KDevelop::ParsingEnvironment const*, bool) const (duchain.cpp:1400) ==21625== by 0xCA5B68E: KDevelop::DUChain::chainForDocument(KDevelop::IndexedString const&, KDevelop::ParsingEnvironment const*, bool) const (duchain.cpp:1423) ==21625== by 0xCA5B6EB: KDevelop::DUChain::chainForDocument(QUrl const&, KDevelop::ParsingEnvironment const*, bool) const (duchain.cpp:1382) ==21625== by 0x432135A9: ClangSupport::standardContext(QUrl const&, bool) (clangsupport.cpp:351) ==21625== by 0xCACEE3A: KDevelop::DUChainUtils::standardContextForUrl(QUrl const&, bool) (duchainutils.cpp:282) ==21625== by 0x40CCF62E: (anonymous namespace)::getContextAt(QUrl const&, KTextEditor::Cursor) (contextbrowser.cpp:112) ==21625== Address 0x0 is not stack'd, malloc'd or (recently) free'd ==21625== KCrash: crashing... crashRecursionCounter = 2 KCrash: Application Name = kdevelop path = /home/eike/devel/install/bin pid = 21625 KCrash: Arguments: /home/eike/devel/install/bin/kdevelop KCrash: Attempting to start /home/eike/devel/install/lib64/libexec/drkonqi from kdeinit sock_file=/run/user/1000/kdeinit5__0 [1]+ Stopped KDEV_DISABLE_JIT=1 valgrind --track-origins=yes kdevelop [eike@ehl1 ~/devel/src/kde/workspace/plasma-desktop (master) 272K]$ kdevelop(21625)/default unknown: QSocketNotifier: Invalid socket 8 and type 'Read', disabling... ==21625== ==21625== HEAP SUMMARY: ==21625== in use at exit: 66,428,008 bytes in 539,635 blocks ==21625== total heap usage: 1,551,399 allocs, 1,011,764 frees, 272,421,586 bytes allocated ==21625== ==21625== LEAK SUMMARY: ==21625== definitely lost: 2,104 bytes in 30 blocks ==21625== indirectly lost: 4,872 bytes in 104 blocks ==21625== possibly lost: 1,092,700 bytes in 3,921 blocks ==21625== still reachable: 65,328,332 bytes in 535,580 blocks ==21625== of which reachable via heuristic: ==21625== newarray : 31,352 bytes in 763 blocks ==21625== multipleinheritance: 190,840 bytes in 270 blocks ==21625== suppressed: 0 bytes in 0 blocks ==21625== Rerun with --leak-check=full to see details of leaked memory ==21625== ==21625== For counts of detected and suppressed errors, rerun with: -v ==21625== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Ah, the issue here is kdevelop(21625)/default unknown: Failed to load item with identity 111 That belongs to the QML/JS plugin (QmlJSNormalDUContext)- did you uninstall/disable that one? I still think we should handle such cases better, somehow...
Git commit eaf3739fba2229187938123ec0af7459dad3ad28 by Kevin Funk. Committed on 16/09/2016 at 16:23. Pushed by kfunk into branch '5.0'. Hardening: Fix one of the immediate crashes M +1 -0 language/duchain/topducontextdynamicdata.cpp http://commits.kde.org/kdevplatform/eaf3739fba2229187938123ec0af7459dad3ad28
Well, assuming this particular crash got fixed. Please reopen / open another bug report for any related crashes.