Bug 433501 - kwin_wayland crashes occasionally
Summary: kwin_wayland crashes occasionally
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.21.0
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-23 17:14 UTC by 322997am
Modified: 2021-03-13 14:38 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description 322997am 2021-02-23 17:14:38 UTC
SUMMARY
occasionally, kwin_wayland crashes, bringing down the whole session and forcing one to restart. 

STEPS TO REPRODUCE
1. Use computer for a long while
2. After a time, kwin_wayland will crash and take down the whole session
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.21.0
KDE Frameworks Version: 5.79
Qt Version: 5.15.2

ADDITIONAL INFORMATION
I am running KDE from the zawertun/kde COPR.
Comment 1 322997am 2021-02-23 17:16:18 UTC
Unfortunately the core dump is too big to upload here, so I uploaded it to google drive.

https://drive.google.com/file/d/1Vs-XbMT9UGxqZ7Hg-K9tzVjp90P8IVxJ/view?usp=sharing
Comment 2 Nate Graham 2021-02-23 17:28:52 UTC
That's the whole core file, not the backtrace. You'll need to put it through gdb and run `bt` to get the backtrace itself.
Comment 3 322997am 2021-02-23 18:12:06 UTC
I tried doing the above with a decompressed core dump, and it did not work, and ended with 

(gdb) bt
#0  0x00007f2474f9dbd0 in ?? ()
Backtrace stopped: Cannot access memory at address 0x7ffc4820e640

How would I analyze the core dumps in a way that will give useful results?

The core dump also had the following in it:

Failed to read a valid object file image from memory.
Core was generated by `kwin_wayland --wayland_fd 4 --xwayland /usr/libexec/startplasma-waylandsession'.
Program terminated with signal SIGSEGV, Segmentation fault.
Comment 4 Nate Graham 2021-02-23 18:13:19 UTC
you would need to invoke it like this:

gdb --args kwin_wayland --wayland_fd 4 --xwayland /usr/libexec/startplasma-waylandsession [path to coredump file]
Comment 5 322997am 2021-02-23 18:46:52 UTC
I have tried running the above, and after installing debug symbols and running bt, I cannot seem to get it to say anything except "no stack". What am I doing wrong?
Comment 6 Nate Graham 2021-02-23 19:06:25 UTC
I don't know, sorry. :( Maybe someone more knowledgeable than me can help you.
Comment 7 Alois Wohlschlager 2021-02-24 10:58:32 UTC
kwin_wayland tends to produce improper core dumps due to being considered privileged. You need to log in via SSH, attach gdb as root to the running kwin_wayland ("sudo gdb -p $(pidof kwin_wayland)") and let it run (type "c" into gdb) until it crashes again. You can then fetch the backtrace by typing "bt" into gdb.
Comment 8 Nate Graham 2021-02-24 14:49:41 UTC
Is there a way to retrieve an existing one using coredumpctl without getting one with mangled symbols?
Comment 9 322997am 2021-02-26 15:00:06 UTC
So the bug happened again, and I get the same errors when trying to retrive the backtrace from the core dump. is there any way to run it with gdb attached but without it being abhorrently slow? If there was a way to configure it to run with gdb all the time I could do that, as this crash happens once every few days.
Comment 10 Bug Janitor Service 2021-03-13 04:33:37 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 11 Nate Graham 2021-03-13 13:56:44 UTC
This is being discussed at https://invent.kde.org/plasma/kwin/-/issues/33.

To make future coredumps more useful you can add the text "ExternalSizeMax=6G" to /etc/systemd/coredump.conf.
Comment 12 322997am 2021-03-13 14:38:22 UTC
I haven't actually encountered the crash in a while. I will keep the bug open and change the core dump size, but if the crash doesn't happen in the next month or so it probably was fixed in 5.21.1.