Bug 470266

Summary: kwin_wayland crash in QOpenGLContext::shareGroup
Product: [Plasma] kwin Reporter: Patrick Silva <bugseforuns>
Component: generic-crashAssignee: 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
Operating System: Arch Linux 
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.106.0
Qt Version: 5.15.9
Graphics Platform: Wayland


Thread 9 (Thread 0x7fddc7fff6c0 (LWP 9675)):
#0  0x00007fde18699f0e in __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7fddcf65f590) at futex-internal.c:57
#1  __futex_abstimed_wait_common (futex_word=futex_word@entry=0x7fddcf65f590, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0, cancel=cancel@entry=true) at futex-internal.c:87
#2  0x00007fde18699f8f in __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7fddcf65f590, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at futex-internal.c:139
#3  0x00007fde1869c7a0 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x7fddcf65f540, cond=0x7fddcf65f568) at pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x7fddcf65f568, mutex=0x7fddcf65f540) at pthread_cond_wait.c:618
#5  0x00007fde108c854c in cnd_wait () at ../mesa-23.1.0/src/c11/impl/threads_posix.c:135
#6  util_queue_thread_func() () at ../mesa-23.1.0/src/util/u_queue.c:290
#7  0x00007fde1091540c in impl_thrd_routine() () at ../mesa-23.1.0/src/c11/impl/threads_posix.c:67
#8  0x00007fde1869d44b in start_thread (arg=<optimized out>) at pthread_create.c:444
#9  0x00007fde18720e40 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 8 (Thread 0x7fddebfff6c0 (LWP 9411)):
#0  0x00007fde18713c0f in __GI___poll (fds=0x7fdde40013d0, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fde16f6c17f in g_main_context_poll (priority=<optimized out>, n_fds=1, fds=0x7fdde40013d0, timeout=<optimized out>, context=0x7fdde4000c30) at ../glib/glib/gmain.c:4584
#2  g_main_context_iterate.constprop.0 (context=0x7fdde4000c30, block=1, dispatch=1, self=<optimized out>) at ../glib/glib/gmain.c:4271
#3  0x00007fde16f0e1a2 in g_main_context_iteration (context=0x7fdde4000c30, may_block=1) at ../glib/glib/gmain.c:4343
#4  0x00007fde196e9f0c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7fdde4000b70, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#5  0x00007fde19699824 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7fddebffeca0, flags=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#6  0x00007fde194f6eb6 in QThread::exec() (this=this@entry=0x55da025162e0) at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#7  0x00007fde1a4c2410 in QQmlThreadPrivate::run() (this=0x55da025162e0) at /usr/src/debug/qt5-declarative/qtdeclarative/src/qml/qml/ftw/qqmlthread.cpp:155
#8  0x00007fde194f30da in operator() (__closure=<optimized out>) at thread/qthread_unix.cpp:350
#9  (anonymous namespace)::terminate_on_exception<QThreadPrivate::start(void*)::<lambda()> > (t=<optimized out>) at thread/qthread_unix.cpp:287
#10 QThreadPrivate::start(void*) (arg=0x55da025162e0) at thread/qthread_unix.cpp:310
#11 0x00007fde1869d44b in start_thread (arg=<optimized out>) at pthread_create.c:444
#12 0x00007fde18720e40 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 7 (Thread 0x7fde13dff6c0 (LWP 9377)):
#0  0x00007fde18713c0f in __GI___poll (fds=0x7fde0c001600, nfds=3, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fde16f6c17f in g_main_context_poll (priority=<optimized out>, n_fds=3, fds=0x7fde0c001600, timeout=<optimized out>, context=0x7fde0c000c50) at ../glib/glib/gmain.c:4584
#2  g_main_context_iterate.constprop.0 (context=0x7fde0c000c50, block=1, dispatch=1, self=<optimized out>) at ../glib/glib/gmain.c:4271
#3  0x00007fde16f0e1a2 in g_main_context_iteration (context=0x7fde0c000c50, may_block=1) at ../glib/glib/gmain.c:4343
#4  0x00007fde196e9f0c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7fde0c000b70, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#5  0x00007fde19699824 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7fde13dfec90, flags=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#6  0x00007fde194f6eb6 in QThread::exec() (this=this@entry=0x7fde1b543660 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#7  0x00007fde1b4e869a in QDBusConnectionManager::run() (this=0x7fde1b543660 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at /usr/src/debug/qt5-base/qtbase/src/dbus/qdbusconnection.cpp:179
#8  0x00007fde194f30da in operator() (__closure=<optimized out>) at thread/qthread_unix.cpp:350
#9  (anonymous namespace)::terminate_on_exception<QThreadPrivate::start(void*)::<lambda()> > (t=<optimized out>) at thread/qthread_unix.cpp:287
#10 QThreadPrivate::start(void*) (arg=0x7fde1b543660 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:310
#11 0x00007fde1869d44b in start_thread (arg=<optimized out>) at pthread_create.c:444
#12 0x00007fde18720e40 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 6 (Thread 0x7fde021fe6c0 (LWP 9409)):
#0  0x00007fde18699f0e in __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7fde103de590) at futex-internal.c:57
#1  __futex_abstimed_wait_common (futex_word=futex_word@entry=0x7fde103de590, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0, cancel=cancel@entry=true) at futex-internal.c:87
#2  0x00007fde18699f8f in __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7fde103de590, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at futex-internal.c:139
#3  0x00007fde1869c7a0 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x7fde103de540, cond=0x7fde103de568) at pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x7fde103de568, mutex=0x7fde103de540) at pthread_cond_wait.c:618
#5  0x00007fde108c854c in cnd_wait () at ../mesa-23.1.0/src/c11/impl/threads_posix.c:135
#6  util_queue_thread_func() () at ../mesa-23.1.0/src/util/u_queue.c:290
#7  0x00007fde1091540c in impl_thrd_routine() () at ../mesa-23.1.0/src/c11/impl/threads_posix.c:67
#8  0x00007fde1869d44b in start_thread (arg=<optimized out>) at pthread_create.c:444
#9  0x00007fde18720e40 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 5 (Thread 0x7fde029ff6c0 (LWP 9408)):
#0  0x00007fde18699f0e in __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7fde104ae590) at futex-internal.c:57
#1  __futex_abstimed_wait_common (futex_word=futex_word@entry=0x7fde104ae590, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0, cancel=cancel@entry=true) at futex-internal.c:87
#2  0x00007fde18699f8f in __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7fde104ae590, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at futex-internal.c:139
#3  0x00007fde1869c7a0 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x7fde104ae540, cond=0x7fde104ae568) at pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x7fde104ae568, mutex=0x7fde104ae540) at pthread_cond_wait.c:618
#5  0x00007fde108c854c in cnd_wait () at ../mesa-23.1.0/src/c11/impl/threads_posix.c:135
#6  util_queue_thread_func() () at ../mesa-23.1.0/src/util/u_queue.c:290
#7  0x00007fde1091540c in impl_thrd_routine() () at ../mesa-23.1.0/src/c11/impl/threads_posix.c:67
#8  0x00007fde1869d44b in start_thread (arg=<optimized out>) at pthread_create.c:444
#9  0x00007fde18720e40 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 4 (Thread 0x7fddce5e06c0 (LWP 9711)):
#0  0x00007fde18721266 in epoll_wait (epfd=81, events=events@entry=0x7fddce5df920, maxevents=32, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
#1  0x00007fddddaf1c39 in impl_pollfd_wait (object=<optimized out>, pfd=<optimized out>, ev=0x7fddce5dfaf0, n_ev=<optimized out>, timeout=<optimized out>) at ../pipewire/spa/plugins/support/system.c:137
#2  0x00007fddddae44fd in loop_iterate (object=0x55da03a60538, timeout=-1) at ../pipewire/spa/plugins/support/loop.c:458
#3  0x00007fde193176b2 in do_loop (user_data=0x55da03427890) at ../pipewire/src/pipewire/data-loop.c:65
#4  0x00007fde1869d44b in start_thread (arg=<optimized out>) at pthread_create.c:444
#5  0x00007fde18720e40 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 3 (Thread 0x7fde045ff6c0 (LWP 9406)):
#0  0x00007fde18699f0e in __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x55da020a7f18) at futex-internal.c:57
#1  __futex_abstimed_wait_common (futex_word=futex_word@entry=0x55da020a7f18, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0, cancel=cancel@entry=true) at futex-internal.c:87
#2  0x00007fde18699f8f in __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x55da020a7f18, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at futex-internal.c:139
#3  0x00007fde1869c7a0 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x55da020a7ec8, cond=0x55da020a7ef0) at pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x55da020a7ef0, mutex=0x55da020a7ec8) at pthread_cond_wait.c:618
#5  0x00007fde108c854c in cnd_wait () at ../mesa-23.1.0/src/c11/impl/threads_posix.c:135
#6  util_queue_thread_func() () at ../mesa-23.1.0/src/util/u_queue.c:290
#7  0x00007fde1091540c in impl_thrd_routine() () at ../mesa-23.1.0/src/c11/impl/threads_posix.c:67
#8  0x00007fde1869d44b in start_thread (arg=<optimized out>) at pthread_create.c:444
#9  0x00007fde18720e40 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 2 (Thread 0x7fde03dfe6c0 (LWP 9407)):
#0  0x00007fde18713c0f in __GI___poll (fds=0x7fddf40013f0, nfds=2, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fde16f6c17f in g_main_context_poll (priority=<optimized out>, n_fds=2, fds=0x7fddf40013f0, timeout=<optimized out>, context=0x7fddf4000c30) at ../glib/glib/gmain.c:4584
#2  g_main_context_iterate.constprop.0 (context=0x7fddf4000c30, block=1, dispatch=1, self=<optimized out>) at ../glib/glib/gmain.c:4271
#3  0x00007fde16f0e1a2 in g_main_context_iteration (context=0x7fddf4000c30, may_block=1) at ../glib/glib/gmain.c:4343
#4  0x00007fde196e9f0c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7fddf4000b70, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#5  0x00007fde19699824 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7fde03dfdcc0, flags=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#6  0x00007fde194f6eb6 in QThread::exec() (this=<optimized out>) at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#7  0x00007fde194f30da in operator() (__closure=<optimized out>) at thread/qthread_unix.cpp:350
#8  (anonymous namespace)::terminate_on_exception<QThreadPrivate::start(void*)::<lambda()> > (t=<optimized out>) at thread/qthread_unix.cpp:287
#9  QThreadPrivate::start(void*) (arg=0x55da020436f8) at thread/qthread_unix.cpp:310
#10 0x00007fde1869d44b in start_thread (arg=<optimized out>) at pthread_create.c:444
#11 0x00007fde18720e40 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 1 (Thread 0x7fde142aa8c0 (LWP 9374)):
#0  QOpenGLContext::shareGroup() const (this=0x0) at kernel/qopenglcontext.cpp:1179
#1  0x00007fde19e7c8d7 in QOpenGLMultiGroupSharedResource::value<QOpenGLFunctionsPrivateEx>(QOpenGLContext*) (context=0x0, this=0x7fde1a07ada0 <(anonymous namespace)::Q_QGS_qt_gl_functions_resource::innerFunction()::holder>) at ../../include/QtGui/5.15.9/QtGui/private/../../../../../src/gui/kernel/qopenglcontext_p.h:172
#2  qt_gl_functions(QOpenGLContext*) (context=0x0) at opengl/qopenglfunctions.cpp:191
#3  0x00007fde19e7cca7 in qopenglfSpecialClearDepthf(GLclampf) (depth=1) at opengl/qopenglfunctions.cpp:2138
#4  0x00007fde1a9a7d82 in QOpenGLFunctions::glClearDepthf(float) (depth=1, this=0x55da03914e70) at /usr/include/qt/QtGui/qopenglfunctions.h:1252
#5  QSGBatchRenderer::Renderer::renderBatches() (this=0x55da03914d00) at /usr/src/debug/qt5-declarative/qtdeclarative/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp:4026
#6  0x00007fde1a9ac611 in QSGBatchRenderer::Renderer::render() (this=<optimized out>) at /usr/src/debug/qt5-declarative/qtdeclarative/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp:4368
#7  0x00007fde1a994265 in QSGRenderer::renderScene(QSGBindable const&) (bindable=..., this=0x55da03914d00) at /usr/src/debug/qt5-declarative/qtdeclarative/src/quick/scenegraph/coreapi/qsgrenderer.cpp:264
#8  QSGRenderer::renderScene(QSGBindable const&) (this=0x55da03914d00, bindable=warning: RTTI symbol for class 'QSGRenderer::renderScene(unsigned int)::B' is not a type
...) at /usr/src/debug/qt5-declarative/qtdeclarative/src/quick/scenegraph/coreapi/qsgrenderer.cpp:220
#9  0x00007fde1a994704 in QSGRenderer::renderScene(unsigned int) (this=<optimized out>, fboId=<optimized out>) at /usr/src/debug/qt5-declarative/qtdeclarative/src/quick/scenegraph/coreapi/qsgrenderer.cpp:212
#10 0x00007fde1a9ed795 in QSGDefaultRenderContext::renderNextFrame(QSGRenderer*, unsigned int) (this=0x55da03587030, renderer=0x55da03914d00, fboId=<optimized out>) at /usr/src/debug/qt5-declarative/qtdeclarative/src/quick/scenegraph/qsgdefaultrendercontext.cpp:228
#11 0x00007fde1aa49711 in QQuickWindowPrivate::renderSceneGraph(QSize const&, QSize const&) (this=0x55da027a9f60, size=<optimized out>, surfaceSize=<optimized out>) at /usr/src/debug/qt5-declarative/qtdeclarative/src/quick/items/qquickwindow.cpp:617
#12 0x00007fde1a9d5dfc in QSGGuiThreadRenderLoop::renderWindow(QQuickWindow*) (this=0x55da027a15a0, window=<optimized out>) at /usr/src/debug/qt5-declarative/qtdeclarative/src/quick/scenegraph/qsgrenderloop.cpp:764
#13 0x00007fde1aa52643 in QQuickWindow::event(QEvent*) (this=0x55da033dd2c0, e=0x7fff8cd06ca0) at /usr/src/debug/qt5-declarative/qtdeclarative/src/quick/items/qquickwindow.cpp:1865
#14 0x00007fde18d7893f in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x55da033dd2c0, e=0x7fff8cd06ca0) at kernel/qapplication.cpp:3640
#15 0x00007fde1969ab18 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x55da033dd2c0, event=0x7fff8cd06ca0) at kernel/qcoreapplication.cpp:1064
#16 0x00007fde1969ab83 in QCoreApplication::sendEvent(QObject*, QEvent*) (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1462
#17 0x00007fde19b3b8c5 in QPlatformWindow::deliverUpdateRequest() (this=<optimized out>) at kernel/qplatformwindow.cpp:796
#18 QPlatformWindow::windowEvent(QEvent*) (event=<optimized out>, this=0x55da03a54910) at kernel/qplatformwindow.cpp:476
#19 QGuiApplicationPrivate::sendQWindowEventToQPlatformWindow(QWindow*, QEvent*) (window=<optimized out>, event=<optimized out>) at kernel/qguiapplication.cpp:1987
#20 0x00007fde18d7cd63 in QApplication::notify(QObject*, QEvent*) (this=0x7fff8cd07350, receiver=0x55da033dd2c0, e=0x7fff8cd06f20) at kernel/qapplication.cpp:2882
#21 0x00007fde1969ab18 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x55da033dd2c0, event=0x7fff8cd06f20) at kernel/qcoreapplication.cpp:1064
#22 0x00007fde196e976b in QTimerInfoList::activateTimers() (this=0x55da01fa66b8) at kernel/qtimerinfo_unix.cpp:643
#23 0x00007fde196e97c1 in QEventDispatcherUNIXPrivate::activateTimers() (this=<optimized out>) at kernel/qeventdispatcher_unix.cpp:249
#24 0x00007fde196e9c41 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=<optimized out>, flags=...) at kernel/qeventdispatcher_unix.cpp:516
#25 0x000055da00d97382 in QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
#26 0x00007fde19699824 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fff8cd070c0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#27 0x00007fde1969acc3 in QCoreApplication::exec() () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#28 0x00007fde19b3b7c2 in QGuiApplication::exec() () at kernel/qguiapplication.cpp:1870
#29 0x00007fde18d76cda in QApplication::exec() () at kernel/qapplication.cpp:2832
#30 0x000055da00cb32cb in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/kwin/kwin-5.27.5/src/main_wayland.cpp:628
Warning: the current language does not match this frame.
Comment 1 David Edmundson 2023-05-25 21:30:13 UTC
Does it happen every time or just once randomly
Comment 2 Patrick Silva 2023-05-25 21:40:01 UTC
It already happened a few times. Can't reproduce consistently.
Comment 3 David Edmundson 2023-05-26 10:11:37 UTC
*** Bug 449324 has been marked as a duplicate of this bug. ***
Comment 4 David Edmundson 2023-05-26 10:11:47 UTC
*** Bug 459623 has been marked as a duplicate of this bug. ***
Comment 5 David Edmundson 2023-05-26 10:12:50 UTC
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.
Comment 6 David Gow 2024-01-31 09:27:58 UTC
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
Comment 7 Colin S 2024-10-06 18:03:11 UTC
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,