Bug 354972 - kwin crashes randomly.
Summary: kwin crashes randomly.
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: aurorae (show other bugs)
Version: 5.4.2
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: drkonqi
: 368726 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-11-07 01:51 UTC by Adam Shrader
Modified: 2016-09-13 05:58 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
thomas.luebking: NVIDIA+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Shrader 2015-11-07 01:51:43 UTC
Application: kwin_x11 (5.4.2)

Qt Version: 5.5.1
Operating System: Linux 4.2.4-1-default x86_64
Distribution: "openSUSE Tumbleweed (20151030) (x86_64)"

-- Information about the crash:
kwin is randomly crashing on me. I am using the binary NVIDIA driver. My compositor setting are scale method: Smooth, Rendering backend: OpenGL 3.1, OpenGL interface: GLX, Tearing prevention ("vsync"): Automatic, Keep window thumbnails: Only for Shown Windows, and Enable color correction is enabled (though I do not know how that got enabled). This crash seems to occur more frequently when I start applications from the launchers on the bottom panel.

My distribution is OpenSUSE Tumbleweed and I am using the most recent versions of KDE and Qt available( KDE Plasma: 5.4.2 and Qt: 5.5.1).

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 0x7f8544d4c940 (LWP 16291))]

Thread 3 (Thread 0x7f852aa1c700 (LWP 16292)):
#0  0x00007f85444b51cd in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007f854206b432 in _xcb_conn_wait (__timeout=-1, __nfds=1, __fds=0x7f852aa1bb80) at /usr/include/bits/poll2.h:46
#2  0x00007f854206b432 in _xcb_conn_wait (c=c@entry=0x1e69620, cond=cond@entry=0x1e69660, vector=vector@entry=0x0, count=count@entry=0x0) at xcb_conn.c:459
#3  0x00007f854206d007 in xcb_wait_for_event (c=0x1e69620) at xcb_in.c:693
#4  0x00007f852b8fbe29 in QXcbEventReader::run() (this=0x1e75980) at qxcbconnection.cpp:1229
#5  0x00007f854232a94f in QThreadPrivate::start(void*) (arg=0x1e75980) at thread/qthread_unix.cpp:331
#6  0x00007f85447804a4 in start_thread (arg=0x7f852aa1c700) at pthread_create.c:334
#7  0x00007f85444bdb5d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 2 (Thread 0x7f8523fff700 (LWP 16295)):
#0  0x00007f85444b6843 in select () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007f854254ae3f in qt_safe_select(int, fd_set*, fd_set*, fd_set*, timespec const*) (nfds=11, fdread=fdread@entry=0x7f8518000a98, fdwrite=fdwrite@entry=0x7f8518000d28, fdexcept=fdexcept@entry=0x7f8518000fb8, orig_timeout=orig_timeout@entry=0x0) at kernel/qcore_unix.cpp:75
#2  0x00007f854254c81b in QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timespec*) (timeout=0x0, exceptfds=0x7f8518000fb8, writefds=0x7f8518000d28, readfds=0x7f8518000a98, nfds=<optimized out>, this=0x7f85180008e0) at kernel/qeventdispatcher_unix.cpp:320
#3  0x00007f854254c81b in QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timespec*) (this=this@entry=0x7f8518000900, flags=..., flags@entry=..., timeout=timeout@entry=0x0) at kernel/qeventdispatcher_unix.cpp:196
#4  0x00007f854254cd16 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7f85180008e0, flags=...) at kernel/qeventdispatcher_unix.cpp:607
#5  0x00007f85424f963a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7f8523ffec70, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#6  0x00007f8542325b1c in QThread::exec() (this=this@entry=0x1fae4f0) at thread/qthread.cpp:503
#7  0x00007f853c66a9a5 in QQmlThreadPrivate::run() (this=0x1fae4f0) at /usr/src/debug/qtdeclarative-opensource-src-5.5.1/src/qml/qml/ftw/qqmlthread.cpp:141
#8  0x00007f854232a94f in QThreadPrivate::start(void*) (arg=0x1fae4f0) at thread/qthread_unix.cpp:331
#9  0x00007f85447804a4 in start_thread (arg=0x7f8523fff700) at pthread_create.c:334
#10 0x00007f85444bdb5d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7f8544d4c940 (LWP 16291)):
[KCrash Handler]
#6  0x00007f854446f74d in __strstr_sse2_unaligned () at ../sysdeps/x86_64/multiarch/strstr-sse2-unaligned.S:40
#7  0x00007f853cd29e8a in QSGRenderContext::initialize(QOpenGLContext*) (__needle=0x7f853cebbe34 "nouveau", __haystack=<optimized out>) at /usr/include/string.h:332
#8  0x00007f853cd29e8a in QSGRenderContext::initialize(QOpenGLContext*) (this=0x2112690, context=<optimized out>) at /usr/src/debug/qtdeclarative-opensource-src-5.5.1/src/quick/scenegraph/qsgcontext.cpp:659
#9  0x00007f853ce4a2a8 in QQuickRenderControl::initialize(QOpenGLContext*) (this=<optimized out>, gl=0x210d1c0) at /usr/src/debug/qtdeclarative-opensource-src-5.5.1/src/quick/items/qquickrendercontrol.cpp:217
#10 0x00007f85289b08f8 in Aurorae::Decoration::init() (this=0x1f585d0) at /usr/src/debug/kwin-5.4.2/clients/aurorae/src/aurorae.cpp:383
#11 0x00007f85440ff170 in KWin::Decoration::DecorationBridge::createDecoration(KWin::Client*) (this=0x1eee7d0, client=client@entry=0x228e060) at /usr/src/debug/kwin-5.4.2/decorations/decorationbridge.cpp:213
#12 0x00007f8543fe9529 in KWin::Client::createDecoration(QRect const&) (this=this@entry=0x228e060, oldgeom=...) at /usr/src/debug/kwin-5.4.2/client.cpp:409
#13 0x00007f8543ff3291 in KWin::Client::updateDecoration(bool, bool) (this=this@entry=0x228e060, check_workspace_pos=check_workspace_pos@entry=false, force=force@entry=false) at /usr/src/debug/kwin-5.4.2/client.cpp:396
#14 0x00007f854403edba in KWin::Client::manage(unsigned int, bool) (this=this@entry=0x228e060, w=w@entry=92274689, isMapped=isMapped@entry=true) at /usr/src/debug/kwin-5.4.2/manage.cpp:385
#15 0x00007f8543fdaf7f in KWin::Workspace::createClient(unsigned int, bool) (this=this@entry=0x1ed7220, w=92274689, is_mapped=is_mapped@entry=true) at /usr/src/debug/kwin-5.4.2/workspace.cpp:485
#16 0x00007f8543fde657 in KWin::Workspace::init() (this=this@entry=0x1ed7220) at /usr/src/debug/kwin-5.4.2/workspace.cpp:337
#17 0x00007f8543fdf53b in KWin::Workspace::Workspace(QString const&) (this=0x1ed7220, sessionKey=...) at /usr/src/debug/kwin-5.4.2/workspace.cpp:223
#18 0x00007f8544018230 in KWin::Application::createWorkspace() (this=this@entry=0x7ffe7693e5e0) at /usr/src/debug/kwin-5.4.2/main.cpp:373
#19 0x00007f854499a389 in QtPrivate::QFunctorSlotObject<KWin::ApplicationX11::performStartup()::<lambda()>, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (__closure=<synthetic pointer>) at /usr/src/debug/kwin-5.4.2/main_x11.cpp:178
#20 0x00007f854499a389 in QtPrivate::QFunctorSlotObject<KWin::ApplicationX11::performStartup()::<lambda()>, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (arg=<optimized out>, f=...) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:495
#21 0x00007f854499a389 in QtPrivate::QFunctorSlotObject<KWin::ApplicationX11::performStartup()::<lambda()>, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (arg=<optimized out>, f=...) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:552
#22 0x00007f854499a389 in QtPrivate::QFunctorSlotObject<KWin::ApplicationX11::performStartup()::<lambda()>, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=<optimized out>, this_=<optimized out>, r=<optimized out>, a=<optimized out>, ret=<optimized out>) at /usr/include/qt5/QtCore/qobject_impl.h:192
#23 0x00007f8542528e17 in QMetaObject::activate(QObject*, int, int, void**) (a=0x7ffe7693ded0, r=0x1ea2c40, this=<optimized out>) at ../../src/corelib/kernel/qobject_impl.h:124
#24 0x00007f8542528e17 in QMetaObject::activate(QObject*, int, int, void**) (sender=0x1ea2c40, signalOffset=<optimized out>, local_signal_index=<optimized out>, argv=<optimized out>) at kernel/qobject.cpp:3698
#25 0x00007f8543b13d4b in KSelectionOwner::Private::claimSucceeded() () at /usr/lib64/libKF5WindowSystem.so.5
#26 0x00007f8543b1445c in KSelectionOwner::filterEvent(void*) () at /usr/lib64/libKF5WindowSystem.so.5
#27 0x00007f85424f887f in QAbstractEventDispatcher::filterNativeEvent(QByteArray const&, void*, long*) (this=<optimized out>, eventType=..., message=message@entry=0x7f8524001420, result=result@entry=0x7ffe7693e038) at kernel/qabstracteventdispatcher.cpp:460
#28 0x00007f852b8ff804 in QXcbConnection::handleXcbEvent(xcb_generic_event_t*) (this=this@entry=0x1e67e80, event=event@entry=0x7f8524001420) at qxcbconnection.cpp:1020
#29 0x00007f852b90058b in QXcbConnection::processXcbEvents() (this=0x1e67e80) at qxcbconnection.cpp:1504
#30 0x00007f8542529d79 in QObject::event(QEvent*) (this=0x1e67e80, e=<optimized out>) at kernel/qobject.cpp:1239
#31 0x00007f85431df8cc in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=this@entry=0x1e55800, receiver=receiver@entry=0x1e67e80, e=e@entry=0x7f8524001500) at kernel/qapplication.cpp:3716
#32 0x00007f85431e49d6 in QApplication::notify(QObject*, QEvent*) (this=0x7ffe7693e5e0, receiver=0x1e67e80, e=0x7f8524001500) at kernel/qapplication.cpp:3499
#33 0x00007f85424fbcf3 in QCoreApplication::notifyInternal(QObject*, QEvent*) (this=0x7ffe7693e5e0, receiver=0x1e67e80, event=event@entry=0x7f8524001500) at kernel/qcoreapplication.cpp:965
#34 0x00007f85424fe016 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (event=0x7f8524001500, receiver=<optimized out>) at kernel/qcoreapplication.h:224
#35 0x00007f85424fe016 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x1e45b90) at kernel/qcoreapplication.cpp:1593
#36 0x00007f854254cbe2 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x1e943e0, flags=flags@entry=...) at kernel/qeventdispatcher_unix.cpp:579
#37 0x00007f852b95f6bd in QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=<optimized out>, flags=...) at eventdispatchers/qunixeventdispatcher.cpp:62
#38 0x00007f85424f963a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7ffe7693e510, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#39 0x00007f85425012fd in QCoreApplication::exec() () at kernel/qcoreapplication.cpp:1229
#40 0x00007f8542a3753c in QGuiApplication::exec() () at kernel/qguiapplication.cpp:1527
#41 0x00007f85431dbf75 in QApplication::exec() () at kernel/qapplication.cpp:2976
#42 0x00007f854499b804 in kdemain(int, char**) (argc=2, argv=0x7ffe7693e748) at /usr/src/debug/kwin-5.4.2/main_x11.cpp:303
#43 0x00007f85443f4610 in __libc_start_main (main=0x400840 <main(int, char**)>, argc=2, argv=0x7ffe7693e748, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffe7693e738) at libc-start.c:289
#44 0x0000000000400879 in _start () at ../sysdeps/x86_64/start.S:118

