Bug 488640

Summary: Kwin (wayland) crashes after idle for about one hour
Product: [Plasma] kwin Reporter: Leandro Santiago da Silva <leandrosansilva>
Component: coreAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: crash CC: xaver.hugl
Priority: NOR    
Version: 6.0.5   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: backtrace from all threads obtained from attaching gdb to kwin_wayland

Description Leandro Santiago da Silva 2024-06-17 20:57:49 UTC
Created attachment 170581 [details]
backtrace from all threads obtained from attaching gdb to kwin_wayland

SUMMARY

KWin crashes when my monitors go off due to the energy saving policy.

I have three screens connected to HDMI and DisplayPort.

I can reproduce this bug since the Plasma 5 days and have reported it already months ago, but it was closed as I could not get more info (https://bugs.kde.org/show_bug.cgi?id=480992).

I now can reproduce the bug quite easily. It simply takes me hours to to so, as the bug happens after I stay away from the computer for a long time :-(

It turns out I managed to attach gdb to kwin_wayland  (connected from another computer, via ssh, as drkonqi is not triggered) and get a backtrace and a coredump. I am posting a backtrace here (thread apply all bt -full). I can submit the coredump upon request.

STEPS TO REPRODUCE
1.  have three screens connected to hdmi and displayports
2.  set the energy policies to shutdown the screens after some time (I put in 5min in this case)
3. stay away from the computer until the screen turns off. It might flicker and turn off and on multiple times (no idea why)
4. be patient
5. kwin crashes and all non-qt applications are closed. Only Qt applications keep open.

OBSERVED RESULT

Kwin crashes (and restarts) and all non-qt applications close

EXPECTED RESULT

Kwin not crashing or at least all applications (qt or not) keep open after the crash.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: 

Operating System: Manjaro Linux 
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.1
Kernel Version: 6.9.3-3-MANJARO (64-bit)
Graphics Platform: Wayland
Processors: 32 × AMD Ryzen 9 5950X 16-Core Processor
Memory: 62.7 GiB of RAM
Graphics Processor: AMD Radeon RX 6600
Manufacturer: ASUS

ADDITIONAL INFORMATION

In the attached backtrace, look for (this=0x0), which is the call that triggers the crash.
Comment 1 Leandro Santiago da Silva 2024-06-18 08:36:40 UTC
It seems this bug is a duplicate of https://bugs.kde.org/show_bug.cgi?id=485318 and should have been fixed on commit cadf16b12e10c591b746d6f8228a16ec0101362b

I will wait until this changes gets to my distro to test it again, as it seems to be a quite fresh change.
Comment 2 Zamundaaa 2024-06-18 12:34:38 UTC
Yep, that's the same backtrace. If it still happens in Plasma 6.1 despite that fix, just reopen the other bug

*** This bug has been marked as a duplicate of bug 485318 ***