Bug 395753

Summary: [Wayland] plasmashell gets SIGSEGV after clicking on Application Menu for second time
Product: [Plasma] plasmashell Reporter: magiblot
Component: PanelAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED DOWNSTREAM    
Severity: crash CC: magiblot
Priority: NOR    
Version: 5.13.2   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description magiblot 2018-06-22 16:34:11 UTC
Hello,

I found that I am unable to perform a normal use of the Wayland compositor due to a crash that happens when I do the following:

1. Click with the mouse on the Application Manager icon, so that the Application Manager appears.
2. Click again, so that it hids.
3. Click again, in an attempt to make it appear again.

However, the screen and keyboard freeze instead. The only way to get full control over the computer again, other than rebooting, is unrawing the keyboard (Alt+SysRq+R), changing to another tty and killing kwin_wayland, because "The X11 connection broke" (I guess).

I chose 'Panel' as Component because I believe this issue is not specific to the Application Manager (I also experienced the same crash with other applets, but the Application Manager is the most obvious example).

I wouldn't experience this behaviour with Plasma 5.12.5. Only after updating to 5.13.0 and 5.13.1.

So I debugged the crash with gdb, and I'm providing the following information: System information, GDB backtrace and STDERR output.

***************************************

1. System information

***************************************

* Archlinux x86_64
* CPU Intel i3-3110M, GPU Intel HD Graphics 4000

> OpenGL vendor string:                   Intel Open Source Technology Center
> OpenGL renderer string:                 Mesa DRI Intel(R) Ivybridge Mobile
> OpenGL version string:                  3.0 Mesa 18.1.1
> OpenGL shading language version string: 1.30
> Driver:                                 Intel
> GPU class:                              IvyBridge
> OpenGL version:                         3.0
> GLSL version:                           1.30
> Mesa version:                           18.1.1
> Linux kernel version:                   4.17.2
> Requires strict binding:                no
> GLSL shaders:                           yes
> Texture NPOT support:                   yes
> Virtual Machine:                        no
* Plasma version 5.13.1
* Qt version 5.11.1

***************************************

2. GDB backtrace:

***************************************

> [Thread 0x7fffe14f9700 (LWP 786) exited]

> Thread 1 "plasmashell" received signal SIGSEGV, Segmentation fault.
> 0x00007fffd2541626 in ?? () from /usr/lib/dri/i965_dri.so
> (gdb) bt
> #0  0x00007fffd2541626 in  () at /usr/lib/dri/i965_dri.so
> #1  0x00007fffd2515751 in  () at /usr/lib/dri/i965_dri.so
> #2  0x00007ffff575e82d in QSGBatchRenderer::Renderer::renderBatches() () at /usr/lib/libQt5Quick.so.5
> #3  0x00007ffff5764103 in QSGBatchRenderer::Renderer::render() () at /usr/lib/libQt5Quick.so.5
> #4  0x00007ffff57544ee in QSGRenderer::renderScene(QSGBindable const&) () at /usr/lib/libQt5Quick.so.5
> #5  0x00007ffff57549bc in QSGRenderer::renderScene(unsigned int) () at /usr/lib/libQt5Quick.so.5
> #6  0x00007ffff578f030 in QSGDefaultRenderContext::renderNextFrame(QSGRenderer*, unsigned int) () at /usr/lib/libQt5Quick.so.5
> #7  0x00007ffff57f2db5 in QQuickWindowPrivate::renderSceneGraph(QSize const&) () at /usr/lib/libQt5Quick.so.5
> #8  0x00007ffff5781275 in  () at /usr/lib/libQt5Quick.so.5
> #9  0x00007ffff57820a5 in  () at /usr/lib/libQt5Quick.so.5
> #10 0x00007ffff1f0f935 in QWindow::event(QEvent*) () at /usr/lib/libQt5Gui.so.5
> #11 0x00007ffff57fe65c in QQuickWindow::event(QEvent*) () at /usr/lib/libQt5Quick.so.5
> #12 0x00007ffff799b4a4 in PlasmaQuick::Dialog::event(QEvent*) () at /usr/lib/libKF5PlasmaQuick.so.5
> #13 0x00007ffff2fa6a74 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
> #14 0x00007ffff2fae341 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
> #15 0x00007ffff195ccb9 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
> #16 0x00007ffff1f04146 in QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::ExposeEvent*) () at /usr/lib/libQt5Gui.so.5
> #17 0x00007ffff1f04e7e in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () at /usr/lib/libQt5Gui.so.5
> #18 0x00007ffff1edeb7c in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Gui.so.5
> #19 0x00007fffe36ed72d in  () at /usr/lib/libQt5XcbQpa.so.5
> #20 0x00007ffff195b94c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
> #21 0x00007ffff1963c46 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
> #22 0x000055555557064e in  ()
> #23 0x00007ffff0fc906b in __libc_start_main () at /usr/lib/libc.so.6
> #24 0x0000555555570aca in _start ()
***************************************

