Bug 507613 - kwin_wayland often crashes in std::__atomic_base<T>::fetch_add
Summary: kwin_wayland often crashes in std::__atomic_base<T>::fetch_add
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: generic-crash (other bugs)
Version First Reported In: 6.4.3
Platform: Neon Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2025-07-28 22:38 UTC by NitramO
Modified: 2025-07-30 21:10 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report: https://crash-reports.kde.org/organizations/kde/issues/225504/events/58768fef85e14a418e357c6c38a6e7a8/


Attachments
New crash information added by DrKonqi (109.18 KB, text/plain)
2025-07-28 22:38 UTC, NitramO
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NitramO 2025-07-28 22:38:26 UTC
Application: kwin_wayland (6.4.3)

ApplicationNotResponding [ANR]: false
Qt Version: 6.9.1
Frameworks Version: 6.16.0
Operating System: Linux 6.14.0-24-generic x86_64
Windowing System: Wayland
Distribution: KDE neon User Edition
DrKonqi: 6.4.3 [CoredumpBackend]

-- Information about the crash:
It crashed while I was just using my computer. (Like I opened or closed Brave Browser and Dolphin file explorer or something) It's been happening more and more since the last two updates... This is one of the reasons why I left Windows to switch to Linux, it's starting to bother me...

The reporter is unsure if this crash is reproducible.

-- Backtrace (Reduced):
#6  std::__atomic_base<int>::fetch_add (this=0x4d1, __i=1, __m=std::memory_order::acq_rel) at /usr/include/c++/14/bits/atomic_base.h:629
#7  QAtomicOps<int>::ref<int> (_q_value=<error reading variable: Cannot access memory at address 0x4d1>) at /usr/include/x86_64-linux-gnu/qt6/QtCore/qatomic_cxx11.h:259
[...]
#11 QArrayDataPointer<KWin::VirtualDesktop*>::QArrayDataPointer (this=0x7ffc703e3590, other=...) at /usr/include/x86_64-linux-gnu/qt6/QtCore/qarraydatapointer.h:40
#12 QList<KWin::VirtualDesktop*>::QList (this=0x7ffc703e3590, this=<optimized out>) at /usr/include/x86_64-linux-gnu/qt6/QtCore/qlist.h:76
#13 KWin::Window::desktops (this=this@entry=0x6288110fe090) at /usr/src/kwin-4:6.4.3-0zneon+24.04+noble+release+build48/src/window.cpp:806
#14 0x0000754b20a3ad30 in KWin::Window::isOnAllDesktops (this=0x6288110fe090) at /usr/src/kwin-4:6.4.3-0zneon+24.04+noble+release+build48/src/window.h:2090
#15 KWin::Window::isOnDesktop (this=0x6288110fe090, desktop=0x62880e889680) at /usr/src/kwin-4:6.4.3-0zneon+24.04+noble+release+build48/src/window.cpp:824
#16 0x0000754b20c0967d in KWin::TabBox::TabBoxHandlerImpl::checkDesktop (this=0x62880e79dc80, client=0x6288110fe090) at /usr/src/kwin-4:6.4.3-0zneon+24.04+noble+release+build48/src/tabbox/tabbox.cpp:94
#17 KWin::TabBox::TabBoxHandlerImpl::clientToAddToList (this=0x62880e79dc80, client=0x6288110fe090) at /usr/src/kwin-4:6.4.3-0zneon+24.04+noble+release+build48/src/tabbox/tabbox.cpp:163
#18 0x0000754b20c0f0df in KWin::TabBox::ClientModel::createFocusChainClientList (this=0x62880e7b90f0, start=<optimized out>) at /usr/src/kwin-4:6.4.3-0zneon+24.04+noble+release+build48/src/tabbox/clientmodel.cpp:158
#19 KWin::TabBox::ClientModel::createClientList (this=0x62880e7b90f0, partialReset=true) at /usr/src/kwin-4:6.4.3-0zneon+24.04+noble+release+build48/src/tabbox/clientmodel.cpp:213
#20 KWin::TabBox::TabBoxHandler::createModel (this=0x62880e79dc80, partialReset=true) at /usr/src/kwin-4:6.4.3-0zneon+24.04+noble+release+build48/src/tabbox/tabboxhandler.cpp:474
#21 KWin::TabBox::TabBox::reset (this=0x62880dc84eb0, partial_reset=true) at /usr/src/kwin-4:6.4.3-0zneon+24.04+noble+release+build48/src/tabbox/tabbox.cpp:400
#22 0x0000754b20a5150b in KWin::Workspace::addWaylandWindow (this=0x62880dc135c0, window=<optimized out>) at /usr/src/kwin-4:6.4.3-0zneon+24.04+noble+release+build48/src/workspace.cpp:786
#23 0x0000754b1e07cce9 in QtPrivate::QSlotObjectBase::call (a=0x7ffc703e3880, r=<optimized out>, this=0x62880eb1c450, this=<optimized out>, r=<optimized out>, a=<optimized out>) at /usr/src/qt6-base-6.9.1-0zneon+24.04+noble+release+build117/src/corelib/kernel/qobjectdefs_impl.h:461
#24 doActivate<false> (sender=0x62880da09ff0, signal_index=3, argv=0x7ffc703e3880) at /usr/src/qt6-base-6.9.1-0zneon+24.04+noble+release+build117/src/corelib/kernel/qobject.cpp:4146


