https://bugs.kde.org/show_bug.cgi?id=486932

--- Comment #5 from Igor Kushnir <igor...@gmail.com> ---
(In reply to Igor Kushnir from comment #4)
> The crash just happened once to me. But I cannot reproduce it. Here is a
> more detailed backtrace (still no libclang debug symbols):
Managed to obtain a complete backtrace for the single crash that happened on my
system. Here are the steps in case I or someone else needs them in the future
(they can also be used to examine past core dumps with freshly downloaded
KDevelop debug symbols).
1. Download debuginfod debug symbols for libclang:
$ debuginfod-find debuginfo /usr/lib/libclang.so.17
/home/igor/.cache/debuginfod_client/02120dc8526595aac7ab8bc78eca4efc936b09be/debuginfo
2. Trigger the "Run=>Examine Core File=>Examine Core File with GDB" action in
KDevelop, select /bin/kdevelop and the crash coredump in the dialog that
appears.
3. Activate KDevelop's GDB tool view. All commands in the following steps are
entered into the GDB command line edit inside this tool view.
4. At this point the command `thread apply 15 bt` still shows a backtrace
without libclang debug symbols. Read and follow the top answer here:
https://stackoverflow.com/questions/30281766/need-to-load-debugging-symbols-for-shared-library-in-gdb
5. (gdb) 48info sharedlibrary
>From To Syms Read Shared Object Library
...
0x00007f4d26433020 0x00007f4d277c3c54 Yes /usr/lib/libclang.so.17
...
6. (gdb) 49add-symbol-file
/home/igor/.cache/debuginfod_client/02120dc8526595aac7ab8bc78eca4efc936b09be/debuginfo
0x00007f4d26433020
add symbol table from file
"/home/igor/.cache/debuginfod_client/02120dc8526595aac7ab8bc78eca4efc936b09be/debuginfo"
at
.text_addr = 0x7f4d26433020
(y or n) [answered Y; input not from terminal]
Reading symbols from
/home/igor/.cache/debuginfod_client/02120dc8526595aac7ab8bc78eca4efc936b09be/debuginfo...
7. (gdb) 50thread apply 15 bt

Thread 15 (Thread 0x7f4d393616c0 (LWP 151298)):
#0 0x00007f4db111d9ed in poll () at /usr/lib/libc.so.6
#1 0x00007f4db31c6bca in ??? () at /usr/lib/libKF5Crash.so.5
#2 0x00007f4db31c782c in KCrash::defaultCrashHandler(int) () at
/usr/lib/libKF5Crash.so.5
#3 0x00007f4db1058e20 in <signal handler called> () at /usr/lib/libc.so.6
#4 memcpy () at /usr/include/bits/string_fortified.h:29
#5 llvm::support::endian::read<unsigned int, 0ul> () at
/usr/include/llvm/Support/Endian.h:66
#6 llvm::support::endian::readNext<unsigned int, 0ul, unsigned char> () at
/usr/include/llvm/Support/Endian.h:84
#7 llvm::support::endian::readNext<unsigned int, (llvm::support::endianness)1,
0ul, unsigned char> () at /usr/include/llvm/Support/Endian.h:92
#8
llvm::OnDiskChainedHashTable<clang::serialization::reader::ASTIdentifierLookupTrait>::find_hashed
() at /usr/include/llvm/Support/OnDiskHashTable.h:360
#9 operator() () at
/usr/src/debug/clang/clang-17.0.6.src/lib/Serialization/ASTReader.cpp:2103
#10 clang::ASTReader::get () at
/usr/src/debug/clang/clang-17.0.6.src/lib/Serialization/ASTReader.cpp:8174
#11 0x00007f4d2644f6f7 in clang::IdentifierTable::get () at
/usr/src/debug/clang/clang-17.0.6.src/include/clang/Basic/IdentifierTable.h:647
#12 0x00007f4d26af5423 in clang::Preprocessor::getIdentifierInfo () at
/usr/src/debug/clang/clang-17.0.6.src/include/clang/Lex/Preprocessor.h:1516
#13 clang::Preprocessor::LookUpIdentifierInfo () at
/usr/src/debug/clang/clang-17.0.6.src/lib/Lex/Preprocessor.cpp:715
#14 0x00007f4d275eb473 in getTokens(clang::ASTUnit*, clang::SourceRange,
llvm::SmallVectorImpl<CXToken>&) [clone .constprop.0] () at
/usr/src/debug/clang/clang-17.0.6.src/tools/libclang/CIndex.cpp:7248
#15 0x00007f4d264618f0 in clang_tokenize () at
/usr/src/debug/clang/clang-17.0.6.src/tools/libclang/CIndex.cpp:7330
#16 0x00007f4d39396df8 in (anonymous namespace)::isInsideComment
(position=<optimized out>, file=0x13, unit=0x7f4d113e1eb0) at
/home/Mint14_home/igor/Install/abs/kdevelop-git/src/kdevelop/plugins/clang/codecompletion/context.cpp:490
#17 ClangCodeCompletionContext::isValidPosition
(this=this@entry=0x7f4d20001fc0, unit=0x7f4d113e1eb0,
file=file@entry=0x7f4c719a0520) at
/home/Mint14_home/igor/Install/abs/kdevelop-git/src/kdevelop/plugins/clang/codecompletion/context.cpp:1081
#18 0x00007f4d39397b16 in
ClangCodeCompletionContext::ClangCodeCompletionContext (this=0x7f4d20001fc0,
context=<optimized out>, sessionData=<optimized out>, url=<optimized out>,
position=<optimized out>, text=<optimized out>, followingText=<optimized out>,
this=<optimized out>, context=<optimized out>, sessionData=<optimized out>,
url=<optimized out>, position=<optimized out>, text=<optimized out>,
followingText=<optimized out>) at
/home/Mint14_home/igor/Install/abs/kdevelop-git/src/kdevelop/plugins/clang/codecompletion/context.cpp:1067
#19 0x00007f4d393a5160 in
QSharedPointer<ClangCodeCompletionContext>::create<KDevelop::DUChainPointer<KDevelop::DUContext>
const&, QExplicitlySharedDataPointer<ParseSessionData> const&, QUrl const&,
KTextEditor::Cursor const&, QString const&, QString const&> () at
/usr/include/qt/QtCore/qsharedpointer_impl.h:444
#20 (anonymous namespace)::createCompletionContext (followingText="i\n#include
\"ui_qthelpconfig.h\"\n#include \"ui_qthelpconfigeditdialog.h\"\n#include
\"qthelp_config_shared.h\"\n#include \"debug.h\"\n#include
\"qthelpplugin.h\"\n\nenum Column\n{\n NameColumn,\n PathColumn,\n "...,
text=<optimized out>, position=<optimized out>, url=<optimized out>,
session=..., context=...) at
/home/Mint14_home/igor/Install/abs/kdevelop-git/src/kdevelop/plugins/clang/codecompletion/model.cpp:48
#21 (anonymous namespace)::ClangCodeCompletionWorker::run (this=0x55817e19a390)
at
/home/Mint14_home/igor/Install/abs/kdevelop-git/src/kdevelop/plugins/clang/codecompletion/model.cpp:115
#22 0x00007f4db18c89a7 in ??? () at /usr/lib/libQt5Core.so.5
#23 0x00007f4db18ca4df in QTimer::timeout(QTimer::QPrivateSignal) () at
/usr/lib/libQt5Core.so.5
#24 0x00007f4db18bb44e in QObject::event(QEvent*) () at
/usr/lib/libQt5Core.so.5
#25 0x00007f4db25578ff in QApplicationPrivate::notify_helper(QObject*, QEvent*)
() at /usr/lib/libQt5Widgets.so.5
#26 0x00007f4db1893a68 in QCoreApplication::notifyInternal2(QObject*, QEvent*)
() at /usr/lib/libQt5Core.so.5
#27 0x00007f4db18e20db in QTimerInfoList::activateTimers() () at
/usr/lib/libQt5Core.so.5
#28 0x00007f4db18e26ca in ??? () at /usr/lib/libQt5Core.so.5
#29 0x00007f4dad720199 in ??? () at /usr/lib/libglib-2.0.so.0
#30 0x00007f4dad77f3bf in ??? () at /usr/lib/libglib-2.0.so.0
#31 0x00007f4dad71f712 in g_main_context_iteration () at
/usr/lib/libglib-2.0.so.0
#32 0x00007f4db18e288c in
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
at /usr/lib/libQt5Core.so.5
#33 0x00007f4db1892774 in
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at
/usr/lib/libQt5Core.so.5
#34 0x00007f4db16ef666 in QThread::exec() () at /usr/lib/libQt5Core.so.5
#35 0x00007f4db16eb88a in ??? () at /usr/lib/libQt5Core.so.5
#36 0x00007f4db10aa1cf in ??? () at /usr/lib/libc.so.6
#37 0x00007f4db112b6ec in ??? () at /usr/lib/libc.so.6

--------------
Now we need to analyze the libclang backtrace and try to figure out the bug.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to