Bug 463680 - KDevelop crashes on startup working on KWin git master repo
Summary: KDevelop crashes on startup working on KWin git master repo
Status: RESOLVED WORKSFORME
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (Clang-based) (other bugs)
Version First Reported In: 5.9.220803
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-31 23:43 UTC by Parag W
Modified: 2023-01-31 05:06 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Parag W 2022-12-31 23:43:39 UTC
SUMMARY
KDevelop crashes on startup.


STEPS TO REPRODUCE
1. Open the KDE Plasma/KWin project from Git master - open a few files, let it finish parsing
2. Close IDE
3. On open it will crash with a SIGSEGV

OBSERVED RESULT
Crashes

EXPECTED RESULT
No Crashes


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora 37
(available in About System)
KDE Plasma Version: 5.26.80
KDE Frameworks Version:  5.102.0
Qt Version: 5.15.7

ADDITIONAL INFORMATION
Backtrace with debuginfo
----------------------------------------
Thread 42 "Queue(0x555555b" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff1e7fc6c0 (LWP 5647)]
0x00007ffff4081feb in KDevelop::Bucket<Utils::SetNodeData, Utils::SetNodeDataRequest, false, 24u>::deleteItem<KDevelop::ItemRepository<Utils::SetNodeData, Utils::SetNodeDataRequest, false, QRecursiveMutex, 24u, 1048576u> > (repository=..., hash=<optimized out>, index=<optimized out>, this=0x0) at /usr/src/debug/kdevelop-22.08.3-1.fc37.x86_64/kdevplatform/serialization/itemrepository.h:514
514         void deleteItem(unsigned short index, unsigned int hash, Repository& repository)
(gdb) bt
#0  0x00007ffff4081feb in KDevelop::Bucket<Utils::SetNodeData, Utils::SetNodeDataRequest, false, 24u>::deleteItem<KDevelop::ItemRepository<Utils::SetNodeData, Utils::SetNodeDataRequest, false, QRecursiveMutex, 24u, 1048576u> >(unsigned short, unsigned int, KDevelop::ItemRepository<Utils::SetNodeData, Utils::SetNodeDataRequest, false, QRecursiveMutex, 24u, 1048576u>&)
    (repository=..., hash=<optimized out>, index=<optimized out>, this=0x0)
    at /usr/src/debug/kdevelop-22.08.3-1.fc37.x86_64/kdevplatform/serialization/itemrepository.h:514
#1  KDevelop::ItemRepository<Utils::SetNodeData, Utils::SetNodeDataRequest, false, QRecursiveMutex, 24u, 1048576u>::deleteItem(unsigned int)
    (index=<optimized out>, this=0x7ffff4e1ec48 <KDevelop::RecursiveImportRepository::repository()::recursiveImportRepositoryObject+8>)
    at /usr/src/debug/kdevelop-22.08.3-1.fc37.x86_64/kdevplatform/serialization/itemrepository.h:1446
#2  Utils::Set::unrefNode(unsigned int) (this=<optimized out>, current=<optimized out>)
    at /usr/src/debug/kdevelop-22.08.3-1.fc37.x86_64/kdevplatform/language/util/setrepository.cpp:1158
#3  0x00007ffff418e7cb in Utils::Set::staticUnref() (this=0x7fff1e7fb760)
    at /usr/src/debug/kdevelop-22.08.3-1.fc37.x86_64/kdevplatform/language/util/setrepository.cpp:1173
#4  Utils::Set::staticUnref() (this=0x7fff1e7fb760)
    at /usr/src/debug/kdevelop-22.08.3-1.fc37.x86_64/kdevplatform/language/util/setrepository.cpp:1166
#5  0x00007ffff40e8ac0 in Utils::StorableSet<KDevelop::IndexedTopDUContext, KDevelop::IndexedTopDUContextIndexConversion, KDevelop::RecursiveImportRepository, true, Utils::DummyLocker>::removeIndex(unsigned int)
    (this=0x555555cc8ab0, index=4940)
    at /usr/src/debug/kdevelop-22.08.3-1.fc37.x86_64/kdevplatform/language/util/setrepository.h:244
#6  0x00007ffff410ebbd in Utils::StorableSet<KDevelop::IndexedTopDUContext, KDevelop::IndexedTopDUContextIndexConversion, KDevelop::RecursiveImportRepository, true, Utils::DummyLocker>::remove(KDevelop::IndexedTopDUContext const&) (t=<optimized out>, this=0x555555cc8ab0, this=<optimized out>, t=<optimized out>)
    at /usr/src/debug/kdevelop-22.08.3-1.fc37.x86_64/kdevplatform/language/util/setrepository.h:226
#7  KDevelop::ParsingEnvironmentFile::setFeatures(QFlags<KDevelop::TopDUContext::Feature>)
    (this=this@entry=0x7fff0c004dc0, features=features@entry=...)
    at /usr/src/debug/kdevelop-22.08.3-1.fc37.x86_64/kdevplatform/language/duchain/parsingenvironment.cpp:313
#8  0x00007ffff410ec80 in KDevelop::ParsingEnvironmentFile::setTopContext(KDevelop::IndexedTopDUContext)
    (this=0x7fff0c004dc0, context=...) at /usr/include/qt5/QtCore/qflags.h:121
