Bug 409961 - Dr.Konqui doesn't report plasmashell crash when using Wayland
Summary: Dr.Konqui doesn't report plasmashell crash when using Wayland
Status: REPORTED
Alias: None
Product: frameworks-kcrash
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.60.0
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-18 17:38 UTC by Marc-Antoine M.
Modified: 2023-02-14 14:57 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
drkonqi after plasma crash on Wayland (50.16 KB, image/png)
2019-07-21 15:48 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marc-Antoine M. 2019-07-18 17:38:04 UTC
SUMMARY
When the plasmashell crash (which happen often), DrKonqui doesn't report the crash. It would really help to plasma wayland, because if the crash are reported with DrKonqui, that would provide a backtrack to help developer.

STEPS TO REPRODUCE
1. Make plasmashell crash under wayland
2. Reboot plasmashell using kstart5 plasmashell

OBSERVED RESULT
When plasmashell is reboot no crash is reported.

EXPECTED RESULT
Dr.Konqui appear and report that plasmashell crashed.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.16.3
KDE Frameworks Version: 5.60
Qt Version: 5.12.3

ADDITIONAL INFORMATION
Comment 1 Patrick Silva 2019-07-21 15:48:51 UTC
Created attachment 121664 [details]
drkonqi after plasma crash on Wayland

Here sometimes drkonqi icon appears in the systray when Plasma crashes on Wayland, but it never generates the backtrace. As we can see in the attached screenshot, Drkonqi says "The debugger has quit unexpectedly".

Operating System: Arch Linux 
KDE Plasma Version: 5.16.3
KDE Frameworks Version: 5.60.0
Qt Version: 5.13.0
Comment 2 Harald Sitter 2019-07-22 20:37:43 UTC
Did you maybe update your system before the crash?

I could imagine the backtracing not working if plasmashell was updated (i.e. the file was replaced) making it no longer traceable.
Comment 3 Patrick Silva 2019-07-22 21:03:37 UTC
I just rebooted my machine, tested again and got the same result.
Drkonqi does not generate backtraces of plasma crashes on Neon unstable edition too.
Reported as bug 386049 some time ago.
Comment 4 Harald Sitter 2019-07-22 21:31:51 UTC
Strangely I can't reproduce this on neon unstable at all.

Does the tracing work when you manually crash plasmashell with `killall -SEGV plasmashell`?
Comment 5 Patrick Silva 2019-07-22 21:40:50 UTC
(In reply to Harald Sitter from comment #4)
> Strangely I can't reproduce this on neon unstable at all.
> 
> Does the tracing work when you manually crash plasmashell with `killall
> -SEGV plasmashell`?

Tested on Arch and Neon unstable and got the same result on both systems:
drkonqi icon not even appears in systray.
Comment 6 Marc-Antoine M. 2019-07-22 21:59:34 UTC
Yes, the tracing work on neon stable with `killall -SEGV plasmashell`, but it's only when plasmashell crash with a bug like 409971 and you need to do 'kstart5 plasmashell'.
Comment 7 Harald Sitter 2019-07-23 13:08:40 UTC
Right, so I *think* I've found it happening, but it's not really drkonqi's fault. What likely happens is that GIO is being used by something (in my case discover) and GIO will trip over a filedescriptor that was closed by KCrash before drkonqi starts. GIO has a forced fatality attached to this so essentially plasmashell crashes while we are trying to trace the crash. I've not really found an easy way to prevent this. 

Possibly coordinate closing with drkonqi may prevent this sort of problem. I.e. since we now have a socket from kcrash to drkonqi we could have drkonqi tell kcrash when it SIGSTOP'ed the process, at this point kcrash can safely close the file descriptors without risking that a still running thread will fall over the closed FD.
Alas, I don't really know enough about this, or even if there is a reason that the FDs are closed before starting drkonqi.
Comment 8 Patrick Silva 2019-07-23 13:53:03 UTC
I just noticed that this issue also affects X11 session.
Drkonqi shows the same "The debugger has quit unexpectedly"
message seen in my screenshot.
Comment 9 Nicolas Fella 2023-02-14 14:57:32 UTC
If plasmashell (or something else) crashes because of a Wayland protcol error (which is somewhat common, see https://bugs.kde.org/show_bug.cgi?id=447717) then there will be no coredump/DrKonqi does't trigger