Bug 381630 - Crash in wl_proxy_create_wrapper in QtWayland after window destruction
Summary: Crash in wl_proxy_create_wrapper in QtWayland after window destruction
Status: RESOLVED UPSTREAM
Alias: None
Product: plasmashell
Classification: Plasma
Component: generic-wayland (show other bugs)
Version: 5.10.2
Platform: Arch Linux Linux
: NOR crash
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL: https://bugreports.qt.io/browse/QTBUG...
Keywords:
: 381395 382004 383482 383507 383573 383881 383921 384074 384636 384680 384692 384719 384728 385042 385121 385271 385560 385625 385652 385664 385681 385738 385741 385805 385811 385826 385927 386091 386259 386280 386303 386446 386534 386557 386583 386626 386639 386661 386892 386994 387274 387287 387419 387465 387620 387760 387826 387875 387964 387986 388344 388376 388474 388783 388821 388970 388992 389050 389063 389126 389149 389314 389841 389979 389985 390535 390807 390958 391443 391672 391852 392634 392921 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-06-25 04:09 UTC by Kishore Gopalakrishnan
Modified: 2018-08-15 22:18 UTC (History)
72 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Bactrace of the crash (11.55 KB, text/plain)
2017-06-25 04:09 UTC, Kishore Gopalakrishnan
Details
Workaround patch for qtwayland 5.9.1 (1.25 KB, patch)
2017-09-14 07:15 UTC, Fabian Vogt
Details
New crash information added by DrKonqi (18.07 KB, text/plain)
2017-10-22 12:11 UTC, Francesco Riosa
Details
Alternative patch (971 bytes, patch)
2017-11-02 01:49 UTC, David Edmundson
Details
New crash information added by DrKonqi (17.24 KB, text/plain)
2018-02-06 15:07 UTC, bonno_meddens
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kishore Gopalakrishnan 2017-06-25 04:09:14 UTC
Created attachment 106282 [details]
Bactrace of the crash

When running with Wayland, plasmashell crashes if I try to change the action associated with mouse actions on the desktop.

Steps to reproduce:
1. Log in to the Wayland session
2. Right click on desktop
3. Configure desktop > mouse actions 
4. Try to change the action associated with any mouse action

Observed result:
Plasmashell crashes when I click on any action from the dropdown list.

Expected result:
The option should change without plasmashell crashing, like it does when you try the same steps in an X session.
Comment 1 Marco Martin 2017-06-26 13:42:24 UTC
pasting inline
Thread 14 (Thread 0x7f78b5b3c700 (LWP 8645)):
[KCrash Handler]
#5  0x00007f79985d12d0 in wl_proxy_create_wrapper () at /usr/lib/libwayland-client.so.0
#6  0x00007f78f6fbe3f1 in  () at /usr/lib/libEGL_mesa.so.0
#7  0x00007f78f6facdde in  () at /usr/lib/libEGL_mesa.so.0
#8  0x00007f78f75f7f4d in  () at /usr/lib/qt/plugins/wayland-graphics-integration-client/libwayland-egl.so
#9  0x00007f78f75f64c5 in  () at /usr/lib/qt/plugins/wayland-graphics-integration-client/libwayland-egl.so
#10 0x00007f799a570f56 in QOpenGLContext::makeCurrent(QSurface*) () at /usr/lib/libQt5Gui.so.5
#11 0x00007f799d901df4 in  () at /usr/lib/libQt5Quick.so.5
#12 0x00007f799d9096cb in  () at /usr/lib/libQt5Quick.so.5
#13 0x00007f799d908967 in  () at /usr/lib/libQt5Quick.so.5
#14 0x00007f799d908d3a in  () at /usr/lib/libQt5Quick.so.5
#15 0x00007f7999b66cbd in  () at /usr/lib/libQt5Core.so.5
#16 0x00007f7998d2f297 in start_thread () at /usr/lib/libpthread.so.0
#17 0x00007f799947b25f in clone () at /usr/lib/libc.so.6
Comment 2 Marco Martin 2017-06-26 13:43:47 UTC

