Bug 488921 - kwin_x11 crashes with sigsegv/11 when launching games
Summary: kwin_x11 crashes with sigsegv/11 when launching games
Status: RESOLVED DUPLICATE of bug 488830
Alias: None
Product: kwin
Classification: Plasma
Component: generic-crash (show other bugs)
Version: 6.1.0
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-21 20:19 UTC by S1LV3R
Modified: 2024-07-11 10:38 UTC (History)
4 users (show)

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


Attachments
Stack trace from crashed process (21.77 KB, text/plain)
2024-06-21 20:21 UTC, S1LV3R
Details
GDB stack trace (with debug symbols) (11.17 KB, text/plain)
2024-06-21 21:10 UTC, S1LV3R
Details

Note You need to log in before you can comment on or make changes to this bug.
Description S1LV3R 2024-06-21 20:19:58 UTC
SUMMARY
After the latest update to 6.1.0, kwin_x11 segfaults when various games is launched. Tested with both "XCOM 2: War of the Chosen" as well as "Kerbal Space Program". Confirmed to only happen in 6.1.0 (not 6.0.5) by doing a downgrade, running `kwin_x11 --replace`, and launching the game again.

STEPS TO REPRODUCE
1. Launch either game through Steam

OBSERVED RESULT

Desktop flickers, and kwin_x11 crashes and dumps stack traces in the journal (or console when running directly in the terminal). Occasionally even if you manage to kill the game through all the crashing, your keyboard and mouse input will stop working completely, forcing a reboot.

EXPECTED RESULT

Nothing happens, and the game works fine

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.1.0
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.1
Kernel Version: 6.9.5-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i5-10210U CPU @ 1.60GHz
Memory: 31,1 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics
Manufacturer: Dell Inc.
Product Name: Latitude 3510

ADDITIONAL INFORMATION
Comment 1 S1LV3R 2024-06-21 20:21:15 UTC
Created attachment 170781 [details]
Stack trace from crashed process

Created by copying the output from `coredumpctl dump 341343`
Comment 2 S1LV3R 2024-06-21 20:22:15 UTC
I would upload the core dump as well (created by running `coredumpctl --output=kwin_x11_341343.coredump dump 341343`), however that file is 504 MB large, so a bit over the limit of 4000 KB
Comment 3 S1LV3R 2024-06-21 20:28:28 UTC
Spent a couple minutes testing: Same crash happens regarless of if kwin is using the Intel Integrated GPU, the NVIDIA GPU, or a Radeon GPU (on a different other system)
Comment 4 S1LV3R 2024-06-21 21:10:22 UTC
Created attachment 170788 [details]
GDB stack trace (with debug symbols)

I used the crashed process viewer and the interactive debugger + debuginfod and got back another (hopefully more useful) trace, seeing as i cant upload the core dump
Comment 5 Chiitoo 2024-06-24 14:59:08 UTC
I've been seeing a more or less identical backtrace since kwin 6.0.90 (to which I updated from 6.0.5 ~2 weeks ago).

I believe what actually triggers this, is compositing being switched on and/or off again.

I don't have 'allow applications to block compositing' enabled, but I often switch it off manually, which is how I encountered the issue.

One way to re-produce on my machine:

1. Have compositing enabled, and 'enable on startup' checked.
2. Select a window decoration that is not Breeze or Oxygen; these don't seem to trigger it for me, but Plastik, and any other additional themes I've tried do.
3. Also have some application running, Konsole for example.
4. Turn off compositing.
5. Interact with the Konsole application via the panel.
6. Segmentation fault ensues.

There was another issue where simply toggling compositing would segfault, but that was fixed in 6.1.0 for me (change from 5db1cae615b [1] specifically, which I used before 6.1.0 was out).

I'm using KWin with LXQt, X11, and had not found anyone seeing this on Plasma yet, and I could not make it happen in a virtual machine, but looking at the code, it might be somewhat specific to 'glxcontext', which I guess might differ there (using 'amdgpu' on the real machine).  Been trying to gather as much information as I can before filing a bug report, but this seems to be talking about the same issue (yay!).

Triggering the crash without 'enable on startup' checked on 'compositing' gives a somewhat different backtrace, which is the one that is similar to the one in comment 4.

Regarding frame '#5  0x00005abcbd80e920 in ?? ()', I always see it end up in a '?? ()' as well, but one time I saw 'libQt6Qml.so' there, but after compiling qtdeclarative with debug symbols, it of course went back to '??'...

Thank you!

1. https://invent.kde.org/plasma/kwin/-/commit/5db1cae615b177d58b065276e81da0993af0ed6e
Comment 6 Chiitoo 2024-07-02 19:38:03 UTC
Looks like the issue for me is gone with 6.1.2, probably due to commit c6d2eac81ae [1], meaning this could potentially be a duplicate of bug 488830 (I do feel like I had tried with this commit at some point, but perhaps I did not after all).

1. https://invent.kde.org/plasma/kwin/-/commit/c6d2eac81ae9dba99df40aba185b50c3f1f9f021
2. https://bugs.kde.org/488830
Comment 7 David Edmundson 2024-07-11 10:38:47 UTC

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