Bug 483125 - KWin crashes in KWin::DrmGpu::activeChanged() on resume on Wayland
Summary: KWin crashes in KWin::DrmGpu::activeChanged() on resume on Wayland
Status: RESOLVED DUPLICATE of bug 483008
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 6.0.1
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-10 15:37 UTC by Giovanni Santini
Modified: 2024-03-15 14:45 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Core dump trace from coredumpctl (25.45 KB, text/x-log)
2024-03-10 15:37 UTC, Giovanni Santini
Details
Journal log including the error (1.25 MB, text/x-log)
2024-03-10 15:37 UTC, Giovanni Santini
Details
KWin support information (7.50 KB, text/plain)
2024-03-10 15:38 UTC, Giovanni Santini
Details
New coredump of kwin (30.25 KB, text/plain)
2024-03-11 15:41 UTC, Giovanni Santini
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Giovanni Santini 2024-03-10 15:37:11 UTC
Created attachment 166883 [details]
Core dump trace from coredumpctl

SUMMARY
KWin, after entering sleep mode, crashes on wakeup and loses all of the open windows.
This started happening only after updating to Plasma 6.

STEPS TO REPRODUCE
1. Let KWin sleep
2. Awake the laptop

OBSERVED RESULT
DrKonqi mentions about a crash, however I am not able to report it via the tool, thus I am opening the report manually.

EXPECTED RESULT
No crash in KWin, smooth OS resume.

SOFTWARE/OS VERSIONS
*Copied from *About this System**
Operating System: Arch Linux 
KDE Plasma Version: 6.0.1
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.6.21-1-lts (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 4800H with Radeon Graphics
Memory: 15,0 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: ASUS TUF Gaming A15 FA506IV_FX506IV
System Version: 1.0

ADDITIONAL INFORMATION
This happens on both Linux 6.6 LTS and Linux 6.7.
I didn't have this issue on the latest 5.27 Plasma.
I've added the boot journalctl and the coredumpctl information as per guidelines as attachment.
I am available for providing more information & test things, just ping me here. :)
Comment 1 Giovanni Santini 2024-03-10 15:37:41 UTC
Created attachment 166884 [details]
Journal log including the error
Comment 2 Giovanni Santini 2024-03-10 15:38:56 UTC
Created attachment 166885 [details]
KWin support information
Comment 3 Giovanni Santini 2024-03-11 15:41:08 UTC
Created attachment 166962 [details]
New coredump of kwin

