Summary: | KDevelop always crashes when loading session cache | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Eugene Shalygin <eugene.shalygin+bugzilla.kde> |
Component: | Language Support: CPP (Clang-based) | Assignee: | kdevelop-bugs-null |
Status: | CONFIRMED --- | ||
Severity: | crash | CC: | igorkuo, master.haber |
Priority: | NOR | ||
Version First Reported In: | git master | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Eugene Shalygin
2024-01-30 09:45:16 UTC
*** Bug 504216 has been marked as a duplicate of this bug. *** A backtrace with KDevelop, KF and Qt debug symbols is attached to the duplicate bug. I have encountered crashes with very similar backtraces multiple times, usually after a system update AND clearing the cache. Clearing the cache again usually gets rid of the crash. I suspected this crash to be a regression due to the porting to Qt 6. But it was reported here half a year before the porting was completed, so it must be something else. The backtrace in the duplicate bug report contains "libclang-15.so.15", so I guess this is not a libclang regression. But it does not look like a KDevelop regression either, because there were effectively no changes to PersistentSymbolTable between https://commits.kde.org/kdevelop/fec7895a45b18f1fe76e1a024668efccc22c39cc (2022-10-07) and https://commits.kde.org/kdevelop/f711c1832e1a0e0702da1750c8019dbd2e204b87 (2024-07-17) Eugene, does the crash happen often on your system? Did it first happen in 2024 when you reported this bug? i know this probably isnt very helpful, but i want to say i've seen this crash before 2022. i just didnt have any ability to send good debug logs back then (In reply to Ian H from comment #3) > i know this probably isnt very helpful, but i want to say i've seen this > crash before 2022. i just didnt have any ability to send good debug logs > back then Actually this comment is helpful. Thanks :) Searched for "PersistentSymbolTableItem" among resolved bugs too and found many similar backtraces: https://bugs.kde.org/buglist.cgi?bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=RESOLVED&bug_status=NEEDSINFO&bug_status=VERIFIED&bug_status=CLOSED&list_id=3154395&longdesc=PersistentSymbolTableItem&longdesc_type=allwordssubstr&product=kdev-python&product=kdevelop&product=kdevplatform&query_format=advanced Perhaps the top of the backtraces has evolved due to code changes, but the following two consecutive calls are in just about every backtrace, even with old C++ support before libclang (!): PersistentSymbolTable::addDeclaration KDevelop::Declaration::setInSymbolTable I'll try to spot bugs in these two functions or perhaps in some other common parts of the many backtraces. Analyzed the backtraces. My conclusion is that this bug is a direct successor to the infamous Bug 272408. The circumstances that lead to the crash and parts of the backtrace are similar. Before Milian's fix of Bug 272408, the crash occurred in ItemRepository::findIndex() or ItemRepository::deleteItem() called from PersistentSymbolTable::addDeclaration(): KDevelop::ItemRepository<KDevelop::PersistentSymbolTableItem, KDevelop::PersistentSymbolTableRequestItem, true, false, 0u, 1048576u>::findIndex KDevelop::PersistentSymbolTable::addDeclaration KDevelop::Declaration::setInSymbolTable OR KDevelop::ItemRepository<KDevelop::PersistentSymbolTableItem, KDevelop::PersistentSymbolTableRequestItem, true, false, 0u, 1048576u>::convertMonsterBucket(int, int) KDevelop::ItemRepository<KDevelop::PersistentSymbolTableItem, KDevelop::PersistentSymbolTableRequestItem, true, false, 0u, 1048576u>::deleteItem(unsigned int) KDevelop::PersistentSymbolTable::addDeclaration(KDevelop::IndexedQualifiedIdentifier const&, KDevelop::IndexedDeclaration const&) KDevelop::Declaration::setInSymbolTable(bool) And this new crash always occurs later - at the end of the lambda in PersistentSymbolTable::addDeclaration(), in ItemRepository::index() invoked from PersistentSymbolTable::addDeclaration(): KDevelop::ItemRepository<KDevelop::(anonymous namespace)::PersistentSymbolTableItem, KDevelop::(anonymous namespace)::PersistentSymbolTableRequestItem, true, QRecursiveMutex, 0u, 1048576u>::convertMonsterBucket(int, int) KDevelop::ItemRepository<KDevelop::(anonymous namespace)::PersistentSymbolTableItem, KDevelop::(anonymous namespace)::PersistentSymbolTableRequestItem, true, QRecursiveMutex, 0u, 1048576u>::index(KDevelop::(anonymous namespace)::PersistentSymbolTableRequestItem const&) operator() KDevelop::LockedItemRepository::write<KDevelop::PersistentSymbolTable, KDevelop::PersistentSymbolTable::addDeclaration(const KDevelop::IndexedQualifiedIdentifier&, const KDevelop::IndexedDeclaration&)::<lambda(KDevelop::(anonymous namespace)::PersistentSymbolTableRepo&)> > KDevelop::PersistentSymbolTable::addDeclaration KDevelop::Declaration::setInSymbolTable Unfortunately, I don't have a good enough understanding of the item repository to figure out what is still wrong there. |