Bug 371127 - plasmashell and powerdevil crash on logout/reboot/shutdown
Summary: plasmashell and powerdevil crash on logout/reboot/shutdown
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (show other bugs)
Version: 5.8.0
Platform: Neon Linux
: NOR normal
Target Milestone: 1.0
Assignee: David Edmundson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-18 15:28 UTC by S. Christian Collins
Modified: 2016-10-25 16:23 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.8.3


Attachments
pertinent section of .xsession-errors log (17.37 KB, text/plain)
2016-10-18 15:33 UTC, S. Christian Collins
Details
crash backtrace (18.17 KB, text/plain)
2016-10-21 04:51 UTC, S. Christian Collins
Details
video of the crash (3.47 MB, video/webm)
2016-10-21 04:52 UTC, S. Christian Collins
Details

Note You need to log in before you can comment on or make changes to this bug.
Description S. Christian Collins 2016-10-18 15:28:28 UTC
90% of the time, when I logout/reboot/shutdown, plasmashell crashes and I get two drkonqi icons showing in the system tray, one for plasmashell and the other for powerdevil. I am unable to activate the drkonqi bug reporting tool due to the session logging out shortly after the icons appear.

When I log off, I see my desktop panel and icons disappear (which is normal in the logout process), but then the panel and desktop icons reappear along with the aforementioned drkonqi icons in the system tray. Then a couple seconds later, the session ends.

This happens on my desktop but not my laptop, both running Plasma 5.8.1 on KDE Neon.

Reproducible: Sometimes

Steps to Reproduce:
1. Logout of desktop session.

Actual Results:  
As described above.


** My System **
OS: KDE Neon 5.8.1 64-bit (Plasma Desktop 5.8.1, KDE Frameworks 5.27.0, Qt 5.7.0)
Motherboard: ASRock X58 Extreme3 (Intel X58 chipset)
CPU: Intel Core i7 930 (2.8 GHz quad-core)
RAM: 12GB DDR3
Video: NVIDIA GeForce GTX 970 w/ 4GB RAM (PCI Express)
Sound Card #1: Sound Blaster Audigy 2 ZS Gold
Sound Card #2: Echo Gina3G
Linux Kernel: 4.4.0.43-generic
NVIDIA video driver: 361.42
Screen #1 Resolution: 1920 x 1280 @ 144 Hz (screen 1, marked as primary)
Screen #2 Resolution: 1280 x 1024 @ 75 Hz (screen 0)
Comment 1 S. Christian Collins 2016-10-18 15:33:39 UTC
Created attachment 101624 [details]
pertinent section of .xsession-errors log
Comment 2 David Edmundson 2016-10-21 00:38:59 UTC
We need a backtrace to do anything, sorry.

You can fake a logout by running "kquitapp plasmashell". from a console.
Does that crash?

Please reset the bug report status to unconfirmed when you reply.
Comment 3 S. Christian Collins 2016-10-21 04:51:11 UTC
Created attachment 101677 [details]
crash backtrace

I was able to get a crash by simulating the logout (kquitapp plasmashell), and I have attached the backtrace here.
Comment 4 S. Christian Collins 2016-10-21 04:52:57 UTC
Created attachment 101678 [details]
video of the crash

Here is a video showing the crash behavior on logout, in case it is useful for narrowing things down.
Comment 5 S. Christian Collins 2016-10-21 04:53:41 UTC
Setting bug status to 'unconfirmed'.
Comment 6 David Edmundson 2016-10-21 10:44:56 UTC
Perfect Thanks. 
This has been reported already and will be fixed soon.

Did you say you also had another crash in powerdevil?
If so can you redo the kquitapp5 trick to make that crash too.

*** This bug has been marked as a duplicate of bug 371215 ***
Comment 7 S. Christian Collins 2016-10-23 16:53:01 UTC
The powerdevil crash doesn't happen using "kquitapp plasmashell", only on an actual logout. Is there anywhere this crash information gets stored, or is it just lost when the system shuts down before drkonqi can be activated?
Comment 8 David Edmundson 2016-10-23 17:06:03 UTC
Right, but you can kquitapp5 powerdevil.
Comment 9 Kai Uwe Broulik 2016-10-23 17:36:38 UTC
Actually, you can't because it doesn't explicitly register a org.kde.PowerDevil DBus interface. Was probably forgotten during the split, it's "local.org_kde_powerdevil" right now. You can still ask it to quit manually on DBus.
Comment 10 Kai Uwe Broulik 2016-10-23 17:37:05 UTC
And then powerdevil indeed crashes :)
Comment 11 Kai Uwe Broulik 2016-10-23 17:38:44 UTC
PowerDevil backtrace:
Seems it tries to unload all actions and then unset some DPMS stuff but at this point the X connection is already gone. Probably also fallout from the separate binary split.

Thread 1 (Thread 0x7f6b6263b940 (LWP 25443)):
[KCrash Handler]
#6  xcb_send_request64 (c=0x0, flags=flags@entry=0, vector=vector@entry=0x7ffc471abb10, req=req@entry=0x7f6b471d8c80 <xcb_req>) at ../../src/xcb_out.c:187
#7  0x00007f6b5eadb969 in xcb_send_request (c=<optimized out>, flags=flags@entry=0, vector=vector@entry=0x7ffc471abb10, req=req@entry=0x7f6b471d8c80 <xcb_req>) at ../../src/xcb_out.c:292
#8  0x00007f6b46fd82f7 in xcb_dpms_disable (c=<optimized out>) at dpms.c:348
#9  0x00007f6b471e1224 in ?? () from /usr/lib/x86_64-linux-gnu/qt5/plugins/powerdevildpmsaction.so
#10 0x00007f6b6219460a in PowerDevil::ActionPool::unloadAllActiveActions() () from /usr/lib/x86_64-linux-gnu/libpowerdevilcore.so.2
#11 0x00007f6b62198c26 in PowerDevil::Core::~Core() () from /usr/lib/x86_64-linux-gnu/libpowerdevilcore.so.2
#12 0x00007f6b62198f29 in PowerDevil::Core::~Core() () from /usr/lib/x86_64-linux-gnu/libpowerdevilcore.so.2
#13 0x00007f6b615aa2e3 in QObjectPrivate::deleteChildren() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#14 0x00007f6b615b3484 in QObject::~QObject() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#15 0x00007f6b61582762 in QCoreApplication::~QCoreApplication() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#16 0x0000000000404e65 in ?? ()
#17 0x00007f6b60bcf830 in __libc_start_main (main=0x404dc0, argc=1, argv=0x7ffc471abf38, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffc471abf28) at ../csu/libc-start.c:291
#18 0x0000000000404eb9 in _start ()
Comment 12 Kai Uwe Broulik 2016-10-23 17:48:22 UTC
https://phabricator.kde.org/D3146
Comment 13 Kai Uwe Broulik 2016-10-25 16:23:42 UTC
Git commit 70177b065389db8cc822dbe88b3cdd383cd1d4cc by Kai Uwe Broulik.
Committed on 25/10/2016 at 16:21.
Pushed by broulik into branch 'Plasma/5.8'.

Manually delete PowerDevil Core on teardown

The QObject children cleanup routine is run after QGuiApplication's destructor after which
the X connection has already been cleaned up. By manually deleting in PowerDevilApp's
destructor, we delete Core first before any Qt cleanup happens.

CHANGELOG: PowerDevil no longer crashes on logout
FIXED-IN: 5.8.3

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

M  +4    -1    daemon/powerdevilapp.cpp

http://commits.kde.org/powerdevil/70177b065389db8cc822dbe88b3cdd383cd1d4cc