*** This bug has been marked as a duplicate of bug 371246 ***
Comment 3 David Edmundson 2017-08-13 20:29:44 UTC
*** Bug 381395 has been marked as a duplicate of this bug. ***
Comment 4 Alexander Mentyu 2017-08-17 12:48:36 UTC
Confirming this bug in:
KDE neon dev git unstable 20170813
KDE Frameworks 5.37.0
Qt 5.9.1 (built against 5.9.1)
Comment 5 David Edmundson 2017-08-18 01:17:10 UTC
*** Bug 383573 has been marked as a duplicate of this bug. ***
Comment 6 David Edmundson 2017-08-18 01:18:25 UTC
*** Bug 383482 has been marked as a duplicate of this bug. ***
Comment 7 Christoph Feck 2017-08-19 09:34:13 UTC
*** Bug 383507 has been marked as a duplicate of this bug. ***
Comment 8 Christoph Feck 2017-08-19 09:34:27 UTC
*** Bug 382004 has been marked as a duplicate of this bug. ***
Comment 9 Fabian Vogt 2017-08-21 08:40:33 UTC
Happens reliably when opening the configuration dialog of systemsettings5 from git master.
Comment 10 Christoph Feck 2017-08-23 14:02:50 UTC
*** Bug 383881 has been marked as a duplicate of this bug. ***
Comment 11 tromzy 2017-08-29 09:19:31 UTC
It happens here too, and it seems to be the same bug as the one I reported : https://bugs.kde.org/show_bug.cgi?id=381127
Comment 12 tromzy 2017-08-29 09:21:42 UTC
I can add that it happens on a dual monitor configuration. If I try to change the action associated with mouse actions on one monitor, Plasma crashes but it relaunches itself fine. If I try to do the same thing on the other monitor, I get kicked back to SDDM.
Comment 13 Christoph Feck 2017-09-04 14:55:33 UTC
*** Bug 383921 has been marked as a duplicate of this bug. ***
Comment 14 Christoph Feck 2017-09-04 14:55:56 UTC
*** Bug 384074 has been marked as a duplicate of this bug. ***
Comment 15 Christoph Feck 2017-09-04 14:57:56 UTC
Backtrace from bug 384074 has line number information. Looks like a QtWayland or libEGL bug.
Comment 16 Kai Uwe Broulik 2017-09-07 09:20:39 UTC
Reliably happens after closing the panel controller. The ComboBox in Containment Actions only crashes in a multi screen setup, however.
Comment 17 Christoph Feck 2017-09-13 23:14:44 UTC
*** Bug 384680 has been marked as a duplicate of this bug. ***
Comment 18 Christoph Feck 2017-09-13 23:14:58 UTC
*** Bug 384636 has been marked as a duplicate of this bug. ***
Comment 19 Fabian Vogt 2017-09-14 07:15:14 UTC
Created attachment 107847 [details]
Workaround patch for qtwayland 5.9.1

I made and attached a patch against qtwayland 5.9.1 that works around the issue.
I'm not familiar enough with qtwayland code to tell where the underlying issue actually is.
Comment 20 Christoph Feck 2017-09-15 21:54:34 UTC
*** Bug 384692 has been marked as a duplicate of this bug. ***
Comment 21 Christoph Feck 2017-09-15 21:54:57 UTC
*** Bug 384719 has been marked as a duplicate of this bug. ***
Comment 22 Christoph Feck 2017-09-15 21:55:19 UTC
*** Bug 384728 has been marked as a duplicate of this bug. ***
Comment 23 David Edmundson 2017-09-25 07:55:17 UTC
*** Bug 385042 has been marked as a duplicate of this bug. ***
Comment 24 David Edmundson 2017-09-27 09:59:31 UTC
*** Bug 385121 has been marked as a duplicate of this bug. ***
Comment 25 David Edmundson 2017-10-02 07:23:43 UTC
*** Bug 385271 has been marked as a duplicate of this bug. ***
Comment 26 David Edmundson 2017-10-12 10:55:09 UTC
*** Bug 385560 has been marked as a duplicate of this bug. ***
Comment 27 David Edmundson 2017-10-12 11:02:06 UTC
*** Bug 385652 has been marked as a duplicate of this bug. ***
Comment 28 David Edmundson 2017-10-13 16:44:39 UTC
*** Bug 385681 has been marked as a duplicate of this bug. ***
Comment 29 David Edmundson 2017-10-13 16:44:43 UTC
*** Bug 385664 has been marked as a duplicate of this bug. ***
Comment 30 David Edmundson 2017-10-14 11:59:04 UTC
*** Bug 385738 has been marked as a duplicate of this bug. ***
Comment 31 David Edmundson 2017-10-14 12:33:19 UTC
*** Bug 385741 has been marked as a duplicate of this bug. ***
Comment 32 Roman Gilg 2017-10-19 10:21:03 UTC
I just tried Fabian's patch on Qt 5.9.3 and it solved the problems I had with combobox. Is this patch or something similar already upstreamed?
Comment 33 Kai Uwe Broulik 2017-10-19 12:18:19 UTC
I don't think so. Might be worth a shot just uploading it to codereview to gather some comments from people that know the codebase.
Comment 34 Christoph Feck 2017-10-20 00:34:35 UTC
*** Bug 385927 has been marked as a duplicate of this bug. ***
Comment 35 Christoph Feck 2017-10-20 00:34:54 UTC
*** Bug 385826 has been marked as a duplicate of this bug. ***
Comment 36 Christoph Feck 2017-10-20 00:35:13 UTC
*** Bug 385805 has been marked as a duplicate of this bug. ***
Comment 37 Christoph Feck 2017-10-20 00:35:30 UTC
*** Bug 385811 has been marked as a duplicate of this bug. ***
Comment 38 Francesco Riosa 2017-10-22 12:11:05 UTC
Created attachment 108506 [details]
New crash information added by DrKonqi

