Bug 466174 - kwin_wayland crashes in KWin::EglDmabufBuffer::removeImages() on login
Summary: kwin_wayland crashes in KWin::EglDmabufBuffer::removeImages() on login
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.27.0
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 474131 475719 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-02-21 01:51 UTC by itzxconroy66
Modified: 2023-12-08 20:09 UTC (History)
5 users (show)

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


Attachments
coredumpctl for kwin_wayland (10.39 KB, text/plain)
2023-02-21 01:51 UTC, itzxconroy66
Details
Proper backtrace (27.18 KB, text/plain)
2023-02-22 21:07 UTC, itzxconroy66
Details

Note You need to log in before you can comment on or make changes to this bug.
Description itzxconroy66 2023-02-21 01:51:53 UTC
Created attachment 156558 [details]
coredumpctl for kwin_wayland

SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Login to wayland session through sddm

OBSERVED RESULT
the screen flickers 3 to 4 times and then just shows a black screen where i can see the mouse and nothing else

EXPECTED RESULT
After login it shows the Desktop

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Linux ArchPC 6.1.12-zen1-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Tue, 14 Feb 2023 22:08:11 +0000 x86_64 GNU/Linux
(available in About System)
KDE Plasma Version: 5.27.0
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
Crash only appeared after updating to KDE version 5.27.0 and the issue only appears on wayland, x11 seems to work fine.
Comment 1 David Edmundson 2023-02-21 13:21:11 UTC
Pasting inline

      Stack trace of thread 8556:
                #0  0x00007f6451ca08ec n/a (libc.so.6 + 0x878ec)
                #1  0x00007f6451c51ea8 raise (libc.so.6 + 0x38ea8)
                #2  0x00007f6451c3b53d abort (libc.so.6 + 0x2253d)
                #3  0x00007f6453d63c8e n/a (libepoxy.so.0 + 0xbfc8e)
                #4  0x00007f6453d6752a n/a (libepoxy.so.0 + 0xc352a)
                #5  0x00007f645482b8f7 n/a (libkwin.so.5 + 0x42b8f7)
                #6  0x00007f645482d799 _ZN4KWin9EglDmabufD1Ev (libkwin.so.5 + 0x42d799)
                #7  0x00007f645482ecf1 _ZN4KWin18AbstractEglBackendD2Ev (libkwin.so.5 + 0x42ecf1)
                #8  0x00007f645476c59d n/a (libkwin.so.5 + 0x36c59d)
                #9  0x00007f64545bedfb _ZN4KWin10Compositor4stopEv (libkwin.so.5 + 0x1bedfb)
                #10 0x00007f64545b7b78 _ZN4KWin10Compositor12reinitializeEv (libkwin.so.5 + 0x1b7b78)
                #11 0x00007f6452cbea71 n/a (libQt5Core.so.5 + 0x2bea71)
                #12 0x00007f645470abea _ZN4KWin9Workspace15slotReconfigureEv (libkwin.so.5 + 0x30abea)
                #13 0x00007f6452cbea71 n/a (libQt5Core.so.5 + 0x2bea71)
Comment 2 Vlad Zahorodnii 2023-02-22 08:35:22 UTC
Can you install debug packages for kwin and submit a backtrace with debug symbols please?
Comment 3 itzxconroy66 2023-02-22 21:07:10 UTC
Created attachment 156620 [details]
Proper backtrace
Comment 4 Bug Janitor Service 2023-03-09 03:45:39 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 5 Zamundaaa 2023-08-02 11:06:54 UTC
I don't recall anymore exactly when, but I think a bug where kwin_wayland crashed in eglDestroyImageKHR was fixed some time ago. Can you retest with 5.27.7?
Comment 6 Bug Janitor Service 2023-08-17 03:45:14 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 7 Bug Janitor Service 2023-09-01 03:45:35 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now 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

Thank you for helping us make KDE software even better for everyone!
Comment 8 Nate Graham 2023-09-06 16:41:26 UTC
*** Bug 474131 has been marked as a duplicate of this bug. ***
Comment 9 Nate Graham 2023-09-06 16:42:24 UTC
Re-opening as we got a new duplicate and the reporter of this one did post a fully symbolicated backtrace as requested.
Comment 10 langsorigingaleia 2023-09-19 20:30:51 UTC
I have another insight about this problem. It looks like it might be nvidia related. I upgraded my GPU and I no longer have the problem.
Comment 11 Bug Janitor Service 2023-10-20 18:06:04 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/4546
Comment 12 Zamundaaa 2023-10-21 12:29:00 UTC
Git commit 95737d6689fb4508ebd9ed68e582af602300479f by Xaver Hugl.
Committed on 21/10/2023 at 14:28.
Pushed by zamundaaa into branch 'Plasma/5.27'.

platformsupport/scenes/opengl: don't release egl resources from the thread

AbstractEglBackend::cleanup is called by implementations of the class before the destructor
runs, which means that m_dmaBuf gets destroyed after EGL was cleaned up, which can cause crashes

M  +0    -1    src/platformsupport/scenes/opengl/abstract_egl_backend.cpp

https://invent.kde.org/plasma/kwin/-/commit/95737d6689fb4508ebd9ed68e582af602300479f
Comment 13 Nate Graham 2023-12-08 20:09:12 UTC
*** Bug 475719 has been marked as a duplicate of this bug. ***