Summary: | Plasma crashes when I click the button to open the apps launcher a few times in sequence | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | Patrick Silva <bugseforuns> |
Component: | generic-wayland | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | RESOLVED UPSTREAM | ||
Severity: | crash | CC: | a.saoutkin, adiw206, benklop, bernie, bojescu.mihai, doaxan77, finn.olm, ifjkisstamas, jc, johnypean, kde-bugs.9ek5t, kde, loic.grobol, lolitbis, luislezcair, matt.fagnani, nate, notaraptor, oanonymos0, orgo_89, pyro4hell, roscaalex19, senemux, teratorn, z.mozharic |
Priority: | NOR | ||
Version: | 5.16.0 | ||
Target Milestone: | 1.0 | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
URL: | https://codereview.qt-project.org/c/qt/qtwayland/+/265998 | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | trace of plasmashell segmentation fault in Plasma 5.15.5 on Wayland with Qt 5.12.4 |
Description
Patrick Silva
2019-06-17 18:56:12 UTC
Also reproducible on Neon unstable edition. Operating System: KDE neon Unstable Edition KDE Plasma Version: 5.16.80 KDE Frameworks Version: 5.60.0 Qt Version: 5.12.3 I can reproduce this by hitting the Super key a few times. Operating System: Arch Linux KDE Plasma Version: 5.16.0 KDE Frameworks Version: 5.59.0 Qt Version: 5.13.0rc3-1 Created attachment 121068 [details] trace of plasmashell segmentation fault in Plasma 5.15.5 on Wayland with Qt 5.12.4 I saw segmentation faults of plasmashell in wl_proxy_marshal_constructor at wayland-client.c:819 when starting Plasma 5.15.5 on Wayland in Fedora 30. These crashes occurred on startup of one session, and three times in another session. These crashes started right after I updated from Qt 5.12.1 to 5.12.4 from koji along with the dependent Plasma and KF5 rebuilds. drkonqi wouldn't allow me to submit the attached trace which had the following segmentation fault and crashing thread. Application: Plasma (plasmashell), signal: Segmentation fault Using host libthread_db library "/lib64/libthread_db.so.1". futex_wait_cancelable (private=0, expected=0, futex_word=0x564abb0ba9b0) at ../sysdeps/unix/sysv/linux/futex-internal.h:88 88 int err = lll_futex_timed_wait (futex_word, expected, NULL, private); [Current thread is 1 (Thread 0x7f5298ae7d00 (LWP 1518))] Thread 23 (Thread 0x7f522cff7700 (LWP 1744)): [KCrash Handler] #6 wl_proxy_marshal_constructor (proxy=0x0, opcode=opcode@entry=3, interface=0x7f5296fb8980 <wl_callback_interface>) at src/wayland-client.c:819 #7 0x00007f52867430ed in wl_surface_frame (wl_surface=<optimized out>) at ../../include/QtWaylandClient/5.12.4/QtWaylandClient/private/../../../../../src/client/wayland-wayland-client-protocol.h:2798 #8 QtWayland::wl_surface::frame (this=this@entry=0x564aba0561a8) at qwayland-wayland.cpp:1134 #9 0x00007f52867203ab in QtWaylandClient::QWaylandWindow::handleUpdate (this=0x564aba056180) at qwaylandwindow.cpp:1151 #10 0x00007f527f9a2f04 in QtWaylandClient::QWaylandGLContext::swapBuffers (this=0x564aba8448a0, surface=<optimized out>) at ../../../../hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp:568 #11 0x00007f5297ac4441 in QOpenGLContext::swapBuffers (this=0x564ab9f4dc10, surface=<optimized out>) at kernel/qopenglcontext.cpp:1115 #12 0x00007f52992e3401 in QSGRenderThread::syncAndRender (this=this@entry=0x7f524801db40) at scenegraph/qsgthreadedrenderloop.cpp:652 #13 0x00007f52992e7168 in QSGRenderThread::run (this=0x7f524801db40) at scenegraph/qsgthreadedrenderloop.cpp:730 #14 0x00007f529750e786 in QThreadPrivate::start (arg=0x7f524801db40) at thread/qthread_unix.cpp:361 #15 0x00007f52969715a2 in start_thread (arg=<optimized out>) at pthread_create.c:486 #16 0x00007f5297184303 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 I think the segmentation fault might've been due to a null pointer dereference since proxy=0x0 in the wl_proxy_marshal_constructor call, and proxy was dereferenced at wayland-client.c:820 in proxy->object.interface->methods[opcode].signature The wl_proxy_marshal_constructor function was as follows 812 WL_EXPORT struct wl_proxy * 813 wl_proxy_marshal_constructor(struct wl_proxy *proxy, uint32_t opcode, 814 const struct wl_interface *interface, ...) 815 { 816 union wl_argument args[WL_CLOSURE_MAX_ARGS]; 817 va_list ap; 818 819 va_start(ap, interface); 820 wl_argument_from_va_list(proxy->object.interface->methods[opcode].signature, 821 args, WL_CLOSURE_MAX_ARGS, ap); 822 va_end(ap); 823 824 return wl_proxy_marshal_array_constructor(proxy, opcode, 825 args, interface); 826 } Functions from qt5-qtwayland at #8-10 and qt5-qtdeclarative lower in the crashing thread might be involved. I've seen a similar segmentation fault in plasmashell with qt 5.12.4 with a different trace which I might make another report for. SOFTWARE/OS VERSIONS Operating System: Fedora 30, 5.1.12 kernel KDE Plasma Version: 5.15.5 KDE Frameworks Version: 5.59.0 Qt Version: 5.12.4 kf5-kwayland-0:5.59.0-2.fc30.x86_64 libwayland-client-0:1.17.0-1.fc30.x86_64 plasma-workspace-0:5.15.5-1.fc30.x86_64 qt5-qtwayland-0:5.12.4-1.fc30.x86_64 The following reports have plasmashell crashes with Qt 5.12.4 with similar traces: https://bugs.kde.org/show_bug.cgi?id=408969 https://bugs.kde.org/show_bug.cgi?id=408973 https://bugs.kde.org/show_bug.cgi?id=409014 *** Bug 409014 has been marked as a duplicate of this bug. *** Fixed https://codereview.qt-project.org/c/qt/qtwayland/+/265998 Please test *** Bug 408969 has been marked as a duplicate of this bug. *** *** Bug 408973 has been marked as a duplicate of this bug. *** *** Bug 409050 has been marked as a duplicate of this bug. *** Is similar code needed also for QtWaylandClient::QWaylandAbstractDecoration::contentImage() in addition to QtWaylandClient::QWaylandWindow::handleUpdate()? See https://bugs.kde.org/buglist.cgi?bug_severity=crash&resolution=---&chfieldfrom=90d&longdesc=QtWaylandClient::QWaylandAbstractDecoration::contentImage&longdesc_type=allwordssubstr >QtWaylandClient::QWaylandAbstractDecoration::contentImage() I don't think so, it's in the main thread so a different issue. Though the fact that we're in deco drawing code is already a sign of something weird. Possibly fixed by https://codereview.qt-project.org/c/qt/qtwayland/+/262587 ? I requested that David's patch in comment 5 be backported to Qt 5.12.4 in Fedora 30 at https://bugzilla.redhat.com/show_bug.cgi?id=1723017 Jan Grulich added four patches to qt5-qtwayland-5.12.4-2 which didn't appear to include that patch https://src.fedoraproject.org/rpms/qt5-qtwayland/c/287f373520b3c3864a822304fac2b2c2f358ac8a?branch=f30 I've seen the segmentation faults in wl_proxy_marshal_constructor about nine times with qt5-qtwayland-5.12.4-2. Sometimes the desktop colors became grayscale before the crash. plasmashell usually restarted, but I had to start plasmashell from konsole at least three times. I tried to apply David's patch to the Fedora qt5-qtwayland repo I cloned, but I got errors with applying part of the patch as follows. fedpkg --release f30 local ... + /usr/bin/cat /programs/qt/qt5-qtwayland/qtwayland.git-f06a5acd63105b09e5e77de534e5389fdd1dcb20.patch + /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch 1 out of 4 hunks FAILED -- saving rejects to file src/client/qwaylandwindow.cpp.rej error: Bad exit status from /var/tmp/rpm-tmp.RzO7c4 (%prep) Bad exit status from /var/tmp/rpm-tmp.RzO7c4 (%prep) RPM build errors: Could not execute local: rpmbuild --define '_sourcedir /programs/qt/qt5-qtwayland' --define '_specdir /programs/qt/qt5-qtwayland' --define '_builddir /programs/qt/qt5-qtwayland' --define '_srcrpmdir /programs/qt/qt5-qtwayland' --define '_rpmdir /programs/qt/qt5-qtwayland' --define 'dist %{?distprefix}.fc30' --define 'fedora 30' --eval '%undefine rhel' --define 'fc30 1' -ba /programs/qt/qt5-qtwayland/qt5-qtwayland.spec | tee .build-5.12.4-5.fc30.log The part of the patch with the error in src/client/qwaylandwindow.cpp.rej was --- src/client/qwaylandwindow.cpp +++ src/client/qwaylandwindow.cpp @@ -201,6 +203,7 @@ void QWaylandWindow::initWindow() void QWaylandWindow::initializeWlSurface() { + QWriteLocker lock(&mSurfaceLock); init(mDisplay->createSurface(static_cast<QtWayland::wl_surface *>(this))); } Could that patch be backported to Qt 5.12? Thanks. *** Bug 409567 has been marked as a duplicate of this bug. *** *** Bug 410060 has been marked as a duplicate of this bug. *** *** Bug 410359 has been marked as a duplicate of this bug. *** *** Bug 410579 has been marked as a duplicate of this bug. *** *** Bug 411087 has been marked as a duplicate of this bug. *** *** Bug 410944 has been marked as a duplicate of this bug. *** See also https://codereview.qt-project.org/c/qt/qtwayland/+/267381 for Qt 5.12. We still get many duplicates, even with Qt 5.13.1. https://bugs.kde.org/buglist.cgi?bug_severity=crash&longdesc=QtWaylandClient%3A%3AQWaylandWindow%3A%3AhandleUpdate%205.13.1&longdesc_type=allwordssubstr&query_format=advanced&chfieldfrom=180d&list_id=1678744 Fix is not in 5.13.1 git tag --contains 5d43a686fc3d5f13087a61e8ef216ecbbae0d15e v5.12.5 v5.13.2 v5.14.0-alpha1 v5.14.0-beta1 v5.14.0-beta2 *** Bug 412036 has been marked as a duplicate of this bug. *** *** Bug 412177 has been marked as a duplicate of this bug. *** *** Bug 412241 has been marked as a duplicate of this bug. *** *** Bug 412843 has been marked as a duplicate of this bug. *** *** Bug 412877 has been marked as a duplicate of this bug. *** *** Bug 413114 has been marked as a duplicate of this bug. *** *** Bug 413190 has been marked as a duplicate of this bug. *** *** Bug 413412 has been marked as a duplicate of this bug. *** *** Bug 413512 has been marked as a duplicate of this bug. *** *** Bug 413455 has been marked as a duplicate of this bug. *** *** Bug 413630 has been marked as a duplicate of this bug. *** *** Bug 413770 has been marked as a duplicate of this bug. *** *** Bug 414419 has been marked as a duplicate of this bug. *** *** Bug 414941 has been marked as a duplicate of this bug. *** *** Bug 418090 has been marked as a duplicate of this bug. *** |