plasmashell (5.11.1) using Qt 5.9.2

this time happened when changing date format of the clock

-- Backtrace (Reduced):
#5  wl_proxy_create_wrapper (proxy=0x0) at /var/tmp/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0/src/wayland-client.c:2038
#6  0x00007fcd015851d1 in dri2_wl_create_window_surface () from /usr/lib64/libEGL.so.1
#7  0x00007fcd0156ca07 in _eglCreateWindowSurfaceCommon () from /usr/lib64/libEGL.so.1
#8  0x00007fcd0180ff02 in QtWaylandClient::QWaylandEglWindow::updateSurface(bool) () from /usr/lib64/qt5/plugins/wayland-graphics-integration-client/libwayland-egl.so
#9  0x00007fcd0180df35 in QtWaylandClient::QWaylandGLContext::makeCurrent(QPlatformSurface*) () from /usr/lib64/qt5/plugins/wayland-graphics-integration-client/libwayland-egl.so
Comment 39 David Edmundson 2017-10-23 22:22:25 UTC
*** Bug 386091 has been marked as a duplicate of this bug. ***
Comment 40 David Edmundson 2017-10-30 09:34:17 UTC
*** Bug 386259 has been marked as a duplicate of this bug. ***
Comment 41 David Edmundson 2017-10-30 09:34:20 UTC
*** Bug 386303 has been marked as a duplicate of this bug. ***
Comment 42 David Edmundson 2017-10-30 09:34:23 UTC
*** Bug 386280 has been marked as a duplicate of this bug. ***
Comment 43 David Edmundson 2017-11-02 01:49:50 UTC
Created attachment 108673 [details]
Alternative patch

Similar to Fabian's patch, yet different.

The bug is with QWaylandEglWindow
 - The window will sometimes delete the surface (invisible or size 0x0)

 - on window dtor will make the GL context current, but for deleting things not rendering, so we don't need a context

 - when we make it current, QWaylandGLContext::makeCurrent realises the window has no surface so explicilty tells it recreate it - this doesn't make sense when we're deleting the window