Added an additional coredump.
Comment 4 Nate Graham 2024-03-11 19:18:57 UTC
[Current thread is 1 (Thread 0x7a85c27ada00 (LWP 1315))]
(gdb) backtrace
#0  std::__atomic_base<QObjectPrivate::Connection*>::load (__m=std::memory_order_acquire, this=0x71) at /usr/include/c++/13.2.1/atomic:576
#1  std::atomic<QObjectPrivate::Connection*>::load (__m=std::memory_order_acquire, this=0x71) at /usr/include/c++/13.2.1/atomic:577
#2  QAtomicOps<QObjectPrivate::Connection*>::loadAcquire<QObjectPrivate::Connection*> (_q_value=<error reading variable: Cannot access memory at address 0x71>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/thread/qatomic_cxx11.h:213
#3  QBasicAtomicPointer<QObjectPrivate::Connection>::loadAcquire (this=0x71) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/thread/qbasicatomic.h:179
#4  QObjectPrivate::maybeSignalConnected (this=<optimized out>, signalIndex=3) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qobject.cpp:484
#5  0x00007a85c7b90b00 in doActivate<false> (sender=0x608197a25dc0, signal_index=3, argv=0x7ffd4a3066f0) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qobject.cpp:3941
#6  0x00007a85ca5e8807 in KWin::DrmGpu::activeChanged (_t1=<optimized out>, this=0x608197a25dc0) at /usr/src/debug/kwin/build/src/kwin_autogen/include/moc_drm_gpu.cpp:333
#7  KWin::DrmGpu::setActive (this=0x608197a25dc0, active=true) at /usr/src/debug/kwin/kwin-6.0.1/src/backends/drm/drm_gpu.cpp:734
#8  0x00007a85c7b90ca9 in QtPrivate::QSlotObjectBase::call (a=0x7ffd4a306830, r=0x7a85bc0099b0, this=0x6081978360c0, this=<optimized out>, r=<optimized out>, a=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qobjectdefs_impl.h:433
#9  doActivate<false> (sender=0x60819782e680, signal_index=5, argv=0x7ffd4a306830) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qobject.cpp:4039
#10 0x00007a85ca37ede7 in KWin::Session::deviceResumed (this=<optimized out>, _t1=<optimized out>) at /usr/src/debug/kwin/build/src/kwin_autogen/include/moc_session.cpp:236
#11 0x00007a85ca38b9cb in KWin::LogindSession::handleResumeDevice (fileDescriptor=..., minor=<optimized out>, major=<optimized out>, this=0x60819782e680) at /usr/src/debug/kwin/kwin-6.0.1/src/core/session_logind.cpp:330
#12 KWin::LogindSession::qt_static_metacall (_o=0x60819782e680, _id=<optimized out>, _a=0x7ffd4a306aa8, _c=<optimized out>) at /usr/src/debug/kwin/build/src/kwin_autogen/include/moc_session_logind.cpp:176
#13 0x00007a85ca38bc01 in KWin::LogindSession::qt_static_metacall (_a=0x7ffd4a306aa8, _id=0, _c=QMetaObject::InvokeMetaMethod, _o=0x60819782e680) at /usr/src/debug/kwin/build/src/kwin_autogen/include/moc_session_logind.cpp:170
#14 KWin::LogindSession::qt_metacall (this=0x60819782e680, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7ffd4a306aa8) at /usr/src/debug/kwin/build/src/kwin_autogen/include/moc_session_logind.cpp:216
#15 0x00007a85c8a550ce in QDBusConnectionPrivate::deliverCall (this=0x7a85bc009510, object=0x60819782e680, msg=..., metaTypes=<optimized out>, slotIdx=9) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/dbus/qdbusintegrator.cpp:977
#16 0x00007a85c7b7c2c7 in QObject::event (this=0x60819782e680, e=0x7a85bc038d10) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qobject.cpp:1437
#17 0x00007a85c8cf438b in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x60819782e680, e=0x7a85bc038d10) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/widgets/kernel/qapplication.cpp:3296
#18 0x00007a85c7b39818 in QCoreApplication::notifyInternal2 (receiver=0x60819782e680, event=event@entry=0x7a85bc038d10) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qcoreapplication.cpp:1121
#19 0x00007a85c7b39b9b in QCoreApplication::sendEvent (event=0x7a85bc038d10, receiver=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qcoreapplication.cpp:1539
#20 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x60819772e430) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qcoreapplication.cpp:1901
#21 0x00007a85c7c9f18f in QEventDispatcherUNIX::processEvents (this=0x608197766030, flags=flags@entry=...) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qeventdispatcher_unix.cpp:431
#22 0x00007a85c85b26e2 in QUnixEventDispatcherQPA::processEvents (this=<optimized out>, flags=...) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/gui/platform/unix/qunixeventdispatcher.cpp:27
#23 0x00007a85c7b43d6e in QEventLoop::processEvents (flags=..., this=0x7ffd4a307010) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qeventloop.cpp:100
#24 QEventLoop::exec (this=0x7ffd4a307010, flags=...) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qeventloop.cpp:182
#25 0x00007a85c7b3c2b8 in QCoreApplication::exec () at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/global/qflags.h:74
#26 0x00007a85c8cf0f0a in QApplication::exec () at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/widgets/kernel/qapplication.cpp:2574
#27 0x000060819662ddee in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/kwin/kwin-6.0.1/src/main_wayland.cpp:609
Comment 5 Giovanni Santini 2024-03-12 13:43:40 UTC
Hi Nate :)
Fan of your blog ;)

Is that one of my logs or is it from you?
Comment 6 Nate Graham 2024-03-13 18:09:55 UTC
Thanks!

I was pasting the text from your backtrace file into the bug report, so that it becomes globally searchable.
Comment 7 Zamundaaa 2024-03-15 02:31:49 UTC
Everything after frame #5 looks reasonable, but at #3 we have some wrong memory access. I'm not quite sure what could cause it though
Comment 8 Zamundaaa 2024-03-15 14:45:06 UTC
*** This bug has been marked as a duplicate of bug 483008 ***