| Summary: | SIGTRAP/SIGSEGV while running any version of KDevelop under GDB after a recent system update | ||
|---|---|---|---|
| Product: | [Applications] kdevelop | Reporter: | Igor Kushnir <igorkuo> |
| Component: | general | Assignee: | kdevelop-bugs-null |
| Status: | RESOLVED UPSTREAM | ||
| Severity: | crash | CC: | mail, soos.mate |
| Priority: | NOR | ||
| Version First Reported In: | git master | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Igor Kushnir
2020-10-02 13:19:19 UTC
FAILED WORKAROUND
Add the following two lines to /etc/security/limits.conf and reboot:
* hard nofile 100000 # necessary for KDevelop
* soft nofile 100000 # necessary for KDevelop
This workaround does not change anything.
INADEQUATE WORKAROUND
Narrowed down the plugins that must be disabled in ~/.local/share/kdevelop/sessions/{<session-id>}/sessionrc to enable launching, hitting breakpoints in the KDevelop source code and exiting KDevelop without crashes: KDevCMakeDocumentation, kdevfilemanager, kdevqthelp (I have kdevperforce and katectagsplugin disabled too, but not sure if that's necessary). In addition, I had to force-disable kdevclangsupport plugin via `export KDEV_DISABLE_PLUGINS=kdevclangsupport`. Even without these essential plugins, opening a project triggers the signals and crashes.
FIX
This is a known Qt 5.15.1 bug: QTBUG-86319 (I found a duplicate of this bug by searching for "SIGTRAP" on the Qt bug tracker). The corresponding Arch Linux bug: https://bugs.archlinux.org/task/68001. I applied the fix for the Qt bug from https://codereview.qt-project.org/c/qt/qtbase/+/314049 and the signals and crashes are gone!
The fix will be included in Qt 5.15.2. In the meantime, it would be useful if the qt5-base Arch Linux package included the patch to spare developers from manually applying the fix after each qt5-base pkgrel update. @{Arch Linux users affected by this bug}, please create an issue on the Arch bug tracker or reopen FS#68001 (closed because this turned out to be not a GDB issue) and request the qt5-base patch.
I have filed an Arch ticket: https://bugs.archlinux.org/task/68080 I don't think there's anything else we can do for now, so closing this. Will comment if the Arch maintainers respond. As I mentioned on the other bug, one workaround is to start KDevelop and then use `gdb --pid=<whatever>`. (In reply to Francis Herne from comment #2) > As I mentioned on the other bug, one workaround is to start KDevelop and > then use `gdb --pid=<whatever>`. I haven't tried this workaround from the command line, but attaching to a KDevelop process from another KDevelop instance/session didn't work well for me: once a code breakpoint was hit, the debugged instance received SIGTRAP/SIGSEGV signals and eventually crashed. With the patched Qt attaching from KDevelop works fine. Arch just backported the relevant fix in qt5-base 5.15.1-3. I've installed this and gdb works again. Thanks Igor for finding the relevant upstream bug. |