Bug 497278 - KWin crashes in KWin::GLFramebuffer::~GLFramebuffer when resuming from sleep
Summary: KWin crashes in KWin::GLFramebuffer::~GLFramebuffer when resuming from sleep
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 6.2.4
Platform: Manjaro Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: drkonqi, wayland-only
Depends on:
Blocks:
 
Reported: 2024-12-10 15:18 UTC by Thomas Bertels
Modified: 2025-02-05 15:18 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: https://invent.kde.org/plasma/kwin/-/commit/f9b4d2deb37128fd0d4f8cca35de7b649a713a51
Sentry Crash Report: https://crash-reports.kde.org/organizations/kde/issues/105223/events/2121e0aa626d4b9c9d30c8dceaf4768a/


Attachments
New crash information added by DrKonqi (83.61 KB, text/plain)
2024-12-10 15:18 UTC, Thomas Bertels
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Bertels 2024-12-10 15:18:24 UTC
Application: kwin_wayland (6.2.4)

ApplicationNotResponding [ANR]: false
Qt Version: 6.8.1
Frameworks Version: 6.8.0
Operating System: Linux 6.11.10-2-MANJARO x86_64
Windowing System: Wayland
Distribution: Manjaro Linux
DrKonqi: 6.2.4 [CoredumpBackend]

-- Information about the crash:
KWin crashed after resuming from sleep.
All Wayland apps crashed with it.

The reporter is unsure if this crash is reproducible.

-- Backtrace (Reduced):
#5  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#6  0x00007a1621ea5463 in __pthread_kill_internal (threadid=<optimized out>, signo=6) at pthread_kill.c:78
#7  0x00007a1621e4c120 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#8  0x00007a1621e334c3 in __GI_abort () at abort.c:79
#9  0x00007a1621e333df in __assert_fail_base (fmt=0x7a16102f1f75 "%s%s%s :%u : %s%s l'assertion « %s » a échoué.\n%n", assertion=assertion@entry=0x7a1625470ef0 "0 && \"Couldn't find current GLX or EGL context.\\n\"", file=file@entry=0x7a1625470ec8 "../libepoxy/src/dispatch_common.c", line=line@entry=872, function=function@entry=0x7a162547bcc0 <__PRETTY_FUNCTION__.0.lto_priv.0> "epoxy_get_proc_address") at assert.c:94


Reported using DrKonqi
Comment 1 Thomas Bertels 2024-12-10 15:18:25 UTC
Created attachment 176492 [details]
New crash information added by DrKonqi

DrKonqi auto-attaching complete backtrace.
Comment 2 Thomas Bertels 2024-12-10 15:21:54 UTC
I'm using the Nvidia binary driver if that's relevant.

Relevant journalctl entries:

