Bug 401564 - libclang bad filedescriptor crash (abort)?
Summary: libclang bad filedescriptor crash (abort)?
Status: RESOLVED WAITINGFORINFO
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (Clang-based) (show other bugs)
Version: git master
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-30 11:04 UTC by RJVB
Modified: 2019-05-21 09:09 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
New crash information added by DrKonqi (66.80 KB, text/plain)
2018-12-07 09:21 UTC, RJVB
Details
New crash information added by DrKonqi (27.88 KB, text/plain)
2018-12-21 20:56 UTC, RJVB
Details
New crash information added by DrKonqi (46.63 KB, text/plain)
2019-04-28 10:59 UTC, RJVB
Details
New crash information added by DrKonqi (37.28 KB, text/plain)
2019-05-21 09:09 UTC, RJVB
Details

Note You need to log in before you can comment on or make changes to this bug.
Description RJVB 2018-11-30 11:04:34 UTC
I've now seen two cases where KDevelop crashes, DrKonqi starts but doesn't get any backtrace at all and all the usable information I get from the terminal is

```
KCrash: Application 'kdevelop' crashing...
KCrash: Attempting to start /opt/local/lib/x86_64-linux-gnu/libexec/drkonqi from kdeinit
sock_file=/run/user/505/kdeinit5__0

QSocketNotifier: Invalid socket 9 and type 'Read', disabling...
QSocketNotifier: Invalid socket 28 and type 'Read', disabling...
LIBCLANG FATAL ERROR: IO failure on output stream: Bad file descriptor
Unable to start Dr. Konqi
Re-raising signal for core dump handling.
```

Both times happened while parsing a session containing a project for the KDevelop source tree that had not yet been opened with the current git head of the 5.3 branch (v5.3.0-37-ge1a51bd359). Both times I restarted the process, attached a debugger and did not get the bug again.

I'll update this ticket as/when I learn more.
Comment 1 RJVB 2018-12-01 10:30:02 UTC
Another comparable crash where the process was killed before DrKonqi could get a backtrace (= while it was trying to?). This time libclang printed a bit more: see below.
I was in patchreview mode, and had just saved some more changes to a file. I have noticed before that the clang parser and the patchreview mode don't really like each other (sluggish performance).

