Bug 365464

Summary: kwin crash when open cs:go
Product: [Plasma] kwin Reporter: Luca Gasperini <me>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: crash Keywords: drkonqi
Priority: NOR    
Version First Reported In: 5.5.5   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 5.6.0
Sentry Crash Report:

Description Luca Gasperini 2016-07-12 10:20:44 UTC
Application: kwin_x11 (5.5.5)

Qt Version: 5.5.1
Operating System: Linux 4.1.26-21-default x86_64
Distribution: "openSUSE Leap 42.1 (x86_64)"

-- Information about the crash:
- What I was doing when the application crashed:
When I try to open cs:go by steam, kwin crash or freeze the panel with a previuos session of process (example: I open it on 12:15 and kwin clock back on previous time like 10:25, probably with all apps loaded on this time)

The crash can be reproduced sometimes.

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

Thread 3 (Thread 0x7f94dbfff700 (LWP 15119)):
#0  0x00007f94fe6fc253 in select () at /lib64/libc.so.6
#1  0x00007f94fc52d179 in qt_safe_select(int, fd_set*, fd_set*, fd_set*, timespec const*) () at /usr/lib64/libQt5Core.so.5
#2  0x00007f94fc52eaf5 in QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timespec*) () at /usr/lib64/libQt5Core.so.5
#3  0x00007f94fc52ef3b in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#4  0x00007f94fc4d7d53 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#5  0x00007f94fc2f961a in QThread::exec() () at /usr/lib64/libQt5Core.so.5
#6  0x00007f94f6889e18 in  () at /usr/lib64/libQt5Qml.so.5
#7  0x00007f94fc2fe32f in  () at /usr/lib64/libQt5Core.so.5
#8  0x00007f94fdd2f0a4 in start_thread () at /lib64/libpthread.so.0
#9  0x00007f94fe702fed in clone () at /lib64/libc.so.6

Thread 2 (Thread 0x7f94d9efc700 (LWP 15122)):
#0  0x00007f94fdd3303f in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0
#1  0x00007f94fb30f86b in  () at /usr/lib64/libQt5Script.so.5
#2  0x00007f94fb30f899 in  () at /usr/lib64/libQt5Script.so.5
#3  0x00007f94fdd2f0a4 in start_thread () at /lib64/libpthread.so.0
#4  0x00007f94fe702fed in clone () at /lib64/libc.so.6

Thread 1 (Thread 0x7f94fed82800 (LWP 15108)):
[KCrash Handler]
#6  0x00007f94fe2d7acd in  () at /usr/lib64/libkwin.so.5
#7  0x00007f94fe2d7b89 in  () at /usr/lib64/libkwin.so.5
#8  0x00007f94fc50ab18 in QObject::event(QEvent*) () at /usr/lib64/libQt5Core.so.5
#9  0x00007f94fd1bde7c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib64/libQt5Widgets.so.5
#10 0x00007f94fd1c2cc8 in QApplication::notify(QObject*, QEvent*) () at /usr/lib64/libQt5Widgets.so.5
#11 0x00007f94fc4d9e95 in QCoreApplication::notifyInternal(QObject*, QEvent*) () at /usr/lib64/libQt5Core.so.5
#12 0x00007f94fc4dc057 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib64/libQt5Core.so.5
#13 0x00007f94fc52eec4 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#14 0x00007f94e4c9433d in  () at /usr/lib64/libQt5XcbQpa.so.5
#15 0x00007f94fc4d7d53 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#16 0x00007f94fc4df8f6 in QCoreApplication::exec() () at /usr/lib64/libQt5Core.so.5
#17 0x00007f94fe9cb9e7 in kdemain () at /usr/lib64/libkdeinit5_kwin_x11.so
#18 0x00007f94fe63fb05 in __libc_start_main () at /lib64/libc.so.6
#19 0x000000000040085e in _start ()

Reported using DrKonqi
Comment 1 Thomas Lübking 2016-07-12 10:22:51 UTC
> #6 0x00007f94fe2d7acd in () at /usr/lib64/libkwin.so.5
> #7 0x00007f94fe2d7b89 in () at /usr/lib64/libkwin.so.5

lacks any relevant debug symbols. please install the kwin-dbg package, recause the segfault and provide an updated backtrace.
Comment 2 Luca Gasperini 2016-07-12 21:18:01 UTC
Application: KWin (kwin_x11), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fda0d5ca800 (LWP 8967))]