Reported using DrKonqi
Comment 1 Thomas Lübking 2015-11-07 08:49:42 UTC
Crash in QtQuick, "kcmshell5 kwindecoration", select the breeze deco.

See the other bug, happens in random QML users, seems to be related to

const char *vendor = (const char *) funcs->glGetString(GL_VENDOR);
if (strstr(vendor, "nouveau")) // vendor is 0x0

and smells related to the nvidia blob.
Please check whether 
=> does this also happen if you use OpenGL 2.0?

Another thing you might what to check is
ldd /usr/lib/qt/plugins/org.kde.kdecoration2/kwin5_aurorae.so | grep GL
vs.
ldd /usr/lib/libkwinglutils.so | grep GL
(and whether one resolves to the nvidia lib and the other one to a MESA one)
Comment 2 Adam Shrader 2015-11-09 03:42:36 UTC
I can try using OpenGL 2.0 but the usually have screen tearing if I don't have the compositor set to OpenGL 3.1.

Here is the result of two commands:
ldd /usr/lib64/qt5/plugins/org.kde.kdecoration2/kwin5_aurorae.so | grep GL
libGL.so.1 => /usr/lib64/libGL.so.1 (0x00007f465e090000)

ldd /usr/lib64/libkwinglutils.so.6 | grep GL
libGL.so.1 => /usr/lib64/libGL.so.1 (0x00007f87e0b3f000)

It looks like they point to the same file so I do not think there is a NVIDIA and MESA mix up.
Comment 3 Thomas Lübking 2015-11-09 06:49:52 UTC
> I can try using OpenGL 2.0 but the usually have screen tearing if I don't have the compositor set to OpenGL 3.1.

Hardly.
But swapcontrol is disabled on doublebuffering w/o setting __GL_YIELD="USLEEP" (unless the compositor is restarted, but that's a bug)
For "recent" (352.x and up a least) drivers you can run "KWIN_TRIPLE_BUFFER=1 kwin_x11 --replace &" to make kwin believe you're triple buffering, the driver manages to not block on double bufferend sync swaps *at the moment*

Notice that this will not crash w/o the aurorae deco engine being used.
Comment 4 Martin Flöser 2016-09-02 12:10:42 UTC
Marking bug as upstream as it's a crash in QtQuick.
Comment 5 Martin Flöser 2016-09-13 05:58:38 UTC
*** Bug 368726 has been marked as a duplicate of this bug. ***