```
git diff job: ("git", "diff", "--no-color", "--no-ext-diff", "--full-index", "HEAD", "--", "/home/bertin/work/src/Scratch/KDE/kdevelop5-git")
kdevelop.plugins.clang: No parse session / AST attached to context for url QUrl("file:///home/bertin/work/src/Scratch/KDE/kdevelop5-git/plugins/cmake/cmakeutils.cpp")
git diff job: ("git", "diff", "--no-color", "--no-ext-diff", "--full-index", "HEAD", "--", "/home/bertin/work/src/Scratch/KDE/kdevelop5-git")
libclang: crash detected during parsing: {
  'source_filename' : '/home/bertin/work/src/Scratch/KDE/kdevelop5-git/plugins/cmake/cmakeutils.cpp'
  'command_line_args' : ['clang', '-ferror-limit=100', '-fspell-checking', '', '-Wunused-parameter', '-Wunreachable-code', '-Wall', '-std=c++11', '-O3', '-g', '-std=c++0x', '-fno-operator-names', '-fno-exceptions', '-Wno-gnu-zero-variadic-macro-arguments', '-Wall', '-Wextra', '-Wcast-align', '-Wchar-subscripts', '-Wformat-security', '-Wno-long-long', '-Wpointer-arith', '-Wundef', '-Wnon-virtual-dtor', '-Woverloaded-virtual', '-Wreturn-type', '-Wvla', '-Wdate-time', '-Wzero-as-null-pointer-constant', '-fPIC', '-fvisibility=hidden', '-fvisibility-inlines-hidden', '-Wno-missing-field-initializers', '-Wswitch', '-Wundefined-bool-conversion', '-Wtautological-undefined-compare', '', '-Wcovered-switch-default', '-Wno-gnu-zero-variadic-macro-arguments', '-pedantic', '-fPIC', '-std=gnu++11', '-nostdinc', '-nostdinc++', '-xc++', '-isystem', '/opt/local/share/kdevclangsupport/wrappedQtHeaders', '-isystem', '/opt/local/share/kdevclangsupport/wrappedQtHeaders/QtCore', '-isystem/opt/local/include/KF5/KTextEditor', '-isystem/opt/local/include/KF5', '-isystem/opt/local/include/KF5/KParts', '-isystem/opt/local/include/KF5/KIOWidgets', '-isystem/opt/local/include/KF5/KIOCore', '-isystem/opt/local/include/KF5/KCoreAddons', '-isystem/opt/local/include/qt5', '-isystem/opt/local/include/qt5/QtCore', '-isystem/opt/local/share/qt5/mkspecs/linux-g++-64', '-isystem/opt/local/include/KF5/KService', '-isystem/opt/local/include/KF5/KConfigCore', '-isystem/opt/local/include/qt5/QtNetwork', '-isystem/opt/local/include/qt5/QtConcurrent', '-isystem/opt/local/include/qt5/QtDBus', '-isystem/opt/local/include/KF5/KJobWidgets', '-isystem/opt/local/include/qt5/QtWidgets', '-isystem/opt/local/include/qt5/QtGui', '-isystem/opt/local/include/KF5/KCompletion', '-isystem/opt/local/include/KF5/KWidgetsAddons', '-isystem/opt/local/include/KF5/KXmlGui', '-isystem/opt/local/include/qt5/QtXml', '-isystem/opt/local/include/KF5/KConfigWidgets', '-isystem/opt/local/include/KF5/KCodecs', '-isystem/opt/local/include/KF5/KConfigGui', '-isystem/opt/local/include/KF5/KAuth', '-isystem/opt/local/include/KF5/KTextWidgets', '-isystem/opt/local/include/KF5/SonnetUi', '-isystem/opt/local/include/KF5/KI18n', '-isystem/opt/local/include/KF5/ThreadWeaver', '-isystem/opt/local/include', '-isystem/usr/include/c++/8', '-isystem/usr/include/x86_64-linux-gnu/c++/8', '-isystem/usr/include/c++/8/backward', '-isystem/usr/local/include', '-isystem/usr/include/x86_64-linux-gnu', '-isystem/include', '-isystem/usr/include', '-I/home/bertin/work/src/Scratch/KDE/kdevelop5-git/build/plugins/cmake', '-I/home/bertin/work/src/Scratch/KDE/kdevelop5-git/plugins/cmake', '-I/home/bertin/work/src/Scratch/KDE/kdevelop5-git/build/plugins/cmake/kdevcmakecommon_autogen/include', '-I/home/bertin/work/src/Scratch/KDE/kdevelop5-git', '-I/home/bertin/work/src/Scratch/KDE/kdevelop5-git/build', '-I/home/bertin/work/src/Scratch/KDE/kdevelop5-git/plugins/cmake/parser', '-I/home/bertin/work/src/Scratch/KDE/kdevelop5-git/kdevplatform', '-I/home/bertin/work/src/Scratch/KDE/kdevelop5-git/build/kdevplatform', '-I/home/bertin/work/src/Scratch/KDE/kdevelop5-git/build/kdevplatform/interfaces', '-I/home/bertin/work/src/Scratch/KDE/kdevelop5-git/kdevplatform/interfaces', '-I/home/bertin/work/src/Scratch/KDE/kdevelop5-git/build/kdevplatform/project', '-I/home/bertin/work/src/Scratch/KDE/kdevelop5-git/kdevplatform/project', '-I/home/bertin/work/src/Scratch/KDE/kdevelop5-git/build/kdevplatform/util', '-I/home/bertin/work/src/Scratch/KDE/kdevelop5-git/kdevplatform/util', '-I/home/bertin/work/src/Scratch/KDE/kdevelop5-git/build/kdevplatform/vcs', '-I/home/bertin/work/src/Scratch/KDE/kdevelop5-git/kdevplatform/vcs', '-I/home/bertin/work/src/Scratch/KDE/kdevelop5-git/build/kdevplatform/outputview', '-I/home/bertin/work/src/Scratch/KDE/kdevelop5-git/kdevplatform/outputview', '-I/home/bertin/work/src/Scratch/KDE/kdevelop5-git/build/kdevplatform/language', '-I/home/bertin/work/src/Scratch/KDE/kdevelop5-git/kdevplatform/language', '-I/home/bertin/work/src/Scratch/KDE/kdevelop5-git/build/kdevplatform/serialization', '-I/home/bertin/work/src/Scratch/KDE/kdevelop5-git/kdevplatform/serialization', '-isystem', '/usr/lib/llvm-6.0/lib/clang/6.0.1/include', '-imacros', '/tmp/kde-bertin/kdevelop.i27151'],
  'unsaved_files' : [],
  'options' : 781,
}
KCrash: Application 'kdevelop' crashing...
KCrash: Attempting to start /opt/local/lib/x86_64-linux-gnu/libexec/drkonqi from kdeinit
sock_file=/run/user/505/kdeinit5__0
LIBCLANG FATAL ERROR: IO failure on output stream: Bad file descriptor
The X11 connection broke (error 1). Did the X11 server die?
FunctionDeclarationData::m_defaultParameters There were items left on destruction: 5781
Unable to start Dr. Konqi
Re-raising signal for core dump handling.
```
Comment 2 RJVB 2018-12-01 13:03:21 UTC
FWIW:
Qt Creator appears to be using a server process to deploy its clang-based parser. I don't know at what overhead cost that comes with, but I think there are a few obvious advantages to the approach:

