| Summary: | kwin_wayland crash in QOpenGLContext::shareGroup | ||
|---|---|---|---|
| Product: | [Plasma] kwin | Reporter: | Patrick Silva <bugseforuns> |
| Component: | generic-crash | Assignee: | KWin default assignee <kwin-bugs-null> |
| Status: | REPORTED --- | ||
| Severity: | crash | CC: | bugs.kde.org, david, kde, nate, qydwhotmail |
| Priority: | NOR | ||
| Version First Reported In: | 5.27.5 | ||
| Target Milestone: | --- | ||
| Platform: | Arch Linux | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Patrick Silva
2023-05-25 18:45:26 UTC
Does it happen every time or just once randomly It already happened a few times. Can't reproduce consistently. *** Bug 449324 has been marked as a duplicate of this bug. *** *** Bug 459623 has been marked as a duplicate of this bug. *** Active theory, this is using the current openglcontext, kwin is changing the context to it's own context that Qt doesn't know about and we get out of sync. I have been able to (thus far) reproduce this crash when Alt+Tabbing away from a Steam game properties window after a game data verification completes.
The system is running openSUSE Tumbleweed, and has an Intel Arc A380 GPU, as well as the integrated Intel HSW GPU. The former is the default, and is what OpenGL apps including Steam are using. The stack trace
STEPS TO REPRODUCE
1. Run Steam <store.steampowered.com> in XWayland
2. Right-click on a game (in my case, Age of Empires IV), and select 'Properties'
3. Select 'Installed Files', then 'Verify Integrity of Game Files'
4. Wait for the verification to complete. In my case, the message was '1 file failed to validate and will be reacquired'.
5. Alt+Tab away from the window. kwin_wayland will SIGSEGV
OBSERVED RESULT
A SIGSEGV in kwin_wayland. The faulting thread stacktrace is:
```
#0 QOpenGLContext::shareGroup() const (this=this@entry=0x0) at kernel/qopenglcontext.cpp:1179
#1 0x00007f194ff3f497 in QOpenGLMultiGroupSharedResource::value<QOpenGLFunctionsPrivateEx>(QOpenGLContext*)
(context=0x0, this=0x7f1950137040 <(anonymous namespace)::Q_QGS_qt_gl_functions_resource::innerFunction()::holder>)
at ../../include/QtGui/5.15.12/QtGui/private/../../../../../src/gui/kernel/qopenglcontext_p.h:173
#2 qt_gl_functions(QOpenGLContext*) (context=0x0) at opengl/qopenglfunctions.cpp:191
#3 0x00007f194ff3f712 in qopenglfSpecialClearDepthf(GLclampf) (depth=1) at opengl/qopenglfunctions.cpp:2138
#4 0x00007f1950bdfc42 in QSGBatchRenderer::Renderer::renderBatches() () at /lib64/libQt5Quick.so.5
#5 0x00007f1950be050c in QSGBatchRenderer::Renderer::render() () at /lib64/libQt5Quick.so.5
#6 0x00007f1950bc83e0 in QSGRenderer::renderScene(QSGBindable const&) () at /lib64/libQt5Quick.so.5
#7 0x00007f1950bc8893 in QSGRenderer::renderScene(unsigned int) () at /lib64/libQt5Quick.so.5
#8 0x00007f1950c2a713 in QSGDefaultRenderContext::renderNextFrame(QSGRenderer*, unsigned int) () at /lib64/libQt5Quick.so.5
#9 0x00007f1950c99eb9 in QQuickWindowPrivate::renderSceneGraph(QSize const&, QSize const&) () at /lib64/libQt5Quick.so.5
#10 0x00007f1950c161d1 in () at /lib64/libQt5Quick.so.5
#11 0x00007f1950ca8c05 in QQuickWindow::event(QEvent*) () at /lib64/libQt5Quick.so.5
#12 0x00007f194eda51ae in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x55765cee0360, e=0x7fffc0335f00) at kernel/qapplication.cpp:3640
#13 0x00007f194f6ed938 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x55765cee0360, event=0x7fffc0335f00) at kernel/qcoreapplication.cpp:1064
#14 0x00007f194f6edafe in QCoreApplication::sendEvent(QObject*, QEvent*) (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1462
#15 0x00007f194fb6c153 in QPlatformWindow::deliverUpdateRequest() (this=<optimized out>) at kernel/qplatformwindow.cpp:796
#16 QPlatformWindow::windowEvent(QEvent*) (this=<optimized out>, event=<optimized out>) at kernel/qplatformwindow.cpp:476
#17 0x00007f194edac4ec in QApplication::notify(QObject*, QEvent*) (this=0x7fffc03365b0, receiver=0x55765cee0360, e=0x7fffc0336170) at kernel/qapplication.cpp:2882
#18 0x00007f194f6ed938 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x55765cee0360, event=0x7fffc0336170) at kernel/qcoreapplication.cpp:1064
#19 0x00007f194f6edafe in QCoreApplication::sendEvent(QObject*, QEvent*) (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1462
#20 0x00007f194f745c69 in QTimerInfoList::activateTimers() (this=this@entry=0x55765b562598) at kernel/qtimerinfo_unix.cpp:643
#21 0x00007f194f7433ec in QEventDispatcherUNIXPrivate::activateTimers() (this=this@entry=0x55765b562510) at kernel/qeventdispatcher_unix.cpp:249
#22 0x00007f194f744110 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=<optimized out>, flags=...) at kernel/qeventdispatcher_unix.cpp:516
#23 0x000055765abae1dd in QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=<optimized out>, flags=...) at qunixeventdispatcher.cpp:63
#24 0x00007f194f6ec3cb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fffc0336310, flags=..., flags@entry=...)
at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#25 0x00007f194f6f4860 in QCoreApplication::exec() () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#26 0x00007f194fb705dc in QGuiApplication::exec() () at kernel/qguiapplication.cpp:1870
#27 0x00007f194eda5125 in QApplication::exec() () at kernel/qapplication.cpp:2832
#28 0x000055765aad13aa in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/kwin-5.27.10/src/main_wayland.cpp:628
```
(I can provide a complete stacktrace of all threads on request, but it looks useless to me.)
EXPECTED RESULT
The window switcher works.
SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20240129
KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.114.0
Qt Version: 5.15.12
Kernel Version: 6.7.1-2-vanilla (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-4770K CPU @ 3.50GHz
Memory: 31.0 GiB of RAM
Graphics Processor: Mesa Intel® Arc
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: Z87X-UD5H
I can confirm this crash, or something very similar, still exists in at least version 5.27.11. The backtrace I saw here looks the same as the one David Gow reported, and in my case the crash was triggered when an application with an always-on-top window rule popped up shortly after launching a different fullscreen application in Wine (via Xwayland). This caused the fullscreen application window to minimise, and then after dismissing the pop-up window and trying to Alt-Tab back into the fullscreen application, KWin crashed. After the crash, KWin restarted and Firefox had enough time to pop a “Firefox crashed, do you want to report it?” window before KWin logged “No provider of eglDestroyImageKHR found.” and crashed again in `KWin::EglDmabuf::~EglDmabuf()` (via `KWin::Compositor::stop()`, via a `KWin::Workspace::slotReconfigure()` signal). This second crash happened twice in a row. (This seems like it could be bug #470980 which looks like it was maybe not backported to 5.27.) After finally recovering, autostart applications and some KDE services like kwallet did not restart on their own. Debian testing KWin 5.27.11-2 Qt5 5.15.13+dfsg-4 AMD Radeon 780M (radeonsi, gfx1103_r1, LLVM 18.1.8, DRM 3.57, 6.9.12-amd64) Mesa 24.2.2-1 Best, |