Summary: | Restart of KWin fails due to OpenGL safepoint thread running | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | tesfabpel |
Component: | platform-x11-standalone | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | commander.alchemy |
Priority: | NOR | Keywords: | drkonqi |
Version: | 5.10.3 | Flags: | mgraesslin:
Wayland-
mgraesslin: X11+ mgraesslin: ReviewRequest+ |
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
URL: | https://phabricator.kde.org/D6735 | ||
Latest Commit: | https://commits.kde.org/kwin/06a558e3de658f300b295beac7c4adc4f08227f5 | Version Fixed In: | 5.10.4 |
Description
tesfabpel
2017-07-12 17:24:16 UTC
As always backtraces from Arch are useless. I know but this time drkonqi said that backtraces were useful and gave 3 stars so I tried... :( I will try again after recompiling with debug symbols... Here's the new backtrace (this time when opening Unreal Tournament 4), I hope it's useful: Application: KWin (kwin_x11), signal: Aborted Using host libthread_db library "/usr/lib/libthread_db.so.1". [Current thread is 1 (Thread 0x7f66b8ba4840 (LWP 12181))] Thread 4 (Thread 0x7f66975ef700 (LWP 13859)): #0 0x00007f66b864f326 in ppoll () at /usr/lib/libc.so.6 #1 0x00007f66b5c753f1 in qt_ppoll (timeout_ts=0x0, nfds=1, fds=0x7f668c015338) at kernel/qcore_unix.cpp:81 #2 0x00007f66b5c753f1 in qt_safe_poll(pollfd*, unsigned long, timespec const*) (fds=0x7f668c015338, nfds=1, timeout_ts=timeout_ts@entry=0x0) at kernel/qcore_unix.cpp:102 #3 0x00007f66b5c76b0e in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=<optimized out>, flags=...) at kernel/qeventdispatcher_unix.cpp:500 #4 0x00007f66b5c1e34a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7f66975eed70, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212 #5 0x00007f66b5a39bea in QThread::exec() (this=<optimized out>) at thread/qthread.cpp:515 #6 0x00007f66b5a3e82d in QThreadPrivate::start(void*) (arg=0x1ac7640) at thread/qthread_unix.cpp:368 #7 0x00007f66b1802297 in start_thread () at /usr/lib/libpthread.so.0 #8 0x00007f66b86591ef in clone () at /usr/lib/libc.so.6 Thread 3 (Thread 0x7f66892db700 (LWP 12447)): #0 0x00007f66b180839d in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0 #1 0x00007f66b4b96b04 in () at /usr/lib/libQt5Script.so.5 #2 0x00007f66b4b96b49 in () at /usr/lib/libQt5Script.so.5 #3 0x00007f66b1802297 in start_thread () at /usr/lib/libpthread.so.0 #4 0x00007f66b86591ef in clone () at /usr/lib/libc.so.6 Thread 2 (Thread 0x7f669ce86700 (LWP 12288)): #0 0x00007f66b864f326 in ppoll () at /usr/lib/libc.so.6 #1 0x00007f66b5c753f1 in qt_ppoll (timeout_ts=0x0, nfds=1, fds=0x7f669000ad68) at kernel/qcore_unix.cpp:81 #2 0x00007f66b5c753f1 in qt_safe_poll(pollfd*, unsigned long, timespec const*) (fds=0x7f669000ad68, nfds=1, timeout_ts=timeout_ts@entry=0x0) at kernel/qcore_unix.cpp:102 #3 0x00007f66b5c76b0e in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=<optimized out>, flags=...) at kernel/qeventdispatcher_unix.cpp:500 #4 0x00007f66b5c1e34a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7f669ce85d40, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212 #5 0x00007f66b5a39bea in QThread::exec() (this=this@entry=0x7f66af937d60 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread.cpp:515 #6 0x00007f66af6c3d45 in QDBusConnectionManager::run() (this=0x7f66af937d60 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at qdbusconnection.cpp:178 #7 0x00007f66b5a3e82d in QThreadPrivate::start(void*) (arg=0x7f66af937d60 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:368 #8 0x00007f66b1802297 in start_thread () at /usr/lib/libpthread.so.0 #9 0x00007f66b86591ef in clone () at /usr/lib/libc.so.6 Thread 1 (Thread 0x7f66b8ba4840 (LWP 12181)): [KCrash Handler] #5 0x00007f66b859f670 in raise () at /usr/lib/libc.so.6 #6 0x00007f66b85a0d00 in abort () at /usr/lib/libc.so.6 #7 0x00007f66b5a2959f in qt_message_fatal (context=..., message=<synthetic pointer>...) at global/qlogging.cpp:1690 #8 0x00007f66b5a2959f in QMessageLogger::fatal(char const*, ...) const (this=this@entry=0x7fff0f2db710, msg=msg@entry=0x7f66b5ccd078 "QThread: Destroyed while thread is still running") at global/qlogging.cpp:796 #9 0x00007f66b5a38afd in QThread::~QThread() (this=0x1ac7640, __in_chrg=<optimized out>) at thread/qthread.cpp:429 #10 0x00007f66b5a38b59 in QThread::~QThread() (this=0x1ac7640, __in_chrg=<optimized out>) at thread/qthread.cpp:433 #11 0x00007f66b5c4cf7b in QObjectPrivate::deleteChildren() (this=this@entry=0x1903820) at kernel/qobject.cpp:1992 #12 0x00007f66b5c56b2b in QObject::~QObject() (this=<optimized out>, __in_chrg=<optimized out>) at kernel/qobject.cpp:1022 #13 0x00007f669c4612d9 in KWin::X11StandalonePlatform::~X11StandalonePlatform() (this=0x1904070, __in_chrg=<optimized out>) at /mnt/CommonExtraLinuxFiles/tmp/gnao/kwin/src/kwin-5.10.3.1/plugins/platforms/x11/standalone/x11_platform.h:33 #14 0x00007f66b5c4cf7b in QObjectPrivate::deleteChildren() (this=this@entry=0x18722d0) at kernel/qobject.cpp:1992 #15 0x00007f66b5c56b2b in QObject::~QObject() (this=<optimized out>, __in_chrg=<optimized out>) at kernel/qobject.cpp:1022 #16 0x00007f66b5c21fb6 in QCoreApplication::~QCoreApplication() (this=0x7fff0f2dbae0, __in_chrg=<optimized out>) at kernel/qcoreapplication.cpp:851 #17 0x00007f66b693ee99 in QApplication::~QApplication() (this=0x7fff0f2dbae0, __in_chrg=<optimized out>) at kernel/qapplication.cpp:795 #18 0x00007f66b89187a3 in KWin::ApplicationX11::~ApplicationX11() (this=0x7fff0f2dbae0, __in_chrg=<optimized out>) at /mnt/CommonExtraLinuxFiles/tmp/gnao/kwin/src/kwin-5.10.3.1/main_x11.cpp:187 #19 0x00007f66b891a089 in kdemain(int, char**) (argc=<optimized out>, argv=0x7fff0f2dbc78) at /mnt/CommonExtraLinuxFiles/tmp/gnao/kwin/src/kwin-5.10.3.1/main_x11.cpp:411 #20 0x00007f66b858c43a in __libc_start_main () at /usr/lib/libc.so.6 #21 0x00000000004006ea in _start () it's a crash when KWin exits. Are the games trying to quit KWin? Seems strange though... I noticed these things: - Just after login, if I open Chrome right away, kwin may crash. - If I open UT4, kwin may crash. - If I relaunch Kwin using ALT+F2 -> `kwin_x11 --replace &` it crashes less often (or never). Could it be that the first instance of kwin has something weird that new ones haven't? - When Kwin crashes, a notification appears and says (more or less): "Desktop effects are broken and they will be restarted". But then, nothing happens. - With a previous version, when this happened, desktop effects restarted correctly (this is why I decided to open this bug). Could it be caused by a creation of a OpenGL context (don't know about Vulkan)? By the way, I suspect the culprit here is the NVIDIA proprietary driver, but kwin should still handle it correctly... Are you using an NVIDIA card? If yes are you on KWin 5.10.3.1 or 5.10.3? Yes, I'm using an NVIDIA EVGA GTX 970 SSC (driver version: 381.22). kwin 5.10.3.1 I'm starting to get an idea. The compositor breaks in the NVIDIA driver and we try to restart the complete window manager. This fails due to a thread running in the X11 platform *** Bug 382385 has been marked as a duplicate of this bug. *** I do not really understand why KWin is being shut down. We used to have code which restarted into XRender, but that seems to be gone. So I don't understand why KWin gets closed. Patch for the abort at: https://phabricator.kde.org/D6735 If you have in addition any idea why KWin gets terminated, please let me know. If possible check .xsession-errors whether we have a message there. Git commit 06a558e3de658f300b295beac7c4adc4f08227f5 by Martin Flöser. Committed on 16/07/2017 at 16:04. Pushed by graesslin into branch 'Plasma/5.10'. [platforms/x11] Quit the OpenGL Freeze protection thread on shutdown Summary: Weird NVIDIA behavior fixup part 2. Now that we do no longer freeze when NVIDIA decides to create an OpenGL error on startup (aefb5f4dd9d41aa7377d56ece203089c73aefe07), we experience a new issue. KWin is terminating (no idea why, [1]) and at the same time the OpenGL freeze protection thread is still running. So far we did not terminate the thread on shutdown and thus we hit an abort in Qt. This change ensures that we properly terminate the thread on shutdown. [1] My current theory is that games terminate KWin, common pattern of bug reports is "steam". FIXED-IN: 5.10.4 Test Plan: Tortured KWin by making sure I go through the code path, saw the abort without the patch, no more abort with the patch Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D6735 M +8 -1 plugins/platforms/x11/standalone/x11_platform.cpp https://commits.kde.org/kwin/06a558e3de658f300b295beac7c4adc4f08227f5 Thanks a lot! I've applied the patch and tried a little bit and it is still running without a crash. |