- crash-protection: just restart the server if libclang runs into a problem (i.e. when the server is no longer there).
- RAM use and management: multiple sessions can connect to a single server process and (in its simplest form) memory can be reclaimed by restarting that process manually.

If this hasn't been considered yet (and is anyway feasible) it could make for a very nice GSoC project.
Comment 3 Sven Brauch 2018-12-01 13:49:42 UTC
From my point of view that is unfortunately not feasible. It would be very good to have it, but too hard to do.
Comment 4 RJVB 2018-12-01 13:59:11 UTC
Pity. Any idea how Qt Creator can pull it off then?
Comment 5 Sven Brauch 2018-12-01 14:05:45 UTC
Different overall architecture :/
Comment 6 RJVB 2018-12-01 14:54:48 UTC
Or maybe they just designed the parser around a server architecture instead of using lots of direct calls into libclang?

I haven't even tried to understand how the current architecture is designed. But if the issue is "lots of direct calls into libclang", can't you write a (set of) wrapper class(es) that hide the server/client details and that provide bindings for all used functions (it might be possible to generate many of those automatically)? Lots of work but not necessarily very difficult, probably not more so than designing the server/client protocol itself.
Comment 7 Sven Brauch 2018-12-01 14:55:59 UTC
Feel free to try and devise a strategy how this should work. I thought about it for a few hours and couldn't come up with anything remotely feasible.
Comment 8 RJVB 2018-12-01 15:04:52 UTC
I will, though don't hold your breath I'll do better than someone who's bound to know this part of the code a lot better than I do. The only brain fart I had for now is how Objective C's support for sending messages (= calling class methods) to remote class instances could have come in handy here. But that is something I never actually used.

Anyway, there's a reason why I suggested a GSoC project ;)
Comment 9 Sven Brauch 2018-12-01 15:07:06 UTC
I think this is out of scope for a GSoC project, a newcomer will not obtain the necessary understanding for doing this within 3 months.
Comment 10 RJVB 2018-12-01 16:36:50 UTC
Wow, is the architecture that complex or opaque (on top of the already not very accessible libclang API itself)? If so we should hope nothing ever breaks when the original author(s) are unavailable...
Comment 11 Sven Brauch 2018-12-01 16:55:41 UTC
Well, you have been around for years and you have continuously been claiming it is too complex for you to look into, so there's that ;)
Comment 12 RJVB 2018-12-01 17:52:10 UTC
Well, I've never made such claims under the premise of spending 3 months on it full-time (with or without the additional detail of a formal training in computer science) O:-)

And in another there's that register: there's a Murphy's Law version predicting that if I do let myself get dragged down this hole and IF I manage to come up with something that works it will by definition be the least acceptable solution ;)
Comment 13 RJVB 2018-12-07 09:21:17 UTC
Created attachment 116733 [details]
New crash information added by DrKonqi

kdevelop (5.3.0-38-g7898bb4174) using Qt 5.9.7

Here's a crash where I did manage to get a backtrace (but is it useful...?) I'd been editing files selected via the search-in-files toolview and was opening a next file, in which the crash happened. This project had already seen a full build but yet the parser claimed it couldn't find most headerfiles (at least not after adding that full build directory to the cmake project settings).

Terminal output around the crash:


kdevelop.plugins.clang: No parse session / AST attached to context for url QUrl("file:///home/bertin/work/src/Scratch/KDE/KF5/marble-git/src/apps/marble-qt/qtmain.cpp")
kdevelop.plugins.clang: No parse session / AST attached to context for url QUrl("file:///home/bertin/work/src/Scratch/KDE/KF5/marble-git/src/apps/marble-qt/qtmain.cpp")
libclang: crash detected during parsing: {
  'source_filename' : '/home/bertin/work/src/Scratch/KDE/KF5/marble-git/src/lib/marble/MapViewWidget.cpp'
  'command_line_args' : ['clang', '-ferror-limit=100', '-fspell-checking', '', '-Wunused-parameter', '-Wunreachable-code', '-Wall', '-std=c++11', '-nostdinc', '-nostdinc++', '-xc++', '-isystem', '/opt/local/share/kdevclangsupport/wrappedQtHeaders', '-isystem', '/opt/local/share/kdevclangsupport/wrappedQtHeaders/QtCore', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/build/src/lib/marble/marblewidget_autogen/include', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/marble-git', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/marble-git/src/lib/marble', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/marble-git/src/lib/marble/projections', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/marble-git/src/lib/marble/geodata', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/marble-git/src/lib/marble/geodata/data', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/marble-git/src/lib/marble/geodata/graphicsitem', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/marble-git/src/lib/marble/geodata/handlers/dgml', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/marble-git/src/lib/marble/geodata/parser', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/marble-git/src/lib/marble/geodata/writer', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/marble-git/src/lib/marble/geodata/scene', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/marble-git/src/lib/marble/graphicsview', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/build/src', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/build/src/lib/marble', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/marble-git/src/lib/marble/routing', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/marble-git/src/lib/marble/geodata/handlers', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/marble-git/src/lib/marble/geodata/handlers/kml', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/marble-git/src/lib/marble/layers', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/marble-git/src/lib/marble/osm', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/marble-git/src/lib/marble/cloudsync', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/marble-git/src/lib/astro', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/build/src/lib/astro', '-isystem/opt/local/include/qt5', '-isystem/opt/local/include/qt5/QtXml', '-isystem/opt/local/include/qt5/QtCore', '-isystem/opt/local/share/qt5/mkspecs/linux-g++-64', '-isystem/opt/local/include/qt5/QtGui', '-isystem/opt/local/include/qt5/QtWidgets', '-isystem/opt/local/include/qt5/QtNetwork', '-isystem/opt/local/include/qt5/QtSvg', '-isystem/opt/local/include/qt5/QtPrintSupport', '-isystem/opt/local/include/qt5/QtConcurrent', '-isystem/opt/local/include/qt5/QtDBus', '-isystem/opt/local/include/phonon4qt5', '-isystem/opt/local/include', '-isystem/usr/include/c++/8', '-isystem/usr/include/x86_64-linux-gnu/c++/8', '-isystem/usr/include/c++/8/backward', '-isystem/usr/local/include', '-isystem/usr/include/x86_64-linux-gnu', '-isystem/include', '-isystem/usr/include', '-isystem', '/usr/lib/llvm-6.0/lib/clang/6.0.1/include', '-imacros', '/opt/local/var/tmp/kdevelop-tmp-505-{defa5afc-610c-45f6-9852-402477e7aee5}/kdevelop.K10855'],
  'unsaved_files' : [],
  'options' : 781,
}
KCrash: Application 'kdevelop' crashing...
KCrash: Attempting to start /opt/local/lib/x86_64-linux-gnu/libexec/drkonqi from kdeinit
sock_file=/run/user/505/kdeinit5__0
kdevelop.plugins.clang: clang_parseTranslationUnit2 return with error code 4
kdevelop.plugins.clang:   (start KDevelop with `KDEV_CLANG_DISPLAY_DIAGS=1 kdevelop` to see more diagnostics)
kdevelop.plugins.clang: Failed to parse translation unit: "/home/bertin/work/src/Scratch/KDE/KF5/marble-git/src/lib/marble/MarbleDirs.cpp"

-- Backtrace (Reduced):
#6  0x0000000000000211 in  ()
#7  0x00007f2f56817491 in  () at /usr/lib/x86_64-linux-gnu/libclang-6.0.so.1
#8  0x00007f2f56817902 in  () at /usr/lib/x86_64-linux-gnu/libclang-6.0.so.1
#9  0x00007f2f52facb09 in llvm::CrashRecoveryContext::~CrashRecoveryContext() () at /usr/lib/x86_64-linux-gnu/libLLVM-6.0.so.1
#10 0x00007f2f565d4541 in clang_parseTranslationUnit2FullArgv () at /usr/lib/x86_64-linux-gnu/libclang-6.0.so.1
Comment 14 RJVB 2018-12-07 09:24:39 UTC
Now this is extra interesting: after sending off my previous comment and quitting DrKonqi, the crashed KDevelop made a more or less clean exit, judging from terminal output. It might even have able to continue to work if the X11 connection hadn't been interrupted for too long by DrKonqi:

The X11 connection broke (error 1). Did the X11 server die?
MacroDefinitionData::parameters There were items left on destruction: 1
ClassDeclarationData::baseClasses There were items left on destruction: 1
FunctionDeclarationData::m_defaultParameters There were items left on destruction: 9
TopDUContextData::m_usedDeclarationIds There were items left on destruction: 11
DUContextData::m_uses There were items left on destruction: 64
DUContextData::m_importers There were items left on destruction: 18
TopDUContextData::m_problems There were items left on destruction: 9
DUContextData::m_localDeclarations There were items left on destruction: 55
DUContextData::m_childContexts There were items left on destruction: 44
DUContextData::m_importedContexts There were items left on destruction: 43
ProblemData::diagnostics There were items left on destruction: 225
register count: 0, destroy count 0: average LZ4 compression ratio: 1.96008; 114 compressed of 114

[2]    Exit 1                        kdevelop5 --ps
Comment 15 RJVB 2018-12-07 09:49:45 UTC
Or maybe not ... I'm hardly able to work on this project at all today with KDevelop crashing every other file:

libclang: crash detected during parsing: {
  'source_filename' : '/home/bertin/work/src/Scratch/KDE/KF5/marble-git/src/lib/marble/MapViewWidget.cpp'
  'command_line_args' : ['clang', '-ferror-limit=100', '-fspell-checking', '', '-Wunused-parameter', '-Wunreachable-code', '-Wall', '-std=c++11', '-nostdinc', '-nostdinc++', '-xc++', '-isystem', '/opt/local/share/kdevclangsupport/wrappedQtHeaders', '-isystem', '/opt/local/share/kdevclangsupport/wrappedQtHeaders/QtCore', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/build/src/lib/marble/marblewidget_autogen/include', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/marble-git', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/marble-git/src/lib/marble', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/marble-git/src/lib/marble/projections', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/marble-git/src/lib/marble/geodata', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/marble-git/src/lib/marble/geodata/data', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/marble-git/src/lib/marble/geodata/graphicsitem', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/marble-git/src/lib/marble/geodata/handlers/dgml', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/marble-git/src/lib/marble/geodata/parser', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/marble-git/src/lib/marble/geodata/writer', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/marble-git/src/lib/marble/geodata/scene', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/marble-git/src/lib/marble/graphicsview', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/build/src', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/build/src/lib/marble', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/marble-git/src/lib/marble/routing', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/marble-git/src/lib/marble/geodata/handlers', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/marble-git/src/lib/marble/geodata/handlers/kml', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/marble-git/src/lib/marble/layers', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/marble-git/src/lib/marble/osm', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/marble-git/src/lib/marble/cloudsync', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/marble-git/src/lib/astro', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-marble-devel/kf5-marble-devel/work/build/src/lib/astro', '-isystem/opt/local/include/qt5', '-isystem/opt/local/include/qt5/QtXml', '-isystem/opt/local/include/qt5/QtCore', '-isystem/opt/local/share/qt5/mkspecs/linux-g++-64', '-isystem/opt/local/include/qt5/QtGui', '-isystem/opt/local/include/qt5/QtWidgets', '-isystem/opt/local/include/qt5/QtNetwork', '-isystem/opt/local/include/qt5/QtSvg', '-isystem/opt/local/include/qt5/QtPrintSupport', '-isystem/opt/local/include/qt5/QtConcurrent', '-isystem/opt/local/include/qt5/QtDBus', '-isystem/opt/local/include/phonon4qt5', '-isystem/opt/local/include', '-isystem/usr/include/c++/8', '-isystem/usr/include/x86_64-linux-gnu/c++/8', '-isystem/usr/include/c++/8/backward', '-isystem/usr/local/include', '-isystem/usr/include/x86_64-linux-gnu', '-isystem/include', '-isystem/usr/include', '-isystem', '/usr/lib/llvm-6.0/lib/clang/6.0.1/include', '-imacros', '/opt/local/var/tmp/kdevelop-tmp-505-{defa5afc-610c-45f6-9852-402477e7aee5}/kdevelop.kE5862'],
  'unsaved_files' : [],
  'options' : 781,
}
KCrash: Application 'kdevelop' crashing...
KCrash: Attempting to start /opt/local/lib/x86_64-linux-gnu/libexec/drkonqi from kdeinit
sock_file=/run/user/505/kdeinit5__0
QSocketNotifier: Invalid socket 7 and type 'Read', disabling...
QSocketNotifier: Invalid socket 56 and type 'Read', disabling...
QSocketNotifier: Invalid socket 126 and type 'Read', disabling...
QSocketNotifier: Invalid socket 24 and type 'Read', disabling...
QSocketNotifier: Invalid socket 34 and type 'Read', disabling...
QSocketNotifier: Invalid socket 36 and type 'Read', disabling...
QSocketNotifier: Invalid socket 38 and type 'Read', disabling...
The X11 connection broke (error 1). Did the X11 server die?
ProblemData::diagnostics There were items left on destruction: 1190
ClassFunctionDeclarationData::m_defaultParameters There were items left on destruction: 13203
FunctionDeclarationData::m_defaultParameters There were items left on destruction: 5612
ClassDeclarationData::baseClasses There were items left on destruction: 2286
DUContextData::m_uses There were items left on destruction: 54889
TopDUContextData::m_usedDeclarationIds There were items left on destruction: 783
MacroDefinitionData::parameters There were items left on destruction: 8221
DUContextData::m_importers There were items left on destruction: 1190
DUContextData::m_importedContexts There were items left on destruction: 5040
DUContextData::m_localDeclarations There were items left on destruction: 30591
DUContextData::m_childContexts There were items left on destruction: 18034
TopDUContextData::m_problems There were items left on destruction: 910
Unable to start Dr. Konqi
Re-raising signal for core dump handling.

