Skip to content

default to coredumping instead of just in time debugging

Harald Sitter requested to merge work/sitter/dump-by-default into master

JIT debugging has a number of challenges, chief among them is that we have to close all FDs to facilitate auto restarts, but doing so opens other threads up to stumble over those then-closed FDs and crash while crash handling. Instead of JIT we do a re-raise after having written the necessary metadata and having closed the FDs. This still has a bit of racing potential but it's in the scale of microseconds rather than actual seconds (drkonqi has a builtin delay on top of the fork-exec overhead)

This has already been used in KDE neon unstable for years without negative reports so should be save to use as default.

Re-raising is only applicable on Linux where we'll forward the crash into potential handler processes (e.g. coredumpd, abrt, apport ...) in the coredumpd case we also take care of presenting a UI via drkonqi.

For systems without handler support we continue to attempt JIT by default. Though honestly that needs revisiting too because arguable the only case where JIT is actually required is on freebsd for lack of a better handling alternative that I know of. All other platforms offer some form of crash handling already so our JIT stuff is mostly just getting in the way.

Merge request reports