Bug 404617 - KWin Crashes After Waking Up From Sleep
Summary: KWin Crashes After Waking Up From Sleep
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.15.1
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: drkonqi
Depends on:
Blocks: 405406
  Show dependency treegraph
 
Reported: 2019-02-20 20:40 UTC by Arjun Menon
Modified: 2019-04-12 04:33 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arjun Menon 2019-02-20 20:40:40 UTC
Application: kwin_x11 (5.15.1)

Qt Version: 5.12.1
Frameworks Version: 5.55.0
Operating System: Linux 4.20.10-arch1-1-ARCH x86_64
Distribution (Platform): Archlinux Packages

-- Information about the crash:
I put my computer to sleep through the K Start Menu. When it wakes up, KWin consistently crashs. I'm running Arch Linux, with all of the latest stable Plasma and other KDE applications.

The crash can be reproduced every time.

-- Backtrace:
Application: KWin (kwin_x11), signal: Segmentation fault
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f516b1f2840 (LWP 871))]

Thread 5 (Thread 0x7f51523d3700 (LWP 970)):
#0  0x00007f51717c4afc in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f51722c928c in  () at /usr/lib/libQt5Script.so.5
#2  0x00007f51722c92a9 in  () at /usr/lib/libQt5Script.so.5
#3  0x00007f51717bea9d in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007f5173e75b23 in clone () at /usr/lib/libc.so.6

Thread 4 (Thread 0x7f515b895700 (LWP 965)):
#0  0x00007f5173e6ad16 in ppoll () at /usr/lib/libc.so.6
#1  0x00007f51729e2bab in qt_safe_poll(pollfd*, unsigned long, timespec const*) () at /usr/lib/libQt5Core.so.5
#2  0x00007f51729e408b in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#3  0x00007f517298fb2c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#4  0x00007f51727d3569 in QThread::exec() () at /usr/lib/libQt5Core.so.5
#5  0x00007f5170f7b969 in  () at /usr/lib/libQt5Qml.so.5
#6  0x00007f51727d496c in  () at /usr/lib/libQt5Core.so.5
#7  0x00007f51717bea9d in start_thread () at /usr/lib/libpthread.so.0
#8  0x00007f5173e75b23 in clone () at /usr/lib/libc.so.6

Thread 3 (Thread 0x7f5169a35700 (LWP 936)):
#0  0x00007f5173e6ad16 in ppoll () at /usr/lib/libc.so.6
#1  0x00007f51729e2bab in qt_safe_poll(pollfd*, unsigned long, timespec const*) () at /usr/lib/libQt5Core.so.5
#2  0x00007f51729e408b in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#3  0x00007f517298fb2c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#4  0x00007f51727d3569 in QThread::exec() () at /usr/lib/libQt5Core.so.5
#5  0x00007f51709e0ba6 in  () at /usr/lib/libQt5DBus.so.5
#6  0x00007f51727d496c in  () at /usr/lib/libQt5Core.so.5
#7  0x00007f51717bea9d in start_thread () at /usr/lib/libpthread.so.0
#8  0x00007f5173e75b23 in clone () at /usr/lib/libc.so.6

Thread 2 (Thread 0x7f516aa96700 (LWP 928)):
#0  0x00007f5173e6ac21 in poll () at /usr/lib/libc.so.6
#1  0x00007f51726f8630 in  () at /usr/lib/libxcb.so.1
#2  0x00007f51726fa2db in xcb_wait_for_event () at /usr/lib/libxcb.so.1
#3  0x00007f516adbe949 in  () at /usr/lib/libQt5XcbQpa.so.5
#4  0x00007f51727d496c in  () at /usr/lib/libQt5Core.so.5
#5  0x00007f51717bea9d in start_thread () at /usr/lib/libpthread.so.0
#6  0x00007f5173e75b23 in clone () at /usr/lib/libc.so.6