[2]    Segmentation fault            kdevelop5 --ps
Comment 16 RJVB 2018-12-21 20:56:28 UTC
Created attachment 117049 [details]
New crash information added by DrKonqi

kdevelop (5.3.1-4-gdc6a95e962) using Qt 5.9.7

- What I was doing when the application crashed:

Here's another crash, this time it happened just after I saved a file after having undone all edits I made to that file.

-- Backtrace (Reduced):
#9  0x00007ff5e89c5524 in llvm::CrashRecoveryContext::~CrashRecoveryContext() () from /usr/lib/llvm-5.0/lib/../lib/libLLVM-5.0.so.1
#10 0x00007ff5eb8f2169 in clang_parseTranslationUnit2FullArgv () from /usr/lib/llvm-5.0/lib/libclang-5.0.so.1
#11 0x00007ff5eb8f2348 in clang_parseTranslationUnit2 () from /usr/lib/llvm-5.0/lib/libclang-5.0.so.1
#12 0x00007ff5ecef834e in ParseSessionData::ParseSessionData (this=0x7ff5a80146f0, unsavedFiles=..., index=<optimized out>, environment=..., options=...) at /opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-kdevelop/kf5-kdevelop-clang-parser-devel/work/kf5-kdevelop-clangparser-5/plugins/clang/duchain/parsesession.cpp:312
#13 0x00007ff5ed135245 in ClangParseJob::createSessionData (this=<optimized out>) at /opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-kdevelop/kf5-kdevelop-clang-parser-devel/work/kf5-kdevelop-clangparser-5/plugins/clang/clangparsejob.cpp:381
Comment 17 RJVB 2019-04-28 10:59:12 UTC
Created attachment 119689 [details]
New crash information added by DrKonqi

kdevelop (5.3.2-7-g566b98a996) using Qt 5.9.8

- What I was doing when the application crashed:
I had just reverted a number of edit made to a file via ^Z then hit ^S to save.