Comment 44 Kai Uwe Broulik 2017-11-02 09:42:39 UTC
*** Bug 386446 has been marked as a duplicate of this bug. ***
Comment 45 David Edmundson 2017-11-05 17:09:11 UTC
*** Bug 386534 has been marked as a duplicate of this bug. ***
Comment 46 David Edmundson 2017-11-05 17:09:14 UTC
*** Bug 386557 has been marked as a duplicate of this bug. ***
Comment 47 Pietro F. Fontana 2017-11-06 11:29:52 UTC
*** Bug 386583 has been marked as a duplicate of this bug. ***
Comment 48 David Edmundson 2017-11-08 11:37:44 UTC
*** Bug 386639 has been marked as a duplicate of this bug. ***
Comment 49 David Edmundson 2017-11-08 11:37:48 UTC
*** Bug 386626 has been marked as a duplicate of this bug. ***
Comment 50 David Edmundson 2017-11-13 12:51:41 UTC
Submitted as https://codereview.qt-project.org/#/c/210552/
Comment 51 David Edmundson 2017-11-14 12:57:06 UTC
*** Bug 386892 has been marked as a duplicate of this bug. ***
Comment 52 Marco Martin 2017-11-20 16:32:44 UTC
*** Bug 386994 has been marked as a duplicate of this bug. ***
Comment 53 Kai Uwe Broulik 2017-12-06 10:51:10 UTC
*** Bug 387620 has been marked as a duplicate of this bug. ***
Comment 54 Marco Martin 2017-12-20 13:26:36 UTC
*** Bug 387964 has been marked as a duplicate of this bug. ***
Comment 55 Marco Martin 2017-12-20 13:26:46 UTC
*** Bug 387875 has been marked as a duplicate of this bug. ***
Comment 56 Marco Martin 2017-12-20 13:26:58 UTC
*** Bug 387465 has been marked as a duplicate of this bug. ***
Comment 57 Marco Martin 2017-12-20 13:27:16 UTC
*** Bug 387419 has been marked as a duplicate of this bug. ***
Comment 58 Marco Martin 2017-12-20 13:27:27 UTC
*** Bug 387287 has been marked as a duplicate of this bug. ***
Comment 59 Christoph Feck 2017-12-20 18:00:28 UTC
*** Bug 386661 has been marked as a duplicate of this bug. ***
Comment 60 Christoph Feck 2017-12-20 18:01:06 UTC
*** Bug 387760 has been marked as a duplicate of this bug. ***
Comment 61 Christoph Feck 2017-12-20 18:03:01 UTC
*** Bug 387986 has been marked as a duplicate of this bug. ***
Comment 62 Christoph Feck 2017-12-20 18:03:24 UTC
*** Bug 387274 has been marked as a duplicate of this bug. ***
Comment 63 Marco Martin 2018-01-02 09:30:24 UTC
*** Bug 388376 has been marked as a duplicate of this bug. ***
Comment 64 Marco Martin 2018-01-02 09:31:02 UTC
*** Bug 385625 has been marked as a duplicate of this bug. ***
Comment 65 Marco Martin 2018-01-02 09:31:06 UTC
*** Bug 388344 has been marked as a duplicate of this bug. ***
Comment 66 Christoph Feck 2018-01-02 14:20:55 UTC
*** Bug 387826 has been marked as a duplicate of this bug. ***
Comment 67 Marco Martin 2018-01-04 11:47:12 UTC
*** Bug 388474 has been marked as a duplicate of this bug. ***
Comment 68 David Edmundson 2018-01-14 18:34:47 UTC
*** Bug 388970 has been marked as a duplicate of this bug. ***
Comment 69 Kai Uwe Broulik 2018-01-15 09:51:35 UTC
*** Bug 388992 has been marked as a duplicate of this bug. ***
Comment 70 Kai Uwe Broulik 2018-01-15 09:52:07 UTC
*** Bug 388821 has been marked as a duplicate of this bug. ***
Comment 71 Kai Uwe Broulik 2018-01-15 09:52:25 UTC
*** Bug 385625 has been marked as a duplicate of this bug. ***
Comment 72 Kai Uwe Broulik 2018-01-15 09:52:28 UTC
*** Bug 388783 has been marked as a duplicate of this bug. ***
Comment 73 David Edmundson 2018-01-16 22:55:23 UTC
This is now merged upstream and can be considered closed.
Comment 74 Dennis Schridde 2018-01-17 00:02:38 UTC
(In reply to David Edmundson from comment #73)
> This is now merged upstream and can be considered closed.

Was the fix already merged into KDE neon User LTS?
Comment 75 Roman Gilg 2018-01-17 09:14:49 UTC
I assume it will be backported by the Neon Team for 5.12 LTS release if Qt isn't fast enough with releasing a bugfixed Qt 5.9.
Comment 76 tromzy 2018-01-17 09:23:37 UTC
I had a Qt5wayland update today on Archlinux and it seems to have solved the problem.
Comment 77 Roman Gilg 2018-01-17 11:46:22 UTC
Antonio backported David's patch for Arch already:

https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/qt5-wayland#n17
Comment 78 Rainer Finke 2018-01-17 20:11:33 UTC
I can resize now the Plasma panel without a crash on Arch Linux with the latest qt5-wayland package. Thank you very much for fixing this annoying Qt bug!
Comment 79 Kai Uwe Broulik 2018-01-18 12:19:15 UTC
*** Bug 389126 has been marked as a duplicate of this bug. ***
Comment 80 Kai Uwe Broulik 2018-01-18 12:19:24 UTC
*** Bug 389063 has been marked as a duplicate of this bug. ***
Comment 81 Kai Uwe Broulik 2018-01-18 12:19:29 UTC
*** Bug 389050 has been marked as a duplicate of this bug. ***
Comment 82 Kai Uwe Broulik 2018-01-18 12:20:03 UTC
*** Bug 389149 has been marked as a duplicate of this bug. ***
Comment 83 David Edmundson 2018-01-22 14:39:09 UTC
*** Bug 389314 has been marked as a duplicate of this bug. ***
Comment 84 bonno_meddens 2018-02-06 15:07:00 UTC
Created attachment 110369 [details]
New crash information added by DrKonqi

plasmashell (5.12.0) using Qt 5.9.3

- What I was doing when the application crashed:
I use plasma 5.12 wayland, the bug is wayland specific and is present on my desktop and laptop.
Desktop UI completely crashes when moving the mouse from any collapsable applications submenu (also recent Applications and Recent documents) to the favourites icons in the menu or moving from menu to the desktop.
Since this happens on two machines, one intel CPU with AMD GPU and a laptop with intel cpu&gpu.
I do use latest stable padoka MESA drivers but since the bug is present on AMD and intel gpu's I doubt that it is caused by padoka.

-- Backtrace (Reduced):
#6  wl_proxy_create_wrapper (proxy=0x0) at ../src/wayland-client.c:2038
#7  0x00007fc95a11ecc6 in dri2_wl_create_window_surface (drv=<optimized out>, disp=0x11599e0, conf=0x11b2ff0, native_window=0x7fc88c0036a0, attrib_list=<optimized out>) at ../../../../src/egl/drivers/dri2/platform_wayland.c:121
#8  0x00007fc95a10b9a5 in _eglCreateWindowSurfaceCommon (disp=0x11599e0, config=<optimized out>, native_window=0x7fc88c0036a0, attrib_list=0x0) at ../../../../src/egl/main/eglapi.c:903
#9  0x00007fc95a58d068 in QtWaylandClient::QWaylandEglWindow::updateSurface (this=this@entry=0x15fd7f0, create=create@entry=true) at ../../../../hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp:141
#10 0x00007fc95a58b64d in QtWaylandClient::QWaylandGLContext::makeCurrent (this=0x9220500, surface=<optimized out>) at ../../../../hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp:410
Comment 85 Michael D 2018-02-06 20:16:20 UTC
(In reply to Roman Gilg from comment #75)
> I assume it will be backported by the Neon Team for 5.12 LTS release if Qt
> isn't fast enough with releasing a bugfixed Qt 5.9.

Seems not to have happened because plasma just crashed when I closed the sliding settings popup from the panel. I'm running plasma 5.12 on KDE Neon.
Comment 86 David Edmundson 2018-02-06 21:01:24 UTC
Neon doesn't have my patch backported.
Comment 87 David Edmundson 2018-02-07 02:03:15 UTC
*** Bug 389985 has been marked as a duplicate of this bug. ***
Comment 88 Roman Gilg 2018-02-07 09:38:36 UTC
Patch should have been backported to Neon now as well. Sorry for the delay.
Comment 89 David Edmundson 2018-02-10 23:52:24 UTC
*** Bug 389841 has been marked as a duplicate of this bug. ***
Comment 90 Aleix Pol 2018-02-12 17:27:53 UTC
*** Bug 389979 has been marked as a duplicate of this bug. ***
Comment 91 David Edmundson 2018-02-16 09:45:23 UTC
*** Bug 390535 has been marked as a duplicate of this bug. ***
Comment 92 Christoph Feck 2018-02-23 20:43:36 UTC
*** Bug 390807 has been marked as a duplicate of this bug. ***
Comment 93 David Edmundson 2018-03-13 20:30:56 UTC
*** Bug 391443 has been marked as a duplicate of this bug. ***
Comment 94 David Edmundson 2018-03-14 14:02:18 UTC
*** Bug 391852 has been marked as a duplicate of this bug. ***
Comment 95 Christoph Feck 2018-03-26 12:47:36 UTC
*** Bug 390958 has been marked as a duplicate of this bug. ***
Comment 96 Nate Graham 2018-04-03 03:20:41 UTC
*** Bug 392634 has been marked as a duplicate of this bug. ***
Comment 97 David Edmundson 2018-04-09 16:17:17 UTC
*** Bug 392921 has been marked as a duplicate of this bug. ***
Comment 98 Dominik Haumann 2018-08-15 22:18:44 UTC
*** Bug 391672 has been marked as a duplicate of this bug. ***