Summary: | kdevelop crashes while parsing /usr/lib64/python3.6/html/entities.py or /usr/lib64/python3.6/email/message.py | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Aaron Williams <aaronw> |
Component: | Analyzer: Clazy | Assignee: | kdevelop-bugs-null |
Status: | REPORTED --- | ||
Severity: | crash | CC: | anton, chrand |
Priority: | NOR | ||
Version: | 5.7.211203 | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | gcc toolchain tree-affine.h |
Description
Aaron Williams
2022-03-24 13:32:31 UTC
I see the following output when kdevelop is parsing: [Detaching after fork from child process 63268] kdevelop.plugins.customscript: indent returned empty text for style "autopep8" "/usr/bin/autopep8 -i $TMPFILE" [Detaching after fork from child process 63282] kdevelop.plugins.customscript: indent returned empty text for style "autopep8" "/usr/bin/autopep8 -i $TMPFILE" [Detaching after fork from child process 63298] kdevelop.plugins.customscript: indent returned empty text for style "autopep8" "/usr/bin/autopep8 -i $TMPFILE" [Detaching after fork from child process 63315] kdevelop.plugins.customscript: indent returned empty text for style "autopep8" "/usr/bin/autopep8 -i $TMPFILE" [Detaching after fork from child process 63331] kdevelop.plugins.customscript: indent returned empty text for style "autopep8" "/usr/bin/autopep8 -i $TMPFILE" [Detaching after fork from child process 63348] kdevelop.plugins.customscript: indent returned empty text for style "autopep8" "/usr/bin/autopep8 -i $TMPFILE" [Detaching after fork from child process 63363] kdevelop.plugins.customscript: indent returned empty text for style "autopep8" "/usr/bin/autopep8 -i $TMPFILE" [Detaching after fork from child process 63378] kdevelop.plugins.customscript: indent returned empty text for style "autopep8" "/usr/bin/autopep8 -i $TMPFILE" [Detaching after fork from child process 63393] kdevelop.plugins.customscript: indent returned empty text for style "autopep8" "/usr/bin/autopep8 -i $TMPFILE" [Detaching after fork from child process 63408] kdevelop.plugins.customscript: indent returned empty text for style "autopep8" "/usr/bin/autopep8 -i $TMPFILE" [Detaching after fork from child process 63424] kdevelop.plugins.customscript: indent returned empty text for style "autopep8" "/usr/bin/autopep8 -i $TMPFILE" [Detaching after fork from child process 63439] kdevelop.plugins.customscript: indent returned empty text for style "autopep8" "/usr/bin/autopep8 -i $TMPFILE" [Detaching after fork from child process 63455] kdevelop.plugins.customscript: indent returned empty text for style "autopep8" "/usr/bin/autopep8 -i $TMPFILE" [Detaching after fork from child process 63471] kdevelop.plugins.customscript: indent returned empty text for style "autopep8" "/usr/bin/autopep8 -i $TMPFILE" [Detaching after fork from child process 63486] [Detaching after fork from child process 63487] [Detaching after fork from child process 63490] kdevelop.plugins.welcomepage: "Last fetch of news feed was on Wed Mar 23 22:05:44 2022 GMT-0700" [Detaching after fork from child process 63497] Note that it doesn't always crash on the same file either. This time it is crashing on /usr/lib64/python3.6/email/message.py This may be related to bug #426292 In OpenSUSE these files are part of python3-base-3.6.15-150300.10.21.1.x86_64 It looks like it is crashing on other non-Python files as well. It's possible that this is an issue with OpenSUSE since I see that the version for most of KDevelop is 21.12.3-lp153.10.8 however the Python plugin is 21.12.3-lp153.10.1. After uninstalling the Python plugin it is still crashing. Now I am seeing the following error: KCrash: Application 'kdevelop' crashing... The X11 connection broke (error 1). Did the X11 server die? DUContextData::m_importers There were items left on destruction: 601 DUContextData::m_importedContexts There were items left on destruction: 1160 TopDUContextData::m_usedDeclarationIds There were items left on destruction: 720 ClassFunctionDeclarationData::m_defaultParameters There were items left on destruction: 1316 MacroDefinitionData::parameters There were items left on destruction: 5791 malloc(): smallbin double linked list corrupted Unable to start Dr. Konqi Re-raising signal for core dump handling. I am also seeing this crash during background parsing. Is there some way to disable it? Thread 39 "Queue(0x5555562" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fff949cc700 (LWP 5135)] 0x00007fff9039d312 in clang::ASTContext::getTypeInfoImpl (this=0x555562eacc20, T=<optimized out>) at ../tools/clang/include/clang/AST/Type.h:4480 4480 QualType getUnderlyingType() const { return TOType; } Created attachment 147707 [details]
gcc toolchain tree-affine.h
File where parser is crashing
With this last crash the issue appears to be a bit different. This looks like a stack overflow due to a loop: Thread 25 "Queue(0x5555561" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fff9d47f700 (LWP 21318)] 0x00007fff8fc0b312 in clang::ASTContext::getTypeInfoImpl (this=0x555563f0ff80, T=<optimized out>) at ../tools/clang/include/clang/AST/Type.h:4480 4480 QualType getUnderlyingType() const { return TOType; } (gdb) bt #0 0x00007fff8fc0b312 in clang::ASTContext::getTypeInfoImpl (this=0x555563f0ff80, T=<optimized out>) at ../tools/clang/include/clang/AST/Type.h:4480 #1 0x00007fff8fc0c1bf in clang::ASTContext::getTypeInfo (this=0x555563f0ff80, T=0x5555612b0470) at ../tools/clang/lib/AST/ASTContext.cpp:1867 #2 0x00007fff8fc0b317 in clang::ASTContext::getTypeInfoImpl (this=0x555563f0ff80, T=<optimized out>) at ../tools/clang/include/clang/AST/Type.h:4480 #3 0x00007fff8fc0c1bf in clang::ASTContext::getTypeInfo (this=0x555563f0ff80, T=0x5555612b0470) at ../tools/clang/lib/AST/ASTContext.cpp:1867 #4 0x00007fff8fc0b317 in clang::ASTContext::getTypeInfoImpl (this=0x555563f0ff80, T=<optimized out>) at ../tools/clang/include/clang/AST/Type.h:4480 #5 0x00007fff8fc0c1bf in clang::ASTContext::getTypeInfo (this=0x555563f0ff80, T=0x5555612b0470) at ../tools/clang/lib/AST/ASTContext.cpp:1867 #6 0x00007fff8fc0b317 in clang::ASTContext::getTypeInfoImpl (this=0x555563f0ff80, T=<optimized out>) at ../tools/clang/include/clang/AST/Type.h:4480 #7 0x00007fff8fc0c1bf in clang::ASTContext::getTypeInfo (this=0x555563f0ff80, T=0x5555612b0470) at ../tools/clang/lib/AST/ASTContext.cpp:1867 #8 0x00007fff8fc0b317 in clang::ASTContext::getTypeInfoImpl (this=0x555563f0ff80, T=<optimized out>) at ../tools/clang/include/clang/AST/Type.h:4480 #9 0x00007fff8fc0c1bf in clang::ASTContext::getTypeInfo (this=0x555563f0ff80, T=0x5555612b0470) at ../tools/clang/lib/AST/ASTContext.cpp:1867 ... It is not always crashing on the same file though I am seeing the same loop behavior. I was finally able to get kdevelop to come up without crashing. I had to temporarily delete the symlinks to the two toolchains while it was parsing then re-create the symlinks afterwards. It seems that something in the arm-none-eabi toolchain is causing the Kdevelop parser to crash. After doing this I have added the tools and tools-scp symlinks to be excluded from the project. On my Teensy C++ projects (Arduino style using an Arm processor). Kdevelop crashes while doing background parsing if there are too many symbolic links in the path to libraries or sources, It seems like it generates a recursive loop that finally crashes Kdevelop. I am using Ubuntu 22.04, where it fails. It worked fine with Ubuntu 20.04. When most symbolic links are replaced with real files, then everything works fine. |