Bug 398114

Summary: Crash in libepoxy after suspending compositing
Product: [Plasma] kwin Reporter: Joseph-Eugene Winzer <joewinzer>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: crash CC: fantoro, kde, kde
Priority: NOR Keywords: drkonqi
Version: 5.13.4   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Joseph-Eugene Winzer 2018-08-31 22:02:16 UTC
Application: kwin_x11 (5.13.4)

Qt Version: 5.11.1
Frameworks Version: 5.49.0
Operating System: Linux 4.18.5-arch1-1-ARCH x86_64
Distribution (Platform): Archlinux Packages

-- Information about the crash:
- What I was doing when the application crashed:
I was starting ScummVM

Once I started the application the screen turned black for a few times before the application window was shown.
In dual screen setup or just the laptop screen, the behavior is the same.
This bug doesn't interfere with any functionality but it's just annoying.
I tried it on other DE (lxqt, xfce) and there the compositor doesn't crash or any other visual artifacts.

The crash can be reproduced sometimes.

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

Thread 6 (Thread 0x7f995df38700 (LWP 993)):
#0  0x00007f9982e57afc in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f9985533aac in  () at /usr/lib/libQt5Script.so.5
#2  0x00007f9985533ac9 in  () at /usr/lib/libQt5Script.so.5
#3  0x00007f9982e51a9d in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007f9987e3da43 in clone () at /usr/lib/libc.so.6

Thread 5 (Thread 0x7f995ffff700 (LWP 991)):
#0  0x00007f9982e57afc in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f9965186264 in  () at /usr/lib/dri/i965_dri.so
#2  0x00007f9965185f58 in  () at /usr/lib/dri/i965_dri.so
#3  0x00007f9982e51a9d in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007f9987e3da43 in clone () at /usr/lib/libc.so.6

Thread 4 (Thread 0x7f9967fff700 (LWP 989)):
#0  0x00007f9987e32ca6 in ppoll () at /usr/lib/libc.so.6
#1  0x00007f998641837b in qt_safe_poll(pollfd*, unsigned long, timespec const*) () at /usr/lib/libQt5Core.so.5
#2  0x00007f998641986b in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#3  0x00007f99863c7dac in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#4  0x00007f9986210f59 in QThread::exec() () at /usr/lib/libQt5Core.so.5
#5  0x00007f998208c0d9 in  () at /usr/lib/libQt5Qml.so.5
#6  0x00007f998621b005 in  () at /usr/lib/libQt5Core.so.5
#7  0x00007f9982e51a9d in start_thread () at /usr/lib/libpthread.so.0
#8  0x00007f9987e3da43 in clone () at /usr/lib/libc.so.6

Thread 3 (Thread 0x7f9976661700 (LWP 959)):
#0  0x00007f9987e32ca6 in ppoll () at /usr/lib/libc.so.6
#1  0x00007f998641837b in qt_safe_poll(pollfd*, unsigned long, timespec const*) () at /usr/lib/libQt5Core.so.5
#2  0x00007f998641986b in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#3  0x00007f99863c7dac in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#4  0x00007f9986210f59 in QThread::exec() () at /usr/lib/libQt5Core.so.5
#5  0x00007f9981b68ba6 in  () at /usr/lib/libQt5DBus.so.5
#6  0x00007f998621b005 in  () at /usr/lib/libQt5Core.so.5
#7  0x00007f9982e51a9d in start_thread () at /usr/lib/libpthread.so.0
#8  0x00007f9987e3da43 in clone () at /usr/lib/libc.so.6

Thread 2 (Thread 0x7f9977d1e700 (LWP 929)):
#0  0x00007f9987e32bb1 in poll () at /usr/lib/libc.so.6
#1  0x00007f9987547180 in  () at /usr/lib/libxcb.so.1
#2  0x00007f9987548e4b in xcb_wait_for_event () at /usr/lib/libxcb.so.1
#3  0x00007f997881de1a in  () at /usr/lib/libQt5XcbQpa.so.5
#4  0x00007f998621b005 in  () at /usr/lib/libQt5Core.so.5
#5  0x00007f9982e51a9d in start_thread () at /usr/lib/libpthread.so.0
#6  0x00007f9987e3da43 in clone () at /usr/lib/libc.so.6

