Bug 383058

Summary: kwin sometimes segfaults while Alt+tabbing
Product: [Plasma] kwin Reporter: Yannick <leguen.yannick>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: crash Keywords: drkonqi
Priority: NOR    
Version: 5.10.4   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Yannick 2017-08-02 18:42:20 UTC
Application: kwin_x11 (5.10.4)

Qt Version: 5.9.1
Frameworks Version: 5.36.0
Operating System: Linux 4.12.3-1-ARCH x86_64
Distribution (Platform): Archlinux Packages

-- Information about the crash:
- What I was doing when the application crashed:
I was alt-tabbing between applications (with the "thumbnail" alt-tab style, not sure I translate this word correctly here).

I released the Alt+tab keys, but the "thumbnails" remained on the screen for a few seconds, then kwin crashed.

It happens from time to time, it's quite hard to reproduce.

The crash can be reproduced sometimes.

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

Thread 11 (Thread 0x7f614b427700 (LWP 681)):
#0  0x00007f61839cf1ad in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f6186d5db04 in  () at /usr/lib/libQt5Script.so.5
#2  0x00007f6186d5db49 in  () at /usr/lib/libQt5Script.so.5
#3  0x00007f61839c9049 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007f618a837f0f in clone () at /usr/lib/libc.so.6

Thread 10 (Thread 0x7f614c429700 (LWP 679)):
#0  0x00007f61839cf1ad in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f615752050c in  () at /usr/lib/xorg/modules/dri/radeonsi_dri.so
#2  0x00007f6157520218 in  () at /usr/lib/xorg/modules/dri/radeonsi_dri.so
#3  0x00007f61839c9049 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007f618a837f0f in clone () at /usr/lib/libc.so.6

Thread 9 (Thread 0x7f614cc2a700 (LWP 678)):
#0  0x00007f61839cf1ad in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f615752050c in  () at /usr/lib/xorg/modules/dri/radeonsi_dri.so
#2  0x00007f6157520218 in  () at /usr/lib/xorg/modules/dri/radeonsi_dri.so
#3  0x00007f61839c9049 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007f618a837f0f in clone () at /usr/lib/libc.so.6

Thread 8 (Thread 0x7f6154d27700 (LWP 677)):
#0  0x00007f61839cf1ad in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f615752050c in  () at /usr/lib/xorg/modules/dri/radeonsi_dri.so
#2  0x00007f6157520218 in  () at /usr/lib/xorg/modules/dri/radeonsi_dri.so
#3  0x00007f61839c9049 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007f618a837f0f in clone () at /usr/lib/libc.so.6

Thread 7 (Thread 0x7f6155528700 (LWP 676)):
#0  0x00007f61839cf1ad in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f615752050c in  () at /usr/lib/xorg/modules/dri/radeonsi_dri.so
#2  0x00007f6157520218 in  () at /usr/lib/xorg/modules/dri/radeonsi_dri.so
#3  0x00007f61839c9049 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007f618a837f0f in clone () at /usr/lib/libc.so.6

Thread 6 (Thread 0x7f6155f2e700 (LWP 675)):
#0  0x00007f61839cf1ad in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f615752050c in  () at /usr/lib/xorg/modules/dri/radeonsi_dri.so
#2  0x00007f6157520218 in  () at /usr/lib/xorg/modules/dri/radeonsi_dri.so
#3  0x00007f61839c9049 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007f618a837f0f in clone () at /usr/lib/libc.so.6

Thread 5 (Thread 0x7f615672f700 (LWP 674)):
#0  0x00007f61839cf1ad in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f615752050c in  () at /usr/lib/xorg/modules/dri/radeonsi_dri.so
#2  0x00007f6157520218 in  () at /usr/lib/xorg/modules/dri/radeonsi_dri.so
#3  0x00007f61839c9049 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007f618a837f0f in clone () at /usr/lib/libc.so.6

Thread 4 (Thread 0x7f6163576700 (LWP 661)):
#0  0x00007f618a82df76 in ppoll () at /usr/lib/libc.so.6
#1  0x00007f6187e3eba3 in qt_safe_poll(pollfd*, unsigned long, timespec const*) () at /usr/lib/libQt5Core.so.5
#2  0x00007f6187e4033f in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#3  0x00007f6187de6ffb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#4  0x00007f6187c0040e in QThread::exec() () at /usr/lib/libQt5Core.so.5
#5  0x00007f61824cb1d5 in  () at /usr/lib/libQt5Qml.so.5
#6  0x00007f6187c0515b in  () at /usr/lib/libQt5Core.so.5
#7  0x00007f61839c9049 in start_thread () at /usr/lib/libpthread.so.0
#8  0x00007f618a837f0f in clone () at /usr/lib/libc.so.6

Thread 3 (Thread 0x7f616aca4700 (LWP 616)):
#0  0x00007f618a82df76 in ppoll () at /usr/lib/libc.so.6
#1  0x00007f6187e3eba3 in qt_safe_poll(pollfd*, unsigned long, timespec const*) () at /usr/lib/libQt5Core.so.5
#2  0x00007f6187e4033f in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#3  0x00007f6187de6ffb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#4  0x00007f6187c0040e in QThread::exec() () at /usr/lib/libQt5Core.so.5
#5  0x00007f618166c396 in  () at /usr/lib/libQt5DBus.so.5
#6  0x00007f6187c0515b in  () at /usr/lib/libQt5Core.so.5
#7  0x00007f61839c9049 in start_thread () at /usr/lib/libpthread.so.0
#8  0x00007f618a837f0f in clone () at /usr/lib/libc.so.6

Thread 2 (Thread 0x7f6170fb6700 (LWP 599)):
#0  0x00007f618a82de9d in poll () at /usr/lib/libc.so.6
#1  0x00007f618991a8e0 in  () at /usr/lib/libxcb.so.1
#2  0x00007f618991c679 in xcb_wait_for_event () at /usr/lib/libxcb.so.1
#3  0x00007f617209672a in  () at /usr/lib/libQt5XcbQpa.so.5
#4  0x00007f6187c0515b in  () at /usr/lib/libQt5Core.so.5
#5  0x00007f61839c9049 in start_thread () at /usr/lib/libpthread.so.0
#6  0x00007f618a837f0f in clone () at /usr/lib/libc.so.6

Thread 1 (Thread 0x7f618aea4840 (LWP 578)):
[KCrash Handler]
#5  0x00007f61578bbfa0 in  () at /usr/lib/xorg/modules/dri/radeonsi_dri.so
#6  0x00007f615763a582 in  () at /usr/lib/xorg/modules/dri/radeonsi_dri.so
#7  0x00007f615742a961 in  () at /usr/lib/xorg/modules/dri/radeonsi_dri.so
#8  0x00007f61573ef6b0 in  () at /usr/lib/xorg/modules/dri/radeonsi_dri.so
#9  0x00007f61573efb4a in  () at /usr/lib/xorg/modules/dri/radeonsi_dri.so
#10 0x00007f6182b7e39f in QSGBatchRenderer::Renderer::renderMergedBatch(QSGBatchRenderer::Batch const*) () at /usr/lib/libQt5Quick.so.5
#11 0x00007f6182b7f5e5 in QSGBatchRenderer::Renderer::renderBatches() () at /usr/lib/libQt5Quick.so.5
#12 0x00007f6182b84d44 in QSGBatchRenderer::Renderer::render() () at /usr/lib/libQt5Quick.so.5
#13 0x00007f6182b756ed in QSGRenderer::renderScene(QSGBindable const&) () at /usr/lib/libQt5Quick.so.5
#14 0x00007f6182b75bab in QSGRenderer::renderScene(unsigned int) () at /usr/lib/libQt5Quick.so.5
#15 0x00007f6182baff50 in QSGDefaultRenderContext::renderNextFrame(QSGRenderer*, unsigned int) () at /usr/lib/libQt5Quick.so.5
#16 0x00007f6182c0c948 in QQuickWindowPrivate::renderSceneGraph(QSize const&) () at /usr/lib/libQt5Quick.so.5
#17 0x00007f6182ba23a9 in  () at /usr/lib/libQt5Quick.so.5
#18 0x00007f6182c16bd6 in QQuickWindow::event(QEvent*) () at /usr/lib/libQt5Quick.so.5
#19 0x00007f6132b46ba4 in PlasmaQuick::Dialog::event(QEvent*) () at /usr/lib/libKF5PlasmaQuick.so.5
#20 0x00007f6188b0fe4c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#21 0x00007f6188b17926 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#22 0x00007f6187de8bd0 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#23 0x00007f6188357293 in QWindowPrivate::deliverUpdateRequest() () at /usr/lib/libQt5Gui.so.5
#24 0x00007f61883577bb in QWindow::event(QEvent*) () at /usr/lib/libQt5Gui.so.5
#25 0x00007f6182c16b75 in QQuickWindow::event(QEvent*) () at /usr/lib/libQt5Quick.so.5
#26 0x00007f6132b46ba4 in PlasmaQuick::Dialog::event(QEvent*) () at /usr/lib/libKF5PlasmaQuick.so.5
#27 0x00007f6188b0fe4c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#28 0x00007f6188b17926 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#29 0x00007f6187de8bd0 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#30 0x00007f6187e424a8 in QTimerInfoList::activateTimers() () at /usr/lib/libQt5Core.so.5
#31 0x00007f6187e405a4 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#32 0x00007f61720fb0de in  () at /usr/lib/libQt5XcbQpa.so.5
#33 0x00007f6187de6ffb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#34 0x00007f6187df0048 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
#35 0x00007f618aaf86d3 in kdemain () at /usr/lib/libkdeinit5_kwin_x11.so
#36 0x00007f618a76a4ca in __libc_start_main () at /usr/lib/libc.so.6
#37 0x0000009a950d57ca in _start ()

Reported using DrKonqi
Comment 1 Yannick 2017-08-02 18:49:56 UTC
I didn't have this problem when I was using an nvidia discrete GPU, or intel graphics.
It happens since I switched to an AMD discrete GPU.
Comment 2 Martin Flöser 2017-08-02 19:26:45 UTC
(In reply to Yannick from comment #1)
> I didn't have this problem when I was using an nvidia discrete GPU, or intel
> graphics.
> It happens since I switched to an AMD discrete GPU.

Unfortunately I can confirm that from the backtrace: the crash is in the driver. Sorry, nothing we can do :-(
Comment 3 Yannick 2017-08-03 17:40:11 UTC
Ok, no problem :>

Hopefully, Mesa 17.2 will fix it.

In the meantime, setting the Alt+Tab style to "large icons" (with no thumbnail at all) looks like a good workaround.