Bug 383863 - Absence of DrKonqi icon in a tray after same crash reappeared
Summary: Absence of DrKonqi icon in a tray after same crash reappeared
Status: RESOLVED FIXED
Alias: None
Product: drkonqi
Classification: Applications
Component: general (show other bugs)
Version: 5.10.4
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-22 17:20 UTC by Alexander Mentyu
Modified: 2019-11-08 09:56 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
recording of it working (1.03 MB, image/gif)
2019-11-07 15:27 UTC, Harald Sitter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Mentyu 2017-08-22 17:20:16 UTC
If there was a crash - and after click on DrKonqi crash tray icon - crash reporting window was closed - after same crash - DrKonqi tray icon no longer appears in tray. It appears there only after system reboot.
Comment 1 Patrick Silva 2017-08-22 22:41:13 UTC
I can confirm on neon dev unstable.
Comment 2 Kai Uwe Broulik 2017-08-28 09:43:32 UTC
What application does this affect? I crashed Dolphin and it showed a tray icon every time.
Comment 3 Alexander Mentyu 2017-08-28 09:58:06 UTC
I'm not remembering currently - i'll investigate and update.
Comment 4 Alexander Mentyu 2017-08-29 09:54:15 UTC
DrKonqi crash tray icon isn't showing in this bug - https://bugs.kde.org/show_bug.cgi?id=384055
Comment 5 Alexander Mentyu 2017-08-30 16:42:32 UTC
DrKonqi isn't showing icon for this crash - https://bugs.kde.org/show_bug.cgi?id=383849
Comment 6 Harald Sitter 2019-07-23 13:45:06 UTC
Git commit 3eeb0ce5bc1ee61dc9c9ff4376cad5302db4e2de by Harald Sitter.
Committed on 23/07/2019 at 13:42.
Pushed by sitter into branch 'Plasma/5.16'.

guard against plasmashell being properly dead and not showing the SNI

Summary:
when plasmashell is particularly dead and not even able to restart, the SNI
host may still be around when we check for it in the main.cpp as its
disappearance from dbus is tied to sockets closing and dbus' event loop
reacting to that. so there is a race potential that can cause the SNI
to not actually be visible on account of the SNI host (plasmashell)
being dead even though we expected SNI support to be available.

guard against this scenario by starting an automatic activation timer
when the notification service disappears. should it not reappear within
10 second we consider it dead and show the dialog automatically as the
user won't be seeing the SNI anymore

Possibly fixing

Test Plan:
- crash something so the sni appears
- kill plasma
- wait 10s
- dialog appears

- same again
- restart plasma before 10s have passed
- sni appears again in plasmashell

Reviewers: #plasma

Subscribers: davidedmundson, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D22553

M  +18   -0    src/statusnotifier.cpp

https://commits.kde.org/drkonqi/3eeb0ce5bc1ee61dc9c9ff4376cad5302db4e2de
Comment 7 Harald Sitter 2019-11-05 13:35:51 UTC
Is this still reproducible with 5.16.x+ as per that possible fix commit?
Comment 8 Patrick Silva 2019-11-06 20:42:17 UTC
I can't reproduce this behavior after systemsettings crash or gwenview crash for example. But drkonqi icon does not reappear in systray after plasma crash until relogin.

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.17.80
KDE Frameworks Version: 5.64.0
Qt Version: 5.13.1
Comment 9 Harald Sitter 2019-11-06 20:57:33 UTC
Do you just send SEGV to plasmashell or how do you crash it?
Comment 10 Patrick Silva 2019-11-06 21:04:02 UTC
I made plasma to crash following the steps from bug 409466
Comment 11 Harald Sitter 2019-11-07 15:27:26 UTC
Created attachment 123774 [details]
recording of it working

drkonqi appears as expected there
Comment 12 Patrick Silva 2019-11-07 15:36:25 UTC
does drkonqi appear after you reproduce the same crash twice?
Comment 13 Harald Sitter 2019-11-07 15:53:32 UTC
It's not meant to.

https://cgit.kde.org/kcrash.git/tree/src/kcrash.cpp#n163

When an application crashes an auto-restarted instance will get KCRASH_AUTO_RESTARTED set which in turn will result in drkonqi getting disabled. This is to prevent super crashy applications (such as a broken thumbnailer in dolphin for example) to spam the system with a gazillion drkonqis.
Comment 14 Patrick Silva 2019-11-07 16:03:10 UTC
drkonqi does not appear if another KDE software crashes after I reproduce the plasma crash twice. Drkonqi only works again after relogin. Is this behavior expected?
Comment 15 Harald Sitter 2019-11-08 09:56:04 UTC
Yes. When A crashed too much then A has the pertinent environment variable and when A starts another process B, that environment is transferred and so B too has the environment variable. IOW any process started by another will inherit the disabled drkonqi.
It's obviously a bit silly but that's a bug in (I think) KRun, which likely should clear the kcrash variables before starting a new process. Either that or kickoff doesn't use KRun in which case that bug would be in plasma-workspace somewhere.