déc. 10 15:39:37 User kwin_wayland[257600]: kwin_scene_opengl: A graphics reset attributable to the current GL context occurred.
déc. 10 15:39:37 User kwin_wayland_wrapper[257600]: kwin_wayland: ../libepoxy/src/dispatch_common.c :872 : epoxy_get_proc_address:  the assertion « 0 && "Couldn't find current GLX or EGL context.\n" » failed.
déc. 10 15:39:37 User kwin_wayland_wrapper[257600]: KCrash: Application 'kwin_wayland' crashing... crashRecursionCounter = 2
déc. 10 15:39:37 User systemd-coredump[387088]: Process 257600 (kwin_wayland) of user 1000 terminated abnormally with signal 6/ABRT, processing...
Comment 3 Thomas Bertels 2024-12-10 18:02:54 UTC
This seems to happen every time.
See also bug 497288 for the equivalent on X11.
Comment 4 Nate Graham 2024-12-10 23:44:48 UTC
Thread 1 (Thread 0x7a1611234f80 (LWP 257600)):
[KCrash Handler]
#5  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#6  0x00007a1621ea5463 in __pthread_kill_internal (threadid=<optimized out>, signo=6) at pthread_kill.c:78
#7  0x00007a1621e4c120 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#8  0x00007a1621e334c3 in __GI_abort () at abort.c:79
#9  0x00007a1621e333df in __assert_fail_base (fmt=0x7a16102f1f75 "%s%s%s :%u : %s%s l'assertion « %s » a échoué.\n%n", assertion=assertion@entry=0x7a1625470ef0 "0 && \"Couldn't find current GLX or EGL context.\\n\"", file=file@entry=0x7a1625470ec8 "../libepoxy/src/dispatch_common.c", line=line@entry=872, function=function@entry=0x7a162547bcc0 <__PRETTY_FUNCTION__.0.lto_priv.0> "epoxy_get_proc_address") at assert.c:94
#10 0x00007a1621e44177 in __assert_fail (assertion=assertion@entry=0x7a1625470ef0 "0 && \"Couldn't find current GLX or EGL context.\\n\"", file=file@entry=0x7a1625470ec8 "../libepoxy/src/dispatch_common.c", line=line@entry=872, function=function@entry=0x7a162547bcc0 <__PRETTY_FUNCTION__.0.lto_priv.0> "epoxy_get_proc_address") at assert.c:103
#11 0x00007a1625457c8c in epoxy_get_proc_address (name=0x7a1625462216 <entrypoint_strings.lto_priv+10038> "glDeleteRenderbuffers") at ../libepoxy/src/dispatch_common.c:872
#12 0x00007a16254061aa in epoxy_glDeleteRenderbuffers_resolver () at src/gl_generated_dispatch.c:81806
#13 epoxy_glDeleteRenderbuffers_global_rewrite_ptr (n=1, renderbuffers=0x58c7f2e34f34) at src/gl_generated_dispatch.c:115003
#14 0x00007a1624e61d75 in KWin::GLFramebuffer::~GLFramebuffer (this=0x58c7f2e34f30, this=<optimized out>) at /usr/src/debug/kwin/kwin-6.2.4/src/opengl/glframebuffer.cpp:119
#15 0x000058c7e8c7c798 in std::default_delete<KWin::GLFramebuffer>::operator() (this=<optimized out>, __ptr=0x58c7f2e34f30) at /usr/include/c++/14.2.1/bits/unique_ptr.h:87
#16 std::default_delete<KWin::GLFramebuffer>::operator() (this=<optimized out>, __ptr=0x58c7f2e34f30) at /usr/include/c++/14.2.1/bits/unique_ptr.h:87
#17 std::__uniq_ptr_impl<KWin::GLFramebuffer, std::default_delete<KWin::GLFramebuffer> >::reset (this=0x58c7f22b0098, __p=0x0) at /usr/include/c++/14.2.1/bits/unique_ptr.h:205
#18 std::unique_ptr<KWin::GLFramebuffer, std::default_delete<KWin::GLFramebuffer> >::reset (this=0x58c7f22b0098, __p=0x0) at /usr/include/c++/14.2.1/bits/unique_ptr.h:503
#19 KWin::QPA::EGLRenderTarget::~EGLRenderTarget (this=0x58c7f22b0090, this=<optimized out>) at /usr/src/debug/kwin/kwin-6.2.4/src/plugins/qpa/eglplatformcontext.cpp:38
#20 std::destroy_at<KWin::QPA::EGLRenderTarget> (__location=0x58c7f22b0090) at /usr/include/c++/14.2.1/bits/stl_construct.h:88
#21 std::_Destroy<KWin::QPA::EGLRenderTarget> (__pointer=0x58c7f22b0090) at /usr/include/c++/14.2.1/bits/stl_construct.h:149
#22 std::allocator_traits<std::allocator<void> >::destroy<KWin::QPA::EGLRenderTarget> (__p=0x58c7f22b0090) at /usr/include/c++/14.2.1/bits/alloc_traits.h:671
#23 std::_Sp_counted_ptr_inplace<KWin::QPA::EGLRenderTarget, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_M_dispose (this=0x58c7f22b0080) at /usr/include/c++/14.2.1/bits/shared_ptr_base.h:616
#24 0x000058c7e8c79e1a in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x58c7f22b0080) at /usr/include/c++/14.2.1/bits/shared_ptr_base.h:346
#25 std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x58c7f22b0080) at /usr/include/c++/14.2.1/bits/shared_ptr_base.h:317
#26 0x000058c7e8c7c07f in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count (this=0x58c7f1ec23b8, this=<optimized out>) at /usr/include/c++/14.2.1/bits/shared_ptr_base.h:1069
#27 std::__shared_ptr<KWin::QPA::EGLRenderTarget, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr (this=0x58c7f1ec23b0, this=<optimized out>) at /usr/include/c++/14.2.1/bits/shared_ptr_base.h:1525
#28 std::shared_ptr<KWin::QPA::EGLRenderTarget>::~shared_ptr (this=0x58c7f1ec23b0, this=<optimized out>) at /usr/include/c++/14.2.1/bits/shared_ptr.h:175
#29 std::destroy_at<std::shared_ptr<KWin::QPA::EGLRenderTarget> > (__location=0x58c7f1ec23b0) at /usr/include/c++/14.2.1/bits/stl_construct.h:88
#30 std::_Destroy<std::shared_ptr<KWin::QPA::EGLRenderTarget> > (__pointer=0x58c7f1ec23b0) at /usr/include/c++/14.2.1/bits/stl_construct.h:149
#31 std::_Destroy_aux<false>::__destroy<std::shared_ptr<KWin::QPA::EGLRenderTarget>*> (__first=0x58c7f1ec23b0, __last=<optimized out>) at /usr/include/c++/14.2.1/bits/stl_construct.h:163
#32 std::_Destroy<std::shared_ptr<KWin::QPA::EGLRenderTarget>*> (__first=<optimized out>, __last=<optimized out>) at /usr/include/c++/14.2.1/bits/stl_construct.h:196
#33 std::_Destroy<std::shared_ptr<KWin::QPA::EGLRenderTarget>*, std::shared_ptr<KWin::QPA::EGLRenderTarget> > (__first=<optimized out>, __last=<optimized out>) at /usr/include/c++/14.2.1/bits/alloc_traits.h:944
#34 std::vector<std::shared_ptr<KWin::QPA::EGLRenderTarget>, std::allocator<std::shared_ptr<KWin::QPA::EGLRenderTarget> > >::_M_erase_at_end (this=0x58c7f2a5ff50, __pos=0x58c7f1ec23b0) at /usr/include/c++/14.2.1/bits/stl_vector.h:1947
#35 std::vector<std::shared_ptr<KWin::QPA::EGLRenderTarget>, std::allocator<std::shared_ptr<KWin::QPA::EGLRenderTarget> > >::clear (this=0x58c7f2a5ff50) at /usr/include/c++/14.2.1/bits/stl_vector.h:1608
#36 KWin::QPA::EGLPlatformContext::makeCurrent (this=0x58c7f2a5fed0, surface=<optimized out>) at /usr/src/debug/kwin/kwin-6.2.4/src/plugins/qpa/eglplatformcontext.cpp:72
#37 0x00007a1622ef3268 in QOpenGLContext::makeCurrent (this=0x58c7f27d2c00, surface=0x58c7f31fb630) at /usr/src/debug/qt6-base/qtbase/src/gui/kernel/qopenglcontext.cpp:680
#38 0x00007a16230d0522 in QRhiGles2::ensureContext(QSurface*) const [clone .constprop.0] (this=0x58c7f30992b0, surface=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/gui/rhi/qrhigles2.cpp:646
#39 0x00007a16246f4ddd in QSGGuiThreadRenderLoop::windowDestroyed (this=0x58c7f1eb5340, window=0x58c7f2cce670) at /usr/src/debug/qt6-declarative/qtdeclarative/src/quick/scenegraph/qsgrenderloop.cpp:345
#40 0x00007a162465e34e in QQuickWindow::~QQuickWindow (this=0x58c7f2cce670, this=<optimized out>) at /usr/src/debug/qt6-declarative/qtdeclarative/src/quick/items/qquickwindow.cpp:1188
#41 0x00007a1624801a49 in QQuickWindowQmlImpl::~QQuickWindowQmlImpl (this=0x58c7f2cce670, this=<optimized out>) at /usr/src/debug/qt6-declarative/qtdeclarative/src/quick/items/qquickwindowmodule.cpp:62
#42 QQmlPrivate::QQmlElement<QQuickWindowQmlImpl>::~QQmlElement (this=0x58c7f2cce670, this=<optimized out>) at /usr/src/debug/qt6-declarative/qtdeclarative/src/qml/qml/qqmlprivate.h:104
#43 QQmlPrivate::QQmlElement<QQuickWindowQmlImpl>::~QQmlElement (this=0x58c7f2cce670, this=<optimized out>) at /usr/src/debug/qt6-declarative/qtdeclarative/src/qml/qml/qqmlprivate.h:104
#44 0x00007a1624e862c9 in std::default_delete<QObject>::operator() (this=<optimized out>, __ptr=<optimized out>) at /usr/include/c++/14.2.1/bits/unique_ptr.h:93
#45 std::unique_ptr<QObject, std::default_delete<QObject> >::~unique_ptr (this=0x58c7f333c2c0, this=<optimized out>) at /usr/include/c++/14.2.1/bits/unique_ptr.h:398
#46 KWin::CompositedOutlineVisual::~CompositedOutlineVisual (this=0x58c7f333c2a0, this=<optimized out>) at /usr/src/debug/kwin/kwin-6.2.4/src/outline.cpp:152
#47 KWin::CompositedOutlineVisual::~CompositedOutlineVisual (this=0x58c7f333c2a0, this=<optimized out>) at /usr/src/debug/kwin/kwin-6.2.4/src/outline.cpp:152
#48 0x00007a1624e85f37 in std::default_delete<KWin::OutlineVisual>::operator() (this=<optimized out>, __ptr=<optimized out>) at /usr/include/c++/14.2.1/bits/unique_ptr.h:87
#49 std::__uniq_ptr_impl<KWin::OutlineVisual, std::default_delete<KWin::OutlineVisual> >::reset (this=0x7a160c0129f0, __p=0x0) at /usr/include/c++/14.2.1/bits/unique_ptr.h:205
#50 std::unique_ptr<KWin::OutlineVisual, std::default_delete<KWin::OutlineVisual> >::reset (this=0x7a160c0129f0, __p=0x0) at /usr/include/c++/14.2.1/bits/unique_ptr.h:503
#51 KWin::Outline::compositingChanged (this=0x7a160c0129e0) at /usr/src/debug/kwin/kwin-6.2.4/src/outline.cpp:112
#52 0x00007a16225b1b29 in QtPrivate::QSlotObjectBase::call (this=0x58c7f14bd6f0, r=0x7a160c0129e0, a=0x7ffc738241e0, this=<optimized out>, r=<optimized out>, a=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobjectdefs_impl.h:486
#53 doActivate<false> (sender=<optimized out>, signal_index=<optimized out>, argv=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:4124
#54 0x00007a1624d5f812 in KWin::Compositor::compositingToggled (this=<optimized out>, _t1=<optimized out>) at /usr/src/debug/kwin/build/src/kwin_autogen/include/moc_compositor.cpp:202
#55 0x00007a1624d711ac in KWin::WaylandCompositor::stop (this=0x58c7f133edc0) at /usr/src/debug/kwin/kwin-6.2.4/src/compositor_wayland.cpp:258
#56 KWin::WaylandCompositor::stop (this=0x58c7f133edc0) at /usr/src/debug/kwin/kwin-6.2.4/src/compositor_wayland.cpp:220
#57 0x00007a1624d5cd09 in KWin::Compositor::reinitialize (this=0x58c7f133edc0) at /usr/src/debug/kwin/kwin-6.2.4/src/compositor.cpp:131
#58 0x00007a1624d74109 in KWin::WaylandCompositor::composite (this=0x58c7f133edc0, renderLoop=<optimized out>) at /usr/src/debug/kwin/kwin-6.2.4/src/compositor_wayland.cpp:302
#59 0x00007a16225b1b29 in QtPrivate::QSlotObjectBase::call (this=0x58c7f1501df0, r=0x58c7f133edc0, a=0x7ffc73824830, this=<optimized out>, r=<optimized out>, a=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobjectdefs_impl.h:486
#60 doActivate<false> (sender=<optimized out>, signal_index=<optimized out>, argv=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:4124
#61 0x00007a1624d8c175 in KWin::RenderLoop::frameRequested (this=<optimized out>, _t1=<optimized out>) at /usr/src/debug/kwin/build/src/kwin_autogen/include/moc_renderloop.cpp:211
#62 0x00007a1624d86f13 in KWin::RenderLoopPrivate::dispatch (this=0x58c7f18a8dd0) at /usr/src/debug/kwin/kwin-6.2.4/src/core/renderloop.cpp:190
#63 0x00007a16225b1b29 in QtPrivate::QSlotObjectBase::call (this=0x58c7f18a0290, r=0x58c7f1284b90, a=0x7ffc73824960, this=<optimized out>, r=<optimized out>, a=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobjectdefs_impl.h:486
#64 doActivate<false> (sender=<optimized out>, signal_index=<optimized out>, argv=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:4124
#65 0x00007a16225bab35 in QTimer::timeout (this=0x58c7f18a9010, _t1=...) at /usr/src/debug/qt6-base/build/src/corelib/Core_autogen/include/moc_qtimer.cpp:223
#66 QTimer::timerEvent (e=<optimized out>, this=0x58c7f18a9010) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qtimer.cpp:285
#67 QTimer::timerEvent (this=0x58c7f18a9010, e=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qtimer.cpp:279
#68 0x00007a16225a2d49 in QObject::event (this=0x58c7f18a9010, e=0x7ffc73824b20) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:1393
#69 0x00007a16234fe78a in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x58c7f18a9010, e=0x7ffc73824b20) at /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qapplication.cpp:3296
#70 0x00007a1622557ac8 in QCoreApplication::notifyInternal2 (receiver=0x58c7f18a9010, event=0x7ffc73824b20) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1168
#71 0x00007a16226d6b1f in QCoreApplication::sendEvent (receiver=<optimized out>, event=0x7ffc73824b20) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1612
#72 QTimerInfoList::activateTimers (this=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qtimerinfo_unix.cpp:426
#73 0x00007a16226defc8 in QEventDispatcherUNIXPrivate::activateTimers (this=0x58c7f11ed590) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventdispatcher_unix.cpp:199
#74 QEventDispatcherUNIX::processEvents (this=<optimized out>, flags=..., flags@entry=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventdispatcher_unix.cpp:475
#75 0x00007a162304ea33 in QUnixEventDispatcherQPA::processEvents (this=<optimized out>, flags=...) at /usr/src/debug/qt6-base/qtbase/src/gui/platform/unix/qunixeventdispatcher.cpp:27
#76 0x00007a1622561ee6 in QEventLoop::processEvents (this=0x7ffc73824d70, flags=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventloop.cpp:103
#77 QEventLoop::exec (this=0x7ffc73824d70, flags=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventloop.cpp:194
#78 0x00007a1622558f4f in QCoreApplication::exec () at /usr/src/debug/qt6-base/qtbase/src/corelib/global/qflags.h:74
#79 0x00007a16234fa6ba in QApplication::exec () at /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qapplication.cpp:2564
#80 0x000058c7e8c4f0dd in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/kwin/kwin-6.2.4/src/main_wayland.cpp:630