Bug 474728

Summary: Starting systemmonitor crashes xwayland in xwl_screen_destroy_drm_lease_device()
Product: [Applications] plasma-systemmonitor Reporter: Martin Tlustos <martin.tlustos>
Component: generalAssignee: KSysGuard Developers <ksysguard-bugs>
Status: RESOLVED UPSTREAM    
Severity: crash CC: ahiemstra, kde, nate, plasma-bugs-null
Priority: NOR    
Version First Reported In: 5.27.8   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: konsole output when starting system monitor
attachment-1261488-0.html
crash after opening system monitor
crash after detaching gdb
Crash after opening system monitor (with debug symbols installed)

Description Martin Tlustos 2023-09-20 09:56:50 UTC
SUMMARY
That's pretty much it. It probably is a bug in xwayland, but I was wondering because systemmonitor should be a wayland app, right?

***


STEPS TO REPRODUCE
1.  Start system, log in
2. start a few programs from the taskbar (icons only)
3. start system monitor from the taskbar (I have kontact, firefox, dolphin and system monitor fixed to my panel).

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Operating System: KDE neon 5.27
KDE Plasma Version: 5.27.8
KDE Frameworks Version: 5.110.0
Qt Version: 5.15.10
Kernel Version: 6.2.0-33-generic (64-bit)
Graphics Platform: Wayland
Processors: 6 × AMD Ryzen 5 4500U with Radeon Graphics
Memory: 15,0 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Manufacturer: Acer
Product Name: Aspire A515-44G
System Version: V1.12
ADDITIONAL INFORMATION
Comment 1 David Edmundson 2023-09-20 10:32:25 UTC
>It probably is a bug in xwayland, 

yeah, a crash in xwayland is always an xwayland ug

>but I was wondering because systemmonitor should be a wayland app, right?

It should. Can you run WAYLAND_DEBUG=1 plasma-systemmonitor and see if you get loads of output or none at all
Comment 2 Martin Tlustos 2023-09-20 12:47:18 UTC
Created attachment 161746 [details]
konsole output when starting system monitor

Here's the output when starting system monitor from konsole:
Comment 3 David Edmundson 2023-09-20 13:11:03 UTC
ok, that's definitely running in wayland.

Did xwayland crash when you ran it that time?
Comment 4 Martin Tlustos 2023-09-20 17:23:46 UTC
Yes, every time (just did it again twice).
Comment 5 Martin Tlustos 2023-09-20 17:24:10 UTC
Anything I could do to give more info?
Comment 6 Nate Graham 2023-09-20 18:31:33 UTC
We also need a symbolicated backtrace of the crash. Can you supply one?
Comment 7 Martin Tlustos 2023-09-21 05:02:44 UTC
Created attachment 161769 [details]
attachment-1261488-0.html

How?

sent from my Android phone

Nate Graham <bugzilla_noreply@kde.org> schrieb am Mi., 20. Sept. 2023,
21:31:

> https://bugs.kde.org/show_bug.cgi?id=474728
>
> Nate Graham <nate@kde.org> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>                  CC|                            |nate@kde.org
>              Status|REPORTED                    |NEEDSINFO
>          Resolution|---                         |BACKTRACE
>
> --- Comment #6 from Nate Graham <nate@kde.org> ---
> We also need a symbolicated backtrace of the crash. Can you supply one?
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 8 Martin Tlustos 2023-09-21 05:29:20 UTC
Well, Google is your friend, so I found how to attach gdb to the running Xwayland process.
But when having gdb attached, Xwayland does not crash when starting system monitor. I tried it from the panel and also from konsole.
But after detaching gdb from Xwayland, it crashed immediately.
Then, when starting system monitor while gdb isn't attached, it will crash again.

I looked whether I could somehow create a backtrace after Xwayland crashed, and found coredumpctl, so I tried this. I will attach the output of both a direct crash after launching system monitor and also the crash after detaching gdb.
Comment 9 Martin Tlustos 2023-09-21 05:32:15 UTC
Created attachment 161770 [details]
crash after opening system monitor
Comment 10 Martin Tlustos 2023-09-21 05:32:35 UTC
Created attachment 161771 [details]
crash after detaching gdb
Comment 11 Martin Tlustos 2023-09-21 05:41:44 UTC
Created attachment 161772 [details]
Crash after opening system monitor (with debug symbols installed)

I didn't have debug symbols installed, sorry. Here with symbols.
Comment 12 Nate Graham 2023-09-21 15:24:26 UTC
Thank you very much!
Comment 13 Arjen Hiemstra 2023-12-21 15:33:06 UTC
Unfortunately I don't really see how we can reproduce this, so I'm going to close this as an upstream bug. If it still happens with Plasma 6, you're probably better off filing a bug with XWayland.