Associated output on the terminal:
kdevelop.plugins.clang: No parse session / AST attached to context for url QUrl("file:///home/bertin/work/src/Scratch/KDE/KF5/kdevelop-git-5/kdevplatform/language/duchain/duchain.cpp")
kdevelop.plugins.clang: No parse session / AST attached to context for url QUrl("file:///home/bertin/work/src/Scratch/KDE/KF5/kdevelop-git-5/kdevplatform/language/duchain/duchain.cpp")
kdevelop.plugins.clang: No parse session / AST attached to context for url QUrl("file:///home/bertin/work/src/Scratch/KDE/KF5/kdevelop-git-5/kdevplatform/language/duchain/duchain.cpp")
kdevelop.plugins.clang: No parse session / AST attached to context for url QUrl("file:///home/bertin/work/src/Scratch/KDE/KF5/kdevelop-git-5/kdevplatform/language/duchain/duchain.cpp")
kdevelop.plugins.clang: No parse session / AST attached to context for url QUrl("file:///home/bertin/work/src/Scratch/KDE/KF5/kdevelop-git-5/kdevplatform/language/duchain/duchain.cpp")
kdevelop.plugins.clang: No parse session / AST attached to context for url QUrl("file:///home/bertin/work/src/Scratch/KDE/KF5/kdevelop-git-5/kdevplatform/language/duchain/duchain.cpp")
kdevelop.plugins.clang: No parse session / AST attached to context for url QUrl("file:///home/bertin/work/src/Scratch/KDE/KF5/kdevelop-git-5/kdevplatform/language/duchain/duchain.cpp")
kdevelop.plugins.clang: No parse session / AST attached to context for url QUrl("file:///home/bertin/work/src/Scratch/KDE/KF5/kdevelop-git-5/kdevplatform/language/duchain/duchain.cpp")
kdevelop.plugins.clang: No parse session / AST attached to context for url QUrl("file:///home/bertin/work/src/Scratch/KDE/KF5/kdevelop-git-5/kdevplatform/language/duchain/duchain.cpp")
libclang: crash detected during parsing: {
  'source_filename' : '/home/bertin/work/src/Scratch/KDE/KF5/kdevelop-git-5/kdevplatform/language/duchain/duchain.cpp'
  'command_line_args' : ['clang', '-ferror-limit=100', '-fspell-checking', '', '-Wunused-parameter', '-Wunreachable-code', '-Wall', '-std=c++11', '-nostdinc', '-nostdinc++', '-xc++', '-isystem', '/opt/local/share/kdevclangsupport/wrappedQtHeaders', '-isystem', '/opt/local/share/kdevclangsupport/wrappedQtHeaders/QtCore', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-kdevelop/kf5-kdevelop-devel/work/build/kdevplatform/language', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-kdevelop/kf5-kdevelop-devel/work/kf5-kdevelop-5/kdevplatform/language', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-kdevelop/kf5-kdevelop-devel/work/build/kdevplatform/language/KDevPlatformLanguage_autogen/include', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-kdevelop/kf5-kdevelop-devel/work/kf5-kdevelop-5', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-kdevelop/kf5-kdevelop-devel/work/build', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-kdevelop/kf5-kdevelop-devel/work/kf5-kdevelop-5/kdevplatform', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-kdevelop/kf5-kdevelop-devel/work/build/kdevplatform', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-kdevelop/kf5-kdevelop-devel/work/build/kdevplatform/serialization', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-kdevelop/kf5-kdevelop-devel/work/kf5-kdevelop-5/kdevplatform/serialization', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-kdevelop/kf5-kdevelop-devel/work/build/kdevplatform/interfaces', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-kdevelop/kf5-kdevelop-devel/work/kf5-kdevelop-5/kdevplatform/interfaces', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-kdevelop/kf5-kdevelop-devel/work/build/kdevplatform/util', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-kdevelop/kf5-kdevelop-devel/work/kf5-kdevelop-5/kdevplatform/util', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-kdevelop/kf5-kdevelop-devel/work/build/kdevplatform/project', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-kdevelop/kf5-kdevelop-devel/work/kf5-kdevelop-5/kdevplatform/project', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-kdevelop/kf5-kdevelop-devel/work/build/kdevplatform/vcs', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-kdevelop/kf5-kdevelop-devel/work/kf5-kdevelop-5/kdevplatform/vcs', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-kdevelop/kf5-kdevelop-devel/work/build/kdevplatform/outputview', '-isystem/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-kdevelop/kf5-kdevelop-devel/work/kf5-kdevelop-5/kdevplatform/outputview', '-isystem/opt/local/include/KF5/KWidgetsAddons', '-isystem/opt/local/include/KF5', '-isystem/opt/local/include/qt5', '-isystem/opt/local/include/qt5/QtWidgets', '-isystem/opt/local/include/qt5/QtGui', '-isystem/opt/local/include/qt5/QtCore', '-isystem/opt/local/share/qt5/mkspecs/linux-clang', '-isystem/opt/local/include/KF5/KI18n', '-isystem/opt/local/include/KF5/KTextEditor', '-isystem/opt/local/include/KF5/KParts', '-isystem/opt/local/include/KF5/KIOWidgets', '-isystem/opt/local/include/KF5/KIOCore', '-isystem/opt/local/include/KF5/KCoreAddons', '-isystem/opt/local/include/KF5/KService', '-isystem/opt/local/include/KF5/KConfigCore', '-isystem/opt/local/include/qt5/QtNetwork', '-isystem/opt/local/include/qt5/QtConcurrent', '-isystem/opt/local/include/qt5/QtDBus', '-isystem/opt/local/include/KF5/KJobWidgets', '-isystem/opt/local/include/KF5/KCompletion', '-isystem/opt/local/include/KF5/KXmlGui', '-isystem/opt/local/include/qt5/QtXml', '-isystem/opt/local/include/KF5/KConfigWidgets', '-isystem/opt/local/include/KF5/KCodecs', '-isystem/opt/local/include/KF5/KConfigGui', '-isystem/opt/local/include/KF5/KAuth', '-isystem/opt/local/include/KF5/KTextWidgets', '-isystem/opt/local/include/KF5/SonnetUi', '-isystem/opt/local/include/KF5/ThreadWeaver', '-isystem/opt/local/include/KF5/KGuiAddons', '-isystem/opt/local/include/KF5/KArchive', '-isystem/opt/local/include/KF5/KIconThemes', '-isystem/opt/local/include', '-isystem/usr/include/c++/8', '-isystem/usr/include/x86_64-linux-gnu/c++/8', '-isystem/usr/include/c++/8/backward', '-isystem/usr/local/include', '-isystem/usr/include/x86_64-linux-gnu', '-isystem/include', '-isystem/usr/include', '-isystem', '/usr/lib/llvm-5.0/lib/clang/5.0.2/include', '-imacros', '/opt/local/var/tmp/kdevelop-tmp-505-{f793a513-f14e-47b9-8448-06ca72900c04}/kdevelop.B19145'],
  'unsaved_files' : [],
  'options' : 781,
}
KCrash: Application 'kdevelop' crashing...
KCrash: Attempting to start /opt/local/lib/x86_64-linux-gnu/libexec/drkonqi from kdeinit