Thread 1 (Thread 0x7f516b1f2840 (LWP 871)):
[KCrash Handler]
#6  0x00007f51724d5739 in  () at /usr/lib/libkwin4_effect_builtins.so.1
#7  0x00007f51724d57f6 in  () at /usr/lib/libkwin4_effect_builtins.so.1
#8  0x00007f51724d6df8 in  () at /usr/lib/libkwin4_effect_builtins.so.1
#9  0x00007f51724d7812 in  () at /usr/lib/libkwin4_effect_builtins.so.1
#10 0x00007f5173be0774 in KWin::EffectsHandlerImpl::drawWindow(KWin::EffectWindow*, int, QRegion, KWin::WindowPaintData&) () at /usr/lib/libkwin.so.5
#11 0x00007f5172446ffa in  () at /usr/lib/libkwin4_effect_builtins.so.1
#12 0x00007f5173be0774 in KWin::EffectsHandlerImpl::drawWindow(KWin::EffectWindow*, int, QRegion, KWin::WindowPaintData&) () at /usr/lib/libkwin.so.5
#13 0x00007f517253a51d in KWin::Effect::drawWindow(KWin::EffectWindow*, int, QRegion, KWin::WindowPaintData&) () at /usr/lib/libkwineffects.so.12
#14 0x00007f5173be0774 in KWin::EffectsHandlerImpl::drawWindow(KWin::EffectWindow*, int, QRegion, KWin::WindowPaintData&) () at /usr/lib/libkwin.so.5
#15 0x00007f517253a51d in KWin::Effect::drawWindow(KWin::EffectWindow*, int, QRegion, KWin::WindowPaintData&) () at /usr/lib/libkwineffects.so.12
#16 0x00007f5173be0774 in KWin::EffectsHandlerImpl::drawWindow(KWin::EffectWindow*, int, QRegion, KWin::WindowPaintData&) () at /usr/lib/libkwin.so.5
#17 0x00007f5173bcac3d in KWin::Scene::finalPaintWindow(KWin::EffectWindowImpl*, int, QRegion, KWin::WindowPaintData&) () at /usr/lib/libkwin.so.5
#18 0x00007f5173be0605 in KWin::EffectsHandlerImpl::paintWindow(KWin::EffectWindow*, int, QRegion, KWin::WindowPaintData&) () at /usr/lib/libkwin.so.5
#19 0x00007f51724c937f in  () at /usr/lib/libkwin4_effect_builtins.so.1
#20 0x00007f5173be05a4 in KWin::EffectsHandlerImpl::paintWindow(KWin::EffectWindow*, int, QRegion, KWin::WindowPaintData&) () at /usr/lib/libkwin.so.5
#21 0x00007f517253a3ad in KWin::Effect::paintWindow(KWin::EffectWindow*, int, QRegion, KWin::WindowPaintData&) () at /usr/lib/libkwineffects.so.12
#22 0x00007f5173be05a4 in KWin::EffectsHandlerImpl::paintWindow(KWin::EffectWindow*, int, QRegion, KWin::WindowPaintData&) () at /usr/lib/libkwin.so.5
#23 0x00007f517253a3ad in KWin::Effect::paintWindow(KWin::EffectWindow*, int, QRegion, KWin::WindowPaintData&) () at /usr/lib/libkwineffects.so.12
#24 0x00007f5173be05a4 in KWin::EffectsHandlerImpl::paintWindow(KWin::EffectWindow*, int, QRegion, KWin::WindowPaintData&) () at /usr/lib/libkwin.so.5
#25 0x00007f517254358c in KWin::AnimationEffect::paintWindow(KWin::EffectWindow*, int, QRegion, KWin::WindowPaintData&) () at /usr/lib/libkwineffects.so.12
#26 0x00007f5173be05a4 in KWin::EffectsHandlerImpl::paintWindow(KWin::EffectWindow*, int, QRegion, KWin::WindowPaintData&) () at /usr/lib/libkwin.so.5
#27 0x00007f517254358c in KWin::AnimationEffect::paintWindow(KWin::EffectWindow*, int, QRegion, KWin::WindowPaintData&) () at /usr/lib/libkwineffects.so.12
#28 0x00007f5173be05a4 in KWin::EffectsHandlerImpl::paintWindow(KWin::EffectWindow*, int, QRegion, KWin::WindowPaintData&) () at /usr/lib/libkwin.so.5
#29 0x00007f5173bd1406 in KWin::Scene::paintWindow(KWin::Scene::Window*, int, QRegion, KWin::WindowQuadList) () at /usr/lib/libkwin.so.5
#30 0x00007f5173bcdc58 in KWin::Scene::paintSimpleScreen(int, QRegion) () at /usr/lib/libkwin.so.5
#31 0x00007f515b8bb1e4 in  () at /usr/lib/qt/plugins/org.kde.kwin.scenes/KWinSceneOpenGL.so
#32 0x00007f5173bd08f1 in KWin::Scene::finalPaintScreen(int, QRegion, KWin::ScreenPaintData&) () at /usr/lib/libkwin.so.5
#33 0x00007f5173be0357 in KWin::EffectsHandlerImpl::paintScreen(int, QRegion, KWin::ScreenPaintData&) () at /usr/lib/libkwin.so.5
#34 0x00007f517253a302 in KWin::Effect::paintScreen(int, QRegion, KWin::ScreenPaintData&) () at /usr/lib/libkwineffects.so.12
#35 0x00007f5173be02fe in KWin::EffectsHandlerImpl::paintScreen(int, QRegion, KWin::ScreenPaintData&) () at /usr/lib/libkwin.so.5
#36 0x00007f517253a302 in KWin::Effect::paintScreen(int, QRegion, KWin::ScreenPaintData&) () at /usr/lib/libkwineffects.so.12
#37 0x00007f5173be02fe in KWin::EffectsHandlerImpl::paintScreen(int, QRegion, KWin::ScreenPaintData&) () at /usr/lib/libkwin.so.5
#38 0x00007f517253a302 in KWin::Effect::paintScreen(int, QRegion, KWin::ScreenPaintData&) () at /usr/lib/libkwineffects.so.12
#39 0x00007f5173be02fe in KWin::EffectsHandlerImpl::paintScreen(int, QRegion, KWin::ScreenPaintData&) () at /usr/lib/libkwin.so.5
#40 0x00007f517253a302 in KWin::Effect::paintScreen(int, QRegion, KWin::ScreenPaintData&) () at /usr/lib/libkwineffects.so.12
#41 0x00007f5173be02fe in KWin::EffectsHandlerImpl::paintScreen(int, QRegion, KWin::ScreenPaintData&) () at /usr/lib/libkwin.so.5
#42 0x00007f517253a302 in KWin::Effect::paintScreen(int, QRegion, KWin::ScreenPaintData&) () at /usr/lib/libkwineffects.so.12
#43 0x00007f5173be02fe in KWin::EffectsHandlerImpl::paintScreen(int, QRegion, KWin::ScreenPaintData&) () at /usr/lib/libkwin.so.5
#44 0x00007f5173bd058b in KWin::Scene::paintScreen(int*, QRegion const&, QRegion const&, QRegion*, QRegion*, QMatrix4x4 const&, QRect const&) () at /usr/lib/libkwin.so.5
#45 0x00007f515b8c33f7 in KWin::SceneOpenGL::paint(QRegion, QList<KWin::Toplevel*>) () at /usr/lib/qt/plugins/org.kde.kwin.scenes/KWinSceneOpenGL.so
#46 0x00007f5173bc1bae in KWin::Compositor::performCompositing() () at /usr/lib/libkwin.so.5
#47 0x00007f51729bc10b in QObject::event(QEvent*) () at /usr/lib/libQt5Core.so.5
#48 0x00007f517335ae24 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#49 0x00007f51733626e1 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#50 0x00007f5172990e99 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#51 0x00007f51729e6095 in QTimerInfoList::activateTimers() () at /usr/lib/libQt5Core.so.5
#52 0x00007f51729e41de in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#53 0x00007f516adbfcbf in  () at /usr/lib/libQt5XcbQpa.so.5
#54 0x00007f517298fb2c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#55 0x00007f5172997e36 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
#56 0x00007f5173f47b26 in kdemain () at /usr/lib/libkdeinit5_kwin_x11.so
#57 0x00007f5173d9e223 in __libc_start_main () at /usr/lib/libc.so.6
#58 0x000055c6c0dcd05e in _start ()
[Inferior 1 (process 871) detached]