Reported using DrKonqi
Comment 1 NitramO 2025-07-28 22:38:27 UTC
Created attachment 183614 [details]
New crash information added by DrKonqi

DrKonqi auto-attaching complete backtrace.
Comment 2 TraceyC 2025-07-28 23:04:15 UTC
Searchable backtrace


Thread 1 (Thread 0x754b0cf99d80 (LWP 2892)):
[KCrash Handler]
#6  std::__atomic_base<int>::fetch_add (this=0x4d1, __i=1, __m=std::memory_order::acq_rel) at /usr/include/c++/14/bits/atomic_base.h:629
#7  QAtomicOps<int>::ref<int> (_q_value=<error reading variable: Cannot access memory at address 0x4d1>) at /usr/include/x86_64-linux-gnu/qt6/QtCore/qatomic_cxx11.h:259
#8  QBasicAtomicInteger<int>::ref (this=0x4d1) at /usr/include/x86_64-linux-gnu/qt6/QtCore/qbasicatomic.h:47
#9  QArrayData::ref (this=0x4d1, this=<optimized out>) at /usr/include/x86_64-linux-gnu/qt6/QtCore/qarraydata.h:59
#10 QArrayDataPointer<KWin::VirtualDesktop*>::ref (this=0x7ffc703e3590) at /usr/include/x86_64-linux-gnu/qt6/QtCore/qarraydatapointer.h:451
#11 QArrayDataPointer<KWin::VirtualDesktop*>::QArrayDataPointer (this=0x7ffc703e3590, other=...) at /usr/include/x86_64-linux-gnu/qt6/QtCore/qarraydatapointer.h:40
#12 QList<KWin::VirtualDesktop*>::QList (this=0x7ffc703e3590, this=<optimized out>) at /usr/include/x86_64-linux-gnu/qt6/QtCore/qlist.h:76
#13 KWin::Window::desktops (this=this@entry=0x6288110fe090) at /usr/src/kwin-4:6.4.3-0zneon+24.04+noble+release+build48/src/window.cpp:806
#14 0x0000754b20a3ad30 in KWin::Window::isOnAllDesktops (this=0x6288110fe090) at /usr/src/kwin-4:6.4.3-0zneon+24.04+noble+release+build48/src/window.h:2090
#15 KWin::Window::isOnDesktop (this=0x6288110fe090, desktop=0x62880e889680) at /usr/src/kwin-4:6.4.3-0zneon+24.04+noble+release+build48/src/window.cpp:824
#16 0x0000754b20c0967d in KWin::TabBox::TabBoxHandlerImpl::checkDesktop (this=0x62880e79dc80, client=0x6288110fe090) at /usr/src/kwin-4:6.4.3-0zneon+24.04+noble+release+build48/src/tabbox/tabbox.cpp:94
#17 KWin::TabBox::TabBoxHandlerImpl::clientToAddToList (this=0x62880e79dc80, client=0x6288110fe090) at /usr/src/kwin-4:6.4.3-0zneon+24.04+noble+release+build48/src/tabbox/tabbox.cpp:163
#18 0x0000754b20c0f0df in KWin::TabBox::ClientModel::createFocusChainClientList (this=0x62880e7b90f0, start=<optimized out>) at /usr/src/kwin-4:6.4.3-0zneon+24.04+noble+release+build48/src/tabbox/clientmodel.cpp:158
#19 KWin::TabBox::ClientModel::createClientList (this=0x62880e7b90f0, partialReset=true) at /usr/src/kwin-4:6.4.3-0zneon+24.04+noble+release+build48/src/tabbox/clientmodel.cpp:213
#20 KWin::TabBox::TabBoxHandler::createModel (this=0x62880e79dc80, partialReset=true) at /usr/src/kwin-4:6.4.3-0zneon+24.04+noble+release+build48/src/tabbox/tabboxhandler.cpp:474
#21 KWin::TabBox::TabBox::reset (this=0x62880dc84eb0, partial_reset=true) at /usr/src/kwin-4:6.4.3-0zneon+24.04+noble+release+build48/src/tabbox/tabbox.cpp:400
#22 0x0000754b20a5150b in KWin::Workspace::addWaylandWindow (this=0x62880dc135c0, window=<optimized out>) at /usr/src/kwin-4:6.4.3-0zneon+24.04+noble+release+build48/src/workspace.cpp:786
#23 0x0000754b1e07cce9 in QtPrivate::QSlotObjectBase::call (a=0x7ffc703e3880, r=<optimized out>, this=0x62880eb1c450, this=<optimized out>, r=<optimized out>, a=<optimized out>) at /usr/src/qt6-base-6.9.1-0zneon+24.04+noble+release+build117/src/corelib/kernel/qobjectdefs_impl.h:461
#24 doActivate<false> (sender=0x62880da09ff0, signal_index=3, argv=0x7ffc703e3880) at /usr/src/qt6-base-6.9.1-0zneon+24.04+noble+release+build117/src/corelib/kernel/qobject.cpp:4146
#25 0x0000754b20a2aad1 in QMetaObject::activate<void, KWin::Window*> (sender=<optimized out>, mo=<optimized out>, local_signal_index=0, ret=0x0, sender=<optimized out>, mo=<optimized out>, local_signal_index=<optimized out>, ret=<optimized out>) at /usr/include/x86_64-linux-gnu/qt6/QtCore/qobjectdefs.h:306
#26 KWin::WaylandServer::windowAdded (this=<optimized out>, _t1=<optimized out>) at /usr/src/kwin-4:6.4.3-0zneon+24.04+noble+release+build48/obj-x86_64-linux-gnu/src/kwin_autogen/include/moc_wayland_server.cpp:149
#27 0x0000754b1e07cce9 in QtPrivate::QSlotObjectBase::call (a=0x7ffc703e3928, r=<optimized out>, this=0x62880f4a4ea0, this=<optimized out>, r=<optimized out>, a=<optimized out>) at /usr/src/qt6-base-6.9.1-0zneon+24.04+noble+release+build117/src/corelib/kernel/qobjectdefs_impl.h:461
#28 doActivate<false> (sender=0x628812c39820, signal_index=61, argv=0x7ffc703e3928) at /usr/src/qt6-base-6.9.1-0zneon+24.04+noble+release+build117/src/corelib/kernel/qobject.cpp:4146
#29 0x0000754b1e07cce9 in QtPrivate::QSlotObjectBase::call (a=0x7ffc703e39f8, r=<optimized out>, this=0x62880ff5ef20, this=<optimized out>, r=<optimized out>, a=<optimized out>) at /usr/src/qt6-base-6.9.1-0zneon+24.04+noble+release+build117/src/corelib/kernel/qobjectdefs_impl.h:461
#30 doActivate<false> (sender=0x628810540d50, signal_index=26, argv=0x7ffc703e39f8) at /usr/src/qt6-base-6.9.1-0zneon+24.04+noble+release+build117/src/corelib/kernel/qobject.cpp:4146
#31 0x0000754b20bb8a3f in KWin::SurfaceInterfacePrivate::applyState (this=0x6288135abe90, next=<optimized out>) at /usr/src/kwin-4:6.4.3-0zneon+24.04+noble+release+build48/src/wayland/surface.cpp:805
#32 0x0000754b20be52a4 in KWin::Transaction::apply (this=0x628810cb5b10) at /usr/src/kwin-4:6.4.3-0zneon+24.04+noble+release+build48/src/wayland/transaction.cpp:169
#33 0x0000754b1be2ab16 in ffi_call_unix64 () at ../src/x86/unix64.S:104
#34 0x0000754b1be273ef in ffi_call_int (cif=cif@entry=0x7ffc703e4220, fn=<optimized out>, rvalue=<optimized out>, avalue=<optimized out>, closure=closure@entry=0x0) at ../src/x86/ffi64.c:673
#35 0x0000754b1be2a0be in ffi_call (cif=cif@entry=0x7ffc703e4220, fn=<optimized out>, rvalue=rvalue@entry=0x0, avalue=avalue@entry=0x7ffc703e42f0) at ../src/x86/ffi64.c:710
#36 0x0000754b1daaa673 in wl_closure_invoke (closure=closure@entry=0x62880f6f1d80, target=<optimized out>, target@entry=0x62881279d2c0, opcode=opcode@entry=6, data=<optimized out>, data@entry=0x62880f87b240, flags=2) at ../src/connection.c:1228
#37 0x0000754b1daaf39e in wl_client_connection_data (fd=<optimized out>, mask=<optimized out>, data=0x62880f87b240) at ../src/wayland-server.c:444
#38 0x0000754b1daad7f2 in wl_event_loop_dispatch (loop=0x62880dade400, timeout=<optimized out>) at ../src/event-loop.c:1105
#39 0x0000754b20b50249 in KWin::Display::dispatchEvents (this=<optimized out>) at /usr/src/kwin-4:6.4.3-0zneon+24.04+noble+release+build48/src/wayland/display.cpp:138
#40 0x0000754b1e07cce9 in QtPrivate::QSlotObjectBase::call (a=0x7ffc703e4920, r=<optimized out>, this=0x62880ee167b0, this=<optimized out>, r=<optimized out>, a=<optimized out>) at /usr/src/qt6-base-6.9.1-0zneon+24.04+noble+release+build117/src/corelib/kernel/qobjectdefs_impl.h:461
#41 doActivate<false> (sender=0x62880ee5f430, signal_index=3, argv=0x7ffc703e4920) at /usr/src/qt6-base-6.9.1-0zneon+24.04+noble+release+build117/src/corelib/kernel/qobject.cpp:4146
#42 0x0000754b1e12fb23 in QMetaObject::activate<void, QSocketDescriptor, QSocketNotifier::Type, QSocketNotifier::QPrivateSignal> (ret=0x0, local_signal_index=0, mo=<optimized out>, sender=0x62880ee5f430) at /usr/src/qt6-base-6.9.1-0zneon+24.04+noble+release+build117/src/corelib/kernel/qobjectdefs.h:306
#43 QSocketNotifier::activated (this=this@entry=0x62880ee5f430, _t1=..., _t2=<optimized out>, _t3=...) at /usr/src/qt6-base-6.9.1-0zneon+24.04+noble+release+build117/obj-x86_64-linux-gnu/src/corelib/Core_autogen/include/moc_qsocketnotifier.cpp:161
#44 0x0000754b1e12fcc0 in QSocketNotifier::event (this=0x62880ee5f430, e=<optimized out>) at /usr/src/qt6-base-6.9.1-0zneon+24.04+noble+release+build117/src/corelib/kernel/qsocketnotifier.cpp:327
#45 0x0000754b1f43e21d in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x62880ee5f430, e=0x7ffc703e4a70) at /usr/src/qt6-base-6.9.1-0zneon+24.04+noble+release+build117/src/widgets/kernel/qapplication.cpp:3303
#46 0x0000754b1e0b6340 in QCoreApplication::notifyInternal2 (receiver=0x62880ee5f430, event=0x7ffc703e4a70) at /usr/src/qt6-base-6.9.1-0zneon+24.04+noble+release+build117/src/corelib/kernel/qcoreapplication.cpp:1106
#47 0x0000754b1df965cc in QEventDispatcherUNIXPrivate::activateSocketNotifiers (this=this@entry=0x62880da112f0) at /usr/src/qt6-base-6.9.1-0zneon+24.04+noble+release+build117/src/corelib/kernel/qeventdispatcher_unix.cpp:254
#48 0x0000754b1df970d4 in QEventDispatcherUNIX::processEvents (this=<optimized out>, flags=..., flags@entry=...) at /usr/src/qt6-base-6.9.1-0zneon+24.04+noble+release+build117/src/corelib/kernel/qeventdispatcher_unix.cpp:470
#49 0x0000754b1eb74952 in QUnixEventDispatcherQPA::processEvents (this=<optimized out>, flags=...) at /usr/src/qt6-base-6.9.1-0zneon+24.04+noble+release+build117/src/gui/platform/unix/qunixeventdispatcher.cpp:27
#50 0x0000754b1e0c0b6b in QEventLoop::exec (this=0x7ffc703e4c50, flags=...) at /usr/src/qt6-base-6.9.1-0zneon+24.04+noble+release+build117/src/corelib/global/qflags.h:77
#51 0x0000754b1e0b96ef in QCoreApplication::exec () at /usr/src/qt6-base-6.9.1-0zneon+24.04+noble+release+build117/src/corelib/global/qflags.h:77
#52 0x0000754b1e6de8fd in QGuiApplication::exec () at /usr/src/qt6-base-6.9.1-0zneon+24.04+noble+release+build117/src/gui/kernel/qguiapplication.cpp:1986
#53 0x0000754b1f43a4f9 in QApplication::exec () at /usr/src/qt6-base-6.9.1-0zneon+24.04+noble+release+build117/src/widgets/kernel/qapplication.cpp:2570
#54 0x00006287d147c548 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/kwin-4:6.4.3-0zneon+24.04+noble+release+build48/src/main_wayland.cpp:635
Comment 3 Vlad Zahorodnii 2025-07-29 09:57:02 UTC
If you find a reliable way to reproduce the crash, please let us know.
Comment 4 NitramO 2025-07-30 21:00:04 UTC
(In reply to Vlad Zahorodnii from comment #3)
> If you find a reliable way to reproduce the crash, please let us know.

You should look at bug 507673 https://bugs.kde.org/show_bug.cgi?id=507673
Comment 5 TraceyC 2025-07-30 21:08:51 UTC
The other report has a different backtrace