-- Backtrace (Reduced):
#9  0x00007f805ebf0524 in llvm::CrashRecoveryContext::~CrashRecoveryContext() () from /usr/lib/x86_64-linux-gnu/libLLVM-5.0.so.1
#10 0x00007f8061b1d169 in clang_parseTranslationUnit2FullArgv () from /usr/lib/x86_64-linux-gnu/libclang-5.0.so.1
#11 0x00007f8061b1d348 in clang_parseTranslationUnit2 () from /usr/lib/x86_64-linux-gnu/libclang-5.0.so.1
#12 0x00007f806311f537 in ParseSessionData::ParseSessionData (this=<optimized out>, unsavedFiles=..., index=<optimized out>, environment=..., options=...) at /opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-kdevelop/kf5-kdevelop-clang-parser-devel/work/kf5-kdevelop-clangparser-5/plugins/clang/duchain/parsesession.cpp:314
#13 0x00007f806335b2cb in ClangParseJob::createSessionData (this=<optimized out>) at /opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-kdevelop/kf5-kdevelop-clang-parser-devel/work/kf5-kdevelop-clangparser-5/plugins/clang/clangparsejob.cpp:381
Comment 18 RJVB 2019-05-21 09:09:04 UTC
Created attachment 120212 [details]
New crash information added by DrKonqi

kdevelop (5.3.2-7-g566b98a996) using Qt 5.9.8

- What I was doing when the application crashed:

I just hit ^S to save a modified file, residing on an NFS share in this case.

-- Backtrace (Reduced):
#6  0x00000000000001c1 in  ()
#7  0x00007f906ecdc47d in  () at /usr/lib/x86_64-linux-gnu/libclang-5.0.so.1
#8  0x00007f906ecdc992 in  () at /usr/lib/x86_64-linux-gnu/libclang-5.0.so.1
#9  0x00007f906bb8a524 in llvm::CrashRecoveryContext::~CrashRecoveryContext() () at /usr/lib/x86_64-linux-gnu/libLLVM-5.0.so.1
#10 0x00007f906eab7169 in clang_parseTranslationUnit2FullArgv () at /usr/lib/x86_64-linux-gnu/libclang-5.0.so.1