Reported using DrKonqi
Comment 1 Martin Flöser 2019-02-21 05:10:23 UTC
Unfortunately the backtrace is lacking debug symbols. If you are able to reproduce please install debug packages and attach a new backtrace.
Comment 2 Vlad Zahorodnii 2019-02-21 08:59:46 UTC
In addition to Martin's request, what gpu do you have in your computer?
Comment 3 Bug Janitor Service 2019-03-08 04:33:07 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Arjun Menon 2019-03-12 21:54:19 UTC
Hi Martin Flöser,

I'll try to look into what I need to do, in order to install debug symbols for KDE/Plasma on Arch Linux. Sorry for the late response. I  had switched to using Windows for the past few weeks, and just switched back to Arch Linux today.

Out of habit, I ran the command to update all my packages soon after logging in. It was too late before I remembered that I needed to reproduce this bug. I ended up with the latest KDE and Plasma packages as a result.

I've only been using Arch Linux for less than a day, but now, instead of KWin crashing, Plasma is crashing. I created a new bug report for it: https://bugs.kde.org/show_bug.cgi?id=405406

I also want to make a note that sleep/wake on Plasma/KDE was working fine previously, until November 2018. I had no problems whatsoever with sleep/wake. I had been exclusively using Arch Linux on my laptop for several months in 2018. My laptop went through many sleep/wake cycles with no issues. I almost never restarted Linux, or even exited/restarted Plasma. I always just put my laptop to sleep, and woke up it later.

