Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kde/drkonqi
Crash handler for KDE software
https://github.com/kde/drkonqi
Last synced: 4 days ago
JSON representation
Crash handler for KDE software
- Host: GitHub
- URL: https://github.com/kde/drkonqi
- Owner: KDE
- Created: 2017-09-12T08:11:49.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-11-06T15:32:36.000Z (8 days ago)
- Last Synced: 2024-11-06T16:36:40.877Z (8 days ago)
- Language: C++
- Homepage: https://invent.kde.org/plasma/drkonqi
- Size: 52.8 MB
- Stars: 24
- Watchers: 5
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSES/BSD-2-Clause.txt
Awesome Lists containing this project
README
# DrKonqi
## Integrating with coredumpd
We need to make sure that the `[email protected]` is enabled so that coredumpd knows to tell us when a crash happens. You can inspect it with:* Check it's enabled: `systemctl is-enabled [email protected]`
* You can enable it with `systemctl enable [email protected]`
* The user socket also needs to be present `systemctl --user is-enabled drkonqi-coredump-launcher.socket`
* And can be enabled with `systemctl --user enable --now drkonqi-coredump-launcher.socket `To make sure the coredumpd setup is working correctly:
* `cat /proc/sys/kernel/core_pattern` should show systemd-coredump as handler
* `KCRASH_DUMP_ONLY=1 kwrite`
* `killall -SEGV kwrite`
* journalctl should show the following:
* [email protected] run an instance (e.g. [email protected])
* [email protected] should run an instance with same suffix as systemd-coredump@
* [email protected] should run an instance with yet the same suffix
* A notification to start drkonqi should appearTo use the notifytruck (catch crashes in all software) add `KDE_COREDUMP_NOTIFY=1` to your /etc/environment. This
enables the NotifyTruck for [email protected] and offers access to gdb for all crashes. This is a
feature targeted at developers:* `gedit`
* `killall -SEGV gedit`
* journalctl should look like above
* A notification to start konsole+gdb should appear (if no notification appears something has gone horribly wrong)### Workflow, Service, and Enablement overview
* KCrash writes metadata files with context information when an application crashes
* [email protected]; from upstream; must be enabled; catches the actual core
* [email protected]; WantedBy [email protected];
must be enabled (`[email protected]/[email protected]` symlink must exist in one of
the `systemd-analyze unit-paths`!); passes along the crash into the relevant user session
* drkonqi-coredump-launcher.socket; user socket; must be enabled per user or in one of the global
`systemd-analyze unit-paths`; the processor talks to this socket
* [email protected]; user service; doesn't need to be enabled; invoked by the socket as needed and
processes the metadata, created by KCrash in the very beginning, to figure out if and how to invoke drkonqi
* drkonqi-coredump-cleanup.{service,timer}; cleanup tech for long running sessions to avoid cluttering $HOME with
dangling metadata files
* launcher's main.cpp runs through a set of DumpTruck instances, the first that wants to handle the crash may. By default
that would be the DrkonqiTruck for crashes in KDE software### IncludeAll Mode
Add into `~/.config/drkonqirc`:
```
[General]
IncludeAll=true
```This operation mode primarily targets Plasma Mobile. It effectively catches and reports **all** coredumpd tracked
crashes. This is notably including non-KDE software for which drkonqi will only offer tracing facilities but no active
bug reporting. The use is that for systems where we are completely in control we'll want to give our users the ability
to differentiate a crash in middleware from one in the application space (or defects caused by the former in the latter).Please note that this mode requires correctly set up coredumpd support as outlined above.
## Application Not Responding (ANR)
DrKonqi supports detection of ANR scenarios with some help from the outside. Specifically a metadata file must be created
in `~/.cache/drkonqi/application-not-responding/` followed by an ABRT signal to the unresponsive application.The metadata file must be named `$exe.$bootId.$pid.$timestamp.json`. It is currently empty but may gain optional content
in the future.In a regular Plasma session this metadata file is created by KWin when an application is being killed for unresponsiveness.
This feature is only supported with the coredumpd backend.
Other backends record the ABRT as crash but will not be able to identify it as ANR.