3. STDERR output:

***************************************

> libGL error: failed to create drawable
> libGL error: failed to create drawable
> libGL error: failed to create drawable
> libGL error: failed to create drawable
> The X11 connection broke (error 1). Did the X11 server die?
> The X11 connection broke: I/O error (code 1)
> XIO:  fatal IO error 0 (Success) on X server ":0"
>     after 2305 requests (2305 known processed) with 0 events remaining.
> The X11 connection broke: I/O error (code 1)
> XIO:  fatal IO error 9 (Bad file descriptor) on X server ":0"
>     after 2305 requests (2305 known processed) with 0 events remaining.
***************************************


Thanks.
Comment 1 magiblot 2018-06-27 20:52:25 UTC
I obtained a new backtrace with mesa debug symbols. In this occasion the version of plasma is 5.13.2 and the version of mesa is git-103087.ab2643e4b0.

If you believe this has nothing to do with the plasma code, I shall report the bug to the mesa developers.

> #0  0x00007fffd25a4476 in intel_miptree_level_has_hiz (mt=0x0, level=0) at intel_mipmap_tree.c:1953
> #1  0x00007fffd25a2890 in intel_renderbuffer_has_hiz (irb=irb@entry=0x555558744d90) at intel_fbo.c:930
> #2  0x00007fffd2577845 in brw_fast_clear_depth (ctx=0x5555561a7660) at brw_clear.c:114
> #3  0x00007fffd2577845 in brw_clear (ctx=0x5555561a7660, mask=50) at brw_clear.c:258
> #4  0x00007ffff575e82d in QSGBatchRenderer::Renderer::renderBatches() () at /usr/lib/libQt5Quick.so.5
> #5  0x00007ffff5764103 in QSGBatchRenderer::Renderer::render() () at /usr/lib/libQt5Quick.so.5
> #6  0x00007ffff57544ee in QSGRenderer::renderScene(QSGBindable const&) () at /usr/lib/libQt5Quick.so.5
> #7  0x00007ffff57549bc in QSGRenderer::renderScene(unsigned int) () at /usr/lib/libQt5Quick.so.5
> #8  0x00007ffff578f030 in QSGDefaultRenderContext::renderNextFrame(QSGRenderer*, unsigned int) () at /usr/lib/libQt5Quick.so.5
> #9  0x00007ffff57f2db5 in QQuickWindowPrivate::renderSceneGraph(QSize const&) () at /usr/lib/libQt5Quick.so.5
> #10 0x00007ffff5781275 in  () at /usr/lib/libQt5Quick.so.5
> #11 0x00007ffff57820a5 in  () at /usr/lib/libQt5Quick.so.5
> #12 0x00007ffff1f0f935 in QWindow::event(QEvent*) () at /usr/lib/libQt5Gui.so.5
> #13 0x00007ffff57fe65c in QQuickWindow::event(QEvent*) () at /usr/lib/libQt5Quick.so.5
> #14 0x00007ffff799b4a4 in PlasmaQuick::Dialog::event(QEvent*) () at /usr/lib/libKF5PlasmaQuick.so.5
> #15 0x00007ffff2fa6a74 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
> #16 0x00007ffff2fae341 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
> #17 0x00007ffff195ccb9 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
> #18 0x00007ffff1f04146 in QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::ExposeEvent*) () at /usr/lib/libQt5Gui.so.5
> #19 0x00007ffff1f04e7e in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () at /usr/lib/libQt5Gui.so.5
> #20 0x00007ffff1edeb7c in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Gui.so.5
> #21 0x00007fffe36ed72d in  () at /usr/lib/libQt5XcbQpa.so.5
> #22 0x00007ffff195b94c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
> #23 0x00007ffff1963c46 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
> #24 0x000055555557064e in  ()
> #25 0x00007ffff0fc906b in __libc_start_main () at /usr/lib/libc.so.6
> #26 0x0000555555570aca in _start ()
Comment 2 Christoph Feck 2018-06-27 21:09:51 UTC
This is indeed a bug in the intel OpenGL drivers. Please report this issue directly to intel/Mesa developers via https://bugs.freedesktop.org/
Comment 3 magiblot 2018-06-27 21:25:47 UTC
Thanks for the answer.
Comment 4 magiblot 2018-09-25 22:25:04 UTC
(In reply to Christoph Feck from comment #2)
> This is indeed a bug in the intel OpenGL drivers. Please report this issue
> directly to intel/Mesa developers via https://bugs.freedesktop.org/

I submitted the bug 3 months ago:
https://bugs.freedesktop.org/show_bug.cgi?id=107058

Even though I didn't get an answer, I found starting Plasma this way (from the tty) solves the issue:

> QT_QPA_PLATFORM=wayland-egl startplasmacompositor

Which leads to the questions: how does the QT_QPA_PLATFORM variable affect Plasma (only a KDE developer can answer this), and could this be a QT bug instead?

Cheers.