This problem started after I re-installed Arch Linux in February this year. There was a period, from November 2018 to February 2019, during which I was using Windows instead of Linux.

Also, since Arch Linux uses sytemd, my guess is that the underlying command issued by Plasma for sleeping is probably `systemctl suspend` or something similar (but I haven't checked the Plasma sources on this though).


Hi Vlad Zagorodniy,

My laptop has an integrated Intel GPU: Intel® UHD Graphics 620. This Intel GPU is on the CPU die itself. The CPU on my laptop is the Intel Core i7 8550U. Here is the spec page for the 8550U: https://ark.intel.com/content/www/us/en/ark/products/122589/intel-core-i7-8550u-processor-8m-cache-up-to-4-00-ghz.html

My laptop also has a dedicated GPU: Nvidia MX150. I have the official closed-source Nvidia driver on Linux (and not nouveau). But I don't think the Nvidia MX150 is ever active or being used. I once tried to run a game (0 A.D.) on the Nvidia GPU using `optirun` (c.f. Nvidia Optimus), but it actually ran super-slow! Even glxgears ran horribly slow on the Nvidia GPU compared to the Intel GPU. It's weird because the Nvidia GPU is a lot more powerful than the Intel GPU. I never investigated and figured out why the Nvidia GPU was super-slow on Linux.



Why I stopped using Linux from Nov 2018 to Feb 2019

The story of why I had to switch to Windows for 4 months (from Nov '18 to Feb '19) is a long one, but I'll share it here, for some context. This is a bit long and rather tengetial, so please feel free to skip it.

Sometime in November 2018, I was running a long-overdue update of all my packages (ie `pacman -Syu`). While some package was installing, Plasma crashed. I was in the middle of reading an article online, and Plasma suddenly crashed suddenly (with a lot of error messages), and brought me back to the shell (on Arch). My theory is that it happened because pacman (the Arch Linux package manager) was probably literally overwriting/replacing Plasma binaries, while the system was running. Also, because, my package update process was running on Konsole, I think when KDE crashed, it killed the package update process in the middle of whatever it was doing. After this happened, I think I tried to finish my update, and then rebooted my computer. But when I rebooted, the system wouldn't boot.

The interrupted system update actually corrupted my Arch Linux installation. I spent several hours trying to fix it, but eventually gave up, and switched to Windows for several months (until February 2019). I had some important job interviews coming up, and I couldn't spend all my time trying to fix my Arch Linux installation. Initially, I found out that the vmlinuz image itself was broken (and non-bootable). But I fixed that / got the kernel to build properly; but after that, the next problem was that my initramfs was partially broken. The Arch Linux mkinitcpio command (https://wiki.archlinux.org/index.php/mkinitcpio) wasn't working properly, and was throwing errors while building. It would build an initramfs that lacked support for decrypting a dm-crypt partition. So I couldn't actually boot my system -- even if I could access it from an Arch Linux installation USB. Anyways, because of my job interviews, I switched to Windows for a while. Later on, in February 2019, I spent some more time trying to fix my broken Arch Linux installation, but finally decided it wasn't worth my time anymore, so I backed up my home directory, and set up everything from scratch. Ever since coming back to Arch Linux + KDE/Plasma (in February 2019), I've had this intractable sleep/wake problem.



Thank you, both of you, for looking into these bugs,
Arjun
Comment 5 Arjun Menon 2019-03-13 17:40:50 UTC
I'll need to compile KDE from sources to have debug symbols, so getting this backtrace will take awhile. Is it fine if I re-open this bug, so that the Bug Janitor doesn't automatically "resolve" this?
Comment 6 Martin Flöser 2019-03-13 17:50:52 UTC
Setting back to needsinfo backtrace. Please do not reopen until you have a good backtrace.
Comment 7 Arjun Menon 2019-03-13 18:25:47 UTC
Well, KWin doesn't crash after sleep, as of now -- Plasma does instead. I created a ticket for the Plasma crash here: https://bugs.kde.org/show_bug.cgi?id=405406
Comment 8 Arjun Menon 2019-03-13 22:34:15 UTC
I can't reproduce this bug anymore.

After I update all my packages, KWin stopped crashing, and Plasma started crashing instead: https://bugs.kde.org/show_bug.cgi?id=405406

But as two people pointed out, the source of these troubles is the proprietary Nvidia driver.

I uninstalled the Nvidia driver; and now everything (ie. Nouveau) works perfectly!
Comment 9 Bug Janitor Service 2019-03-28 04:33:08 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 10 Bug Janitor Service 2019-04-12 04:33:08 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!