Thread 1 (Thread 0x7f9978c476c0 (LWP 883)):
[KCrash Handler]
#6  0x00007f9987d79d7f in raise () at /usr/lib/libc.so.6
#7  0x00007f9987d64672 in abort () at /usr/lib/libc.so.6
#8  0x00007f9987d64548 in _nl_load_domain.cold.0 () at /usr/lib/libc.so.6
#9  0x00007f9987d72396 in  () at /usr/lib/libc.so.6
#10 0x00007f9982756f50 in  () at /usr/lib/libepoxy.so.0
#11 0x00007f99826f71c0 in  () at /usr/lib/libepoxy.so.0
#12 0x00007f99826fe1aa in  () at /usr/lib/libepoxy.so.0
#13 0x00007f99829dad3d in KWin::GLTexturePrivate::~GLTexturePrivate() () at /usr/lib/libkwinglutils.so.11
#14 0x00007f99829dad5a in KWin::GLTexturePrivate::~GLTexturePrivate() () at /usr/lib/libkwinglutils.so.11
#15 0x00007f99829dc1fa in KWin::GLTexture::~GLTexture() () at /usr/lib/libkwinglutils.so.11
#16 0x00007f9966da9121 in  () at /usr/lib/qt/plugins/org.kde.kwin.scenes/KWinSceneOpenGL.so
#17 0x00007f9966da9139 in  () at /usr/lib/qt/plugins/org.kde.kwin.scenes/KWinSceneOpenGL.so
#18 0x00007f99863f0e9b in QObjectPrivate::deleteChildren() () at /usr/lib/libQt5Core.so.5
#19 0x00007f99863f9e05 in QObject::~QObject() () at /usr/lib/libQt5Core.so.5
#20 0x00007f99879a8f1a in KWin::Toplevel::~Toplevel() () at /usr/lib/libkwin.so.5
#21 0x00007f99879bfef3 in KWin::Deleted::~Deleted() () at /usr/lib/libkwin.so.5
#22 0x00007f99879c00fa in KWin::Deleted::~Deleted() () at /usr/lib/libkwin.so.5
#23 0x00007f99879a7ebb in  () at /usr/lib/libkwin.so.5
#24 0x00007f99879a82ed in KWin::Compositor::suspend(KWin::Compositor::SuspendReason) () at /usr/lib/libkwin.so.5
#25 0x00007f99863f3832 in QObject::event(QEvent*) () at /usr/lib/libQt5Core.so.5
#26 0x00007f9986d43e14 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#27 0x00007f9986d4b6e1 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#28 0x00007f99863c9119 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#29 0x00007f99863cc1ac in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/libQt5Core.so.5
#30 0x00007f99864196dd in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#31 0x00007f99788b35ce in  () at /usr/lib/libQt5XcbQpa.so.5
#32 0x00007f99863c7dac in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#33 0x00007f99863d00a6 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
#34 0x00007f9987f0eb56 in kdemain () at /usr/lib/libkdeinit5_kwin_x11.so
#35 0x00007f9987d66223 in __libc_start_main () at /usr/lib/libc.so.6
#36 0x000055e365b7575a in _start ()

Reported using DrKonqi
Comment 1 David Edmundson 2018-09-27 09:06:16 UTC
*** Bug 397797 has been marked as a duplicate of this bug. ***
Comment 2 David Edmundson 2018-09-27 09:07:07 UTC
*** Bug 398992 has been marked as a duplicate of this bug. ***
Comment 3 Dragoon Aethis 2018-10-17 17:58:05 UTC
I'm happy to report I've found a reliable workaround - after building libepoxy and kwin with debug symbols, the issue stopped reproducing. (Usually crashed about 50% of the time when leaving mpv, now after mashing the fullscreen button for about 2 minutes, not a single crash occured). Installing normal libepoxy w/o debug symbols still makes everything just work. So, fun stuff.
Comment 4 David Edmundson 2018-10-22 14:01:13 UTC

*** This bug has been marked as a duplicate of bug 398018 ***
Comment 5 David Edmundson 2018-10-22 14:14:30 UTC
>I'm happy to report I've found a reliable workaround - after building libepoxy and kwin with debug symbols

Conversely, I just rebuilt kwin in release mode and finally reproduced this crash! Thanks for the observation, it will help a lot
Comment 6 David Edmundson 2018-10-22 22:20:54 UTC
Unhelpful notes from today's investigation:
 - it also doesn't crash if GDB is attached

 - ASAN (address or memory sanitizers) don't print anything useful
Comment 7 David Edmundson 2018-10-22 22:56:39 UTC
Extra twist:
 - with my own built libepoxy (At the same version as my system!) it doesn't crash. Changing from system to my version without recompiling kwin will trigger/fix the crash.