https://bugs.kde.org/show_bug.cgi?id=444055
Bug ID: 444055 Summary: Locking related crash on assert in debug mode (crash in ParsingEnvironmentFile::url, called from Python::ExpressionVisitor::visitCall) Product: kdev-python Version: git master Platform: Compiled Sources OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: Language support Assignee: m...@svenbrauch.de Reporter: jonathan.ver...@matfyz.cz Target Milestone: --- Created attachment 142631 --> https://bugs.kde.org/attachment.cgi?id=142631&action=edit DrKonqui crash backtrace. When running a debug build, I get occasional crashes on asserts in ENSURE_READER_LOCKED. A sample trace is attached, the relevant part is the following: Thread 40 (Thread 0x7faf37fff700 (LWP 254148)): [KCrash Handler] #4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #5 0x00007fb014a99859 in __GI_abort () at abort.c:79 #6 0x00007fb014edcbd7 in qt_message_fatal (context=..., message=<synthetic pointer>...) at global/qlogging.cpp:1914 #7 QMessageLogger::fatal(char const*, ...) const (this=this@entry=0x7faf37ffb6e0, msg=msg@entry=0x7fb0151e7ea0 "ASSERT: \"%s\" in file %s, line %d") at global/qlogging.cpp:893 #8 0x00007fb014edbfe3 in qt_assert(char const*, char const*, int) (assertion=<optimized out>, file=<optimized out>, line=<optimized out>) at ../../include/QtCore/../../src/corelib/global/qlogging.h:90 #9 0x00007fb0139f88f4 in KDevelop::ParsingEnvironmentFile::url() const (this=0x7faf2460d100) at /home/jonathan/zdroj/clones/kdevelop/kdevplatform/language/duchain/parsingenvironment.cpp:83 #10 0x00007fb0139502d9 in KDevelop::DUChainPrivate::loadInformation(unsigned int) (this=0x7fb014075420 <KDevelop::(anonymous namespace)::Q_QGS_sdDUChainPrivate::innerFunction()::holder>, topContextIndex=2507) at /home/jonathan/zdroj/clones/kdevelop/kdevplatform/language/duchain/duchain.cpp:1040 #11 0x00007fb01394e472 in KDevelop::DUChainPrivate::loadChain(unsigned int, QSet<unsigned int>&) (this=0x7fb014075420 <KDevelop::(anonymous namespace)::Q_QGS_sdDUChainPrivate::innerFunction()::holder>, index=2507, loaded=...) at /home/jonathan/zdroj/clones/kdevelop/kdevplatform/language/duchain/duchain.cpp:636 #12 0x00007fb013947c01 in KDevelop::DUChain::loadChain(unsigned int) (this=0x559a18e38450, index=2507) at /home/jonathan/zdroj/clones/kdevelop/kdevplatform/language/duchain/duchain.cpp:1413 #13 0x00007fb0139a0117 in KDevelop::DUChain::chainForIndex(unsigned int) (this=0x559a18e38450, index=2507) at /home/jonathan/zdroj/clones/kdevelop/kdevplatform/language/duchain/duchain.h:193 #14 0x00007fb0139a0535 in KDevelop::IndexedDeclaration::declaration() const (this=0x7faf1c087fa6) at /home/jonathan/zdroj/clones/kdevelop/kdevplatform/language/duchain/indexeddeclaration.cpp:52 #15 0x00007fb013a12c83 in KDevelop::DeclarationId::declaration(KDevelop::TopDUContext const*, bool) const (this=0x7faf1c087fa6, top=0x7faf241c2430, instantiateIfRequired=true) at /home/jonathan/zdroj/clones/kdevelop/kdevplatform/language/duchain/declarationid.cpp:198 #16 0x00007fb013a66d88 in KDevelop::IdentifiedType::declaration(KDevelop::TopDUContext const*) const (this=0x7faf24614378, top=0x7faf241c2430) at /home/jonathan/zdroj/clones/kdevelop/kdevplatform/language/duchain/types/identifiedtype.cpp:75 #17 0x00007faf3c1854e8 in Python::ExpressionVisitor::visitCall(Python::CallAst*) The code asserts, since the call to `KDevelop::IdentifiedType::declaration` requires the DUChain to be at least read locked. (However, the ENSURE_READER_LOCKED macro only appears deeper in the call chain in `KDevelop::ParsingEnvironmentFile::url`) SOFTWARE/OS VERSIONS Note that kdevelop is actually not running master, but the https://invent.kde.org/kiloalphaindia/kdevelop/-/tree/document-queueing-performance branch. This should be irrelevant. Kdev-python is actually on commit 4c4fa036e07, however the changes since master did not touch any code. Operating System: KDE neon 5.23 KDE Plasma Version: 5.23.0 KDE Frameworks Version: 5.87.0 Qt Version: 5.15.3 Kernel Version: 5.11.0-37-generic (64-bit) Graphics Platform: X11 Processors: 16 × AMD Ryzen 7 2700X Eight-Core Processor Memory: 31.3 GiB of RAM Graphics Processor: Radeon RX 580 Series -- You are receiving this mail because: You are watching all bug changes.