#9  0x00007ffff40dd394 in KDevelop::TopDUContext::setParsingEnvironmentFile(KDevelop::ParsingEnvironmentFile*) (this=0x7fff0c0059d0, file=0x7fff0c004dc0)
    at /usr/src/debug/kdevelop-22.08.3-1.fc37.x86_64/kdevplatform/language/duchain/topducontext.cpp:638
#10 0x00007ffff40dd5c7 in KDevelop::TopDUContext::TopDUContext(KDevelop::IndexedString const&, KDevelop::RangeInRevision const&, KDevelop::ParsingEnvironmentFile*)
    (this=0x7fff0c0059d0, url=..., range=<optimized out>, file=0x7fff0c004dc0, this=<optimized out>, url=<optimized out>, range=<optimized out>, file=<optimized out>)
    at /usr/src/debug/kdevelop-22.08.3-1.fc37.x86_64/kdevplatform/language/duchain/topducontext.cpp:555
#11 0x00007fff61d63a30 in ClangDUContext<KDevelop::TopDUContext, 140>::ClangDUContext<KDevelop::IndexedString, KDevelop::RangeInRevision, ClangParsingEnvironmentFile*>(KDevelop::IndexedString, KDevelop::RangeInRevision, ClangParsingEnvironmentFile*) (this=0x7fff0c0059d0)
    at /usr/src/debug/kdevelop-22.08.3-1.fc37.x86_64/plugins/clang/duchain/clangducontext.h:24
#12 (anonymous namespace)::createTopContext (environment=..., path=...)
    at /usr/src/debug/kdevelop-22.08.3-1.fc37.x86_64/plugins/clang/duchain/clanghelpers.cpp:74
#13 ClangHelpers::buildDUChain(void*, QMultiHash<void*, Import> const&, ParseSession const&, QFlags<KDevelop::TopDUContext::Feature>, QHash<void*, KDevelop::ReferencedTopDUContext>&, QHash<KDevelop::IndexedString, KDevelop::ModificationRevision> const&, KDevelop::IndexedString const&, ClangIndex*, std::function<bool ()> const&)
    (file=<optimized out>, imports=..., session=..., features=..., 
    features@entry=..., includedFiles=..., unsavedRevisions=..., parseDocument=..., index=0x5555563ea1f0, abortFunction=...) at /usr/src/debug/kdevelop-22.08.3-1.fc37.x86_64/plugins/clang/duchain/clanghelpers.cpp:141
#14 0x00007fff61dd54fb in ClangParseJob::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*)
    (this=<optimized out>) at /usr/src/debug/kdevelop-22.08.3-1.fc37.x86_64/plugins/clang/clangparsejob.cpp:326
#15 0x00007ffff32c1c1b in ThreadWeaver::IdDecorator::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*)
    (this=<optimized out>, self=..., thread=0x7fff080029e0)
    at /usr/src/debug/kf5-threadweaver-5.101.0-1.fc37.x86_64/src/iddecorator.cpp:50
#16 0x00007ffff32c1a0e in ThreadWeaver::Executor::run(QSharedPointer<ThreadWeaver::JobInterface> const&, ThreadWeaver::Thread*)
    (this=<optimized out>, job=<optimized out>, thread=<optimized out>)
    at /usr/src/debug/kf5-threadweaver-5.101.0-1.fc37.x86_64/src/executor.cpp:33
#17 0x00007ffff32c2845 in ThreadWeaver::Job::execute(QSharedPointer<ThreadWeaver::JobInterface> const&, ThreadWeaver::Thread*)
    (this=<optimized out>, self=..., th=0x7fff080029e0) at /usr/src/debug/kf5-threadweaver-5.101.0-1.fc37.x86_64/src/job.cpp:64
#18 0x00007ffff32c6418 in ThreadWeaver::Thread::run() (this=0x7fff080029e0)
    at /usr/src/debug/kf5-threadweaver-5.101.0-1.fc37.x86_64/src/thread.cpp:98
#19 0x00007ffff60e84f7 in QThreadPrivate::start(void*) (arg=0x7fff080029e0) at thread/qthread_unix.cpp:330
#20 0x00007ffff5aae14d in start_thread (arg=<optimized out>) at pthread_create.c:442
#21 0x00007ffff5b2fa00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
(gdb)
Comment 1 Igor Kushnir 2023-01-01 09:02:02 UTC
Can you reproduce the crash after clearing the cache? (click the Clear Cache button in "The previous session crashed." dialog that appears on KDevelop start after a crash)
Comment 2 Parag W 2023-01-01 18:11:21 UTC
(In reply to Igor Kushnir from comment #1)
> Can you reproduce the crash after clearing the cache? (click the Clear Cache
> button in "The previous session crashed." dialog that appears on KDevelop
> start after a crash)

After clearing cache last time it worked for a bit before starting to crash again - I have cleared the cache once more and so far it is working.
Comment 3 Igor Kushnir 2023-01-01 18:19:05 UTC
KDevelop sometimes takes a long time to exit, especially after reparsing a big project. Sometimes it even hangs indefinitely. Though in my recent experience eventually KDevelop finishes its work and exits cleanly.  Check a system monitor to make sure that a kdevelop process is not running when you shut the system down. See Bug 463497.
Comment 4 Bug Janitor Service 2023-01-16 05:14:18 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Bug Janitor Service 2023-01-31 05:06:20 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!