Thread 4 (Thread 0x7fd9f27a9700 (LWP 8970)):
#0  0x00007fda0cf42bbd in poll () at /lib64/libc.so.6
#1  0x00007fda0a886422 in  () at /usr/lib64/libxcb.so.1
#2  0x00007fda0a88800f in xcb_wait_for_event () at /usr/lib64/libxcb.so.1
#3  0x00007fd9f347c3c9 in  () at /usr/lib64/libQt5XcbQpa.so.5
#4  0x00007fda0ab4632f in  () at /usr/lib64/libQt5Core.so.5
#5  0x00007fda0c5770a4 in start_thread () at /lib64/libpthread.so.0
#6  0x00007fda0cf4afed in clone () at /lib64/libc.so.6

Thread 3 (Thread 0x7fd9eadee700 (LWP 8978)):
#0  0x00007fda0cf44253 in select () at /lib64/libc.so.6
#1  0x00007fda0ad75179 in qt_safe_select(int, fd_set*, fd_set*, fd_set*, timespec const*) () at /usr/lib64/libQt5Core.so.5
#2  0x00007fda0ad76af5 in QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timespec*) () at /usr/lib64/libQt5Core.so.5
#3  0x00007fda0ad76f3b in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#4  0x00007fda0ad1fd53 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#5  0x00007fda0ab4161a in QThread::exec() () at /usr/lib64/libQt5Core.so.5
#6  0x00007fda050d1e18 in  () at /usr/lib64/libQt5Qml.so.5
#7  0x00007fda0ab4632f in  () at /usr/lib64/libQt5Core.so.5
#8  0x00007fda0c5770a4 in start_thread () at /lib64/libpthread.so.0
#9  0x00007fda0cf4afed in clone () at /lib64/libc.so.6

Thread 2 (Thread 0x7fd9e8f90700 (LWP 8980)):
#0  0x00007fda0c57b03f in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0
#1  0x00007fda09b5786b in  () at /usr/lib64/libQt5Script.so.5
#2  0x00007fda09b57899 in  () at /usr/lib64/libQt5Script.so.5
#3  0x00007fda0c5770a4 in start_thread () at /lib64/libpthread.so.0
#4  0x00007fda0cf4afed in clone () at /lib64/libc.so.6

Thread 1 (Thread 0x7fda0d5ca800 (LWP 8967)):
[KCrash Handler]
#6  0x00007fda0cb1facd in KWin::SceneOpenGLShadow::~SceneOpenGLShadow() (this=0x2ab2c80, __in_chrg=<optimized out>) at /usr/src/debug/kwin-5.5.5/scene_opengl.cpp:2210
#7  0x00007fda0cb1fb89 in KWin::SceneOpenGLShadow::~SceneOpenGLShadow() (this=0x2ab2c80, __in_chrg=<optimized out>) at /usr/src/debug/kwin-5.5.5/scene_opengl.cpp:2213
#8  0x00007fda0ad52b18 in QObject::event(QEvent*) () at /usr/lib64/libQt5Core.so.5
#9  0x00007fda0ba05e7c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib64/libQt5Widgets.so.5
#10 0x00007fda0ba0acc8 in QApplication::notify(QObject*, QEvent*) () at /usr/lib64/libQt5Widgets.so.5
#11 0x00007fda0ad21e95 in QCoreApplication::notifyInternal(QObject*, QEvent*) () at /usr/lib64/libQt5Core.so.5
#12 0x00007fda0ad24057 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib64/libQt5Core.so.5
#13 0x00007fda0ad76ec4 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#14 0x00007fd9f34dc33d in  () at /usr/lib64/libQt5XcbQpa.so.5
#15 0x00007fda0ad1fd53 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#16 0x00007fda0ad278f6 in QCoreApplication::exec() () at /usr/lib64/libQt5Core.so.5
#17 0x00007fda0d2139e7 in kdemain(int, char**) (argc=3, argv=0x7ffe0ceaab78) at /usr/src/debug/kwin-5.5.5/main_x11.cpp:309
#18 0x00007fda0ce87b05 in __libc_start_main () at /lib64/libc.so.6
#19 0x000000000040085e in _start () at ../sysdeps/x86_64/start.S:122
Comment 3 Martin Flöser 2016-07-13 06:23:27 UTC
Thanks for adding the backtrace.
Comment 4 Martin Flöser 2016-07-13 06:29:03 UTC
This particular crash has been fixed for KWin 5.6 with:

commit cae90bb035e6170a9beb38545cf60e31af612804
Author: Thomas Lübking <thomas.luebking@gmail.com>
Date:   Mon Dec 21 00:18:00 2015 +0100

    catch nullptr effects when deleting shadows
    
    the shadow can be deleted deferred from an update
    there's a slight chance, to be eg. triggered by clients
    blocking compositing, that the compositor is suspended in the same
    cycle and the effects pointer (and scene and context) thus gone
    
    CCBUG: 356938
    FIXED-IN: 5.6
    REVIEW: 126441