Bug 496015 - KWin crashed in KWin::DrmGpu::pageFlipHandler
Summary: KWin crashed in KWin::DrmGpu::pageFlipHandler
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 6.2.3
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: drkonqi
: 494044 501272 501756 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-11-09 16:17 UTC by 4ig7n0ca0
Modified: 2025-03-27 22:52 UTC (History)
7 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description 4ig7n0ca0 2024-11-09 16:17:41 UTC
Application: kwin_wayland (6.2.3)

ApplicationNotResponding [ANR]: false
Qt Version: 6.8.0
Frameworks Version: 6.8.0
Operating System: Linux 6.10.14-200.fc40.x86_64 x86_64
Windowing System: Wayland
Distribution: "Fedora Linux 41 (KDE Plasma)"
DrKonqi: 6.2.3 [CoredumpBackend]

-- Information about the crash:
I was browsing the web with Firefox and updating my SMB shares in Dolphin when I put the computer to sleep. About 20mins later I tried to wake from sleep and was met with a black screen for about ~20seconds. At this point I attempted to SSH in and got connected, but the prompt would not display. Upon d/cing and connecting again, I got my prompt and the login screen showed up as expected.

After logging in, I got the message that KWin had crashed. Everything seems functional now, although IIRC it did close my Firefox instance.

My setup is a bit weird. I'm on Fedora 41, and up until yesterday was on linux kernel 6.11.x; I was having issues putting the computer into sleep mode and saw some chatter about 6.11 having issues at the moment. I downgraded to Linux 6.10.14-200.fc40 manually, note that this was compiled for Fedora 40 as I think 41 started on 6.11.x. While this downgrade has helped stabilize that sleep issue, I suspect it's the issue here as well. This issue is less critical though IMO, so I'll take it. :p

The reporter is unsure if this crash is reproducible.

-- Backtrace:
Application: KWin (kwin_wayland), signal: Segmentation fault


This GDB supports auto-downloading debuginfo from the following URLs:
  <https://debuginfod.fedoraproject.org/>
Enable debuginfod for this session? (y or [n]) [answered N; input not from terminal]
Debuginfod has been disabled.
To make this setting permanent, add 'set debuginfod enabled off' to .gdbinit.

warning: Can't open file /memfd:/.glXXXXXX (deleted) during file-backed mapping note processing

warning: Can't open file /memfd:wayland-shm (deleted) during file-backed mapping note processing

warning: Can't open file /home/lucas/.cache/plasma_theme_default.kcache (deleted) during file-backed mapping note processing

warning: Can't open file /memfd:JSGCHeap:QtQml (deleted) during file-backed mapping note processing

warning: Can't open file /memfd:JSVMStack:QtQml (deleted) during file-backed mapping note processing

warning: Can't open file /memfd:wayland-cursor (deleted) during file-backed mapping note processing

warning: Can't open file /memfd:kwayland-shared (deleted) during file-backed mapping note processing

warning: Can't open file /memfd:JITCode:QtQml (deleted) during file-backed mapping note processing

warning: Can't open file /memfd:unknown-usage:QtQml (deleted) during file-backed mapping note processing

warning: Can't open file /memfd:xwayland-shared (deleted) during file-backed mapping note processing
[New LWP 1901]
[New LWP 1984]
[New LWP 1985]
[New LWP 1959]
[New LWP 1969]
[New LWP 1980]
[New LWP 1986]
[New LWP 1983]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/usr/bin/kwin_wayland --wayland-fd 7 --socket wayland-0 --xwayland-fd 8 --xwayl'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f1b35280724 in __pthread_kill_implementation () from /lib64/libc.so.6
[Current thread is 1 (Thread 0x7f1b248e0dc0 (LWP 1901))]
Cannot QML trace cores :(
/usr/share/drkonqi/gdb/python/gdb_preamble/preamble.py:516: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
  boot_time = datetime.utcfromtimestamp(psutil.boot_time()).strftime('%Y-%m-%dT%H:%M:%S')
/usr/share/drkonqi/gdb/python/gdb_preamble/preamble.py:533: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
  'timestamp': datetime.utcnow().isoformat(),
[Current thread is 1 (Thread 0x7f1b248e0dc0 (LWP 1901))]

Thread 8 (Thread 0x7f1b010006c0 (LWP 1983)):
#0  0x00007f1b3527ae69 in __futex_abstimed_wait_common () at /lib64/libc.so.6
#1  0x00007f1b3527df32 in pthread_cond_clockwait@GLIBC_2.30 () at /lib64/libc.so.6
#2  0x00007f1b388e545d in std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker<std::tuple<QThread::create<KWin::DrmCommitThread::DrmCommitThread(KWin::DrmGpu*, QString const&)::{lambda()#1}>(KWin::DrmCommitThread::DrmCommitThread(KWin::DrmGpu*, QString const&)::{lambda()#1}&&)::{lambda((auto:1&&)...)#1}> >, void> >::_M_invoke(std::_Any_data const&) () at /lib64/libkwin.so.6
#3  0x00007f1b388e0b86 in std::__future_base::_State_baseV2::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*) () at /lib64/libkwin.so.6
#4  0x00007f1b35283b0b in __pthread_once_slow.isra.0 () at /lib64/libc.so.6
#5  0x00007f1b35283b79 in pthread_once@GLIBC_2.2.5 () at /lib64/libc.so.6
#6  0x00007f1b388e17f3 in std::__future_base::_Deferred_state<std::thread::_Invoker<std::tuple<QThread::create<KWin::DrmCommitThread::DrmCommitThread(KWin::DrmGpu*, QString const&)::{lambda()#1}>(KWin::DrmCommitThread::DrmCommitThread(KWin::DrmGpu*, QString const&)::{lambda()#1}&&)::{lambda((auto:1&&)...)#1}> >, void>::_M_complete_async() () at /lib64/libkwin.so.6
#7  0x00007f1b35a19247 in QThreadCreateThread::run() () at /lib64/libQt6Core.so.6
#8  0x00007f1b35ab638b in QThreadPrivate::start(void*) () at /lib64/libQt6Core.so.6
#9  0x00007f1b3527e797 in start_thread () at /lib64/libc.so.6
#10 0x00007f1b3530278c in __clone3 () at /lib64/libc.so.6

Thread 7 (Thread 0x7f1aeb4006c0 (LWP 1986)):
#0  0x00007f1b3527ae69 in __futex_abstimed_wait_common () at /lib64/libc.so.6
#1  0x00007f1b3527d8b9 in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libc.so.6
#2  0x00007f1b354416c0 in std::condition_variable::wait(std::unique_lock<std::mutex>&) () at /lib64/libstdc++.so.6
#3  0x00007f1b388e5625 in std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker<std::tuple<QThread::create<KWin::DrmCommitThread::DrmCommitThread(KWin::DrmGpu*, QString const&)::{lambda()#1}>(KWin::DrmCommitThread::DrmCommitThread(KWin::DrmGpu*, QString const&)::{lambda()#1}&&)::{lambda((auto:1&&)...)#1}> >, void> >::_M_invoke(std::_Any_data const&) () at /lib64/libkwin.so.6
#4  0x00007f1b388e0b86 in std::__future_base::_State_baseV2::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*) () at /lib64/libkwin.so.6
#5  0x00007f1b35283b0b in __pthread_once_slow.isra.0 () at /lib64/libc.so.6
#6  0x00007f1b35283b79 in pthread_once@GLIBC_2.2.5 () at /lib64/libc.so.6
#7  0x00007f1b388e17f3 in std::__future_base::_Deferred_state<std::thread::_Invoker<std::tuple<QThread::create<KWin::DrmCommitThread::DrmCommitThread(KWin::DrmGpu*, QString const&)::{lambda()#1}>(KWin::DrmCommitThread::DrmCommitThread(KWin::DrmGpu*, QString const&)::{lambda()#1}&&)::{lambda((auto:1&&)...)#1}> >, void>::_M_complete_async() () at /lib64/libkwin.so.6
#8  0x00007f1b35a19247 in QThreadCreateThread::run() () at /lib64/libQt6Core.so.6
#9  0x00007f1b35ab638b in QThreadPrivate::start(void*) () at /lib64/libQt6Core.so.6
#10 0x00007f1b3527e797 in start_thread () at /lib64/libc.so.6
#11 0x00007f1b3530278c in __clone3 () at /lib64/libc.so.6

Thread 6 (Thread 0x7f1b0cc006c0 (LWP 1980)):
#0  0x00007f1b352f4f70 in ppoll () at /lib64/libc.so.6
#1  0x00007f1b343cb8a3 in g_main_context_iterate_unlocked.isra () at /lib64/libglib-2.0.so.0
#2  0x00007f1b3436c783 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#3  0x00007f1b35be9de3 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt6Core.so.6
#4  0x00007f1b3590221b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt6Core.so.6
#5  0x00007f1b35a18d85 in QThread::exec() () at /lib64/libQt6Core.so.6
#6  0x00007f1b35ab638b in QThreadPrivate::start(void*) () at /lib64/libQt6Core.so.6
#7  0x00007f1b3527e797 in start_thread () at /lib64/libc.so.6
#8  0x00007f1b3530278c in __clone3 () at /lib64/libc.so.6

Thread 5 (Thread 0x7f1b0d6006c0 (LWP 1969)):
#0  0x00007f1b352f4f70 in ppoll () at /lib64/libc.so.6
#1  0x00007f1b343cb8a3 in g_main_context_iterate_unlocked.isra () at /lib64/libglib-2.0.so.0
#2  0x00007f1b3436c783 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#3  0x00007f1b35be9de3 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt6Core.so.6
#4  0x00007f1b3590221b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt6Core.so.6
#5  0x00007f1b35a18d85 in QThread::exec() () at /lib64/libQt6Core.so.6
#6  0x00007f1b35ab638b in QThreadPrivate::start(void*) () at /lib64/libQt6Core.so.6
#7  0x00007f1b3527e797 in start_thread () at /lib64/libc.so.6
#8  0x00007f1b3530278c in __clone3 () at /lib64/libc.so.6

Thread 4 (Thread 0x7f1b168006c0 (LWP 1959)):
#0  0x00007f1b352f4f70 in ppoll () at /lib64/libc.so.6
#1  0x00007f1b343cb8a3 in g_main_context_iterate_unlocked.isra () at /lib64/libglib-2.0.so.0
#2  0x00007f1b3436c783 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#3  0x00007f1b35be9de3 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt6Core.so.6
#4  0x00007f1b3590221b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt6Core.so.6
#5  0x00007f1b35a18d85 in QThread::exec() () at /lib64/libQt6Core.so.6
#6  0x00007f1b36a6a681 in QDBusConnectionManager::run() () at /lib64/libQt6DBus.so.6
#7  0x00007f1b35ab638b in QThreadPrivate::start(void*) () at /lib64/libQt6Core.so.6
#8  0x00007f1b3527e797 in start_thread () at /lib64/libc.so.6
#9  0x00007f1b3530278c in __clone3 () at /lib64/libc.so.6

Thread 3 (Thread 0x7f1aebe006c0 (LWP 1985)):
#0  0x00007f1b3527ae69 in __futex_abstimed_wait_common () at /lib64/libc.so.6
#1  0x00007f1b3527d8b9 in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libc.so.6
#2  0x00007f1b354416c0 in std::condition_variable::wait(std::unique_lock<std::mutex>&) () at /lib64/libstdc++.so.6
#3  0x00007f1b388e5625 in std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker<std::tuple<QThread::create<KWin::DrmCommitThread::DrmCommitThread(KWin::DrmGpu*, QString const&)::{lambda()#1}>(KWin::DrmCommitThread::DrmCommitThread(KWin::DrmGpu*, QString const&)::{lambda()#1}&&)::{lambda((auto:1&&)...)#1}> >, void> >::_M_invoke(std::_Any_data const&) () at /lib64/libkwin.so.6
#4  0x00007f1b388e0b86 in std::__future_base::_State_baseV2::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*) () at /lib64/libkwin.so.6
#5  0x00007f1b35283b0b in __pthread_once_slow.isra.0 () at /lib64/libc.so.6
#6  0x00007f1b35283b79 in pthread_once@GLIBC_2.2.5 () at /lib64/libc.so.6
#7  0x00007f1b388e17f3 in std::__future_base::_Deferred_state<std::thread::_Invoker<std::tuple<QThread::create<KWin::DrmCommitThread::DrmCommitThread(KWin::DrmGpu*, QString const&)::{lambda()#1}>(KWin::DrmCommitThread::DrmCommitThread(KWin::DrmGpu*, QString const&)::{lambda()#1}&&)::{lambda((auto:1&&)...)#1}> >, void>::_M_complete_async() () at /lib64/libkwin.so.6
#8  0x00007f1b35a19247 in QThreadCreateThread::run() () at /lib64/libQt6Core.so.6
#9  0x00007f1b35ab638b in QThreadPrivate::start(void*) () at /lib64/libQt6Core.so.6
#10 0x00007f1b3527e797 in start_thread () at /lib64/libc.so.6
#11 0x00007f1b3530278c in __clone3 () at /lib64/libc.so.6

Thread 2 (Thread 0x7f1af4c006c0 (LWP 1984)):
#0  0x00007f1b352cadd3 in clock_nanosleep@GLIBC_2.2.5 () at /lib64/libc.so.6
#1  0x00007f1b352d6e07 in nanosleep () at /lib64/libc.so.6
#2  0x00007f1b388e57df in std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker<std::tuple<QThread::create<KWin::DrmCommitThread::DrmCommitThread(KWin::DrmGpu*, QString const&)::{lambda()#1}>(KWin::DrmCommitThread::DrmCommitThread(KWin::DrmGpu*, QString const&)::{lambda()#1}&&)::{lambda((auto:1&&)...)#1}> >, void> >::_M_invoke(std::_Any_data const&) () at /lib64/libkwin.so.6
#3  0x00007f1b388e0b86 in std::__future_base::_State_baseV2::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*) () at /lib64/libkwin.so.6
#4  0x00007f1b35283b0b in __pthread_once_slow.isra.0 () at /lib64/libc.so.6
#5  0x00007f1b35283b79 in pthread_once@GLIBC_2.2.5 () at /lib64/libc.so.6
#6  0x00007f1b388e17f3 in std::__future_base::_Deferred_state<std::thread::_Invoker<std::tuple<QThread::create<KWin::DrmCommitThread::DrmCommitThread(KWin::DrmGpu*, QString const&)::{lambda()#1}>(KWin::DrmCommitThread::DrmCommitThread(KWin::DrmGpu*, QString const&)::{lambda()#1}&&)::{lambda((auto:1&&)...)#1}> >, void>::_M_complete_async() () at /lib64/libkwin.so.6
#7  0x00007f1b35a19247 in QThreadCreateThread::run() () at /lib64/libQt6Core.so.6
#8  0x00007f1b35ab638b in QThreadPrivate::start(void*) () at /lib64/libQt6Core.so.6
#9  0x00007f1b3527e797 in start_thread () at /lib64/libc.so.6
#10 0x00007f1b3530278c in __clone3 () at /lib64/libc.so.6

Thread 1 (Thread 0x7f1b248e0dc0 (LWP 1901)):
[KCrash Handler]
#4  0x00007f1b388fa921 in KWin::DrmGpu::pageFlipHandler(int, unsigned int, unsigned int, unsigned int, unsigned int, void*) () at /lib64/libkwin.so.6
#5  0x00007f1b35202580 in drmHandleEvent () at /lib64/libdrm.so.2
#6  0x00007f1b388fac6a in KWin::DrmGpu::waitIdle() () at /lib64/libkwin.so.6
#7  0x00007f1b38ab8016 in KWin::DrmGpu::updateOutputs() [clone .part.0] [clone .isra.0] () at /lib64/libkwin.so.6
#8  0x00007f1b388dab66 in KWin::DrmBackend::updateOutputs() () at /lib64/libkwin.so.6
#9  0x00007f1b388dfe37 in KWin::DrmBackend::handleUdevEvent() () at /lib64/libkwin.so.6
#10 0x00007f1b3595bac1 in void doActivate<false>(QObject*, int, void**) () at /lib64/libQt6Core.so.6
#11 0x00007f1b3596a43d in QSocketNotifier::activated(QSocketDescriptor, QSocketNotifier::Type, QSocketNotifier::QPrivateSignal) () at /lib64/libQt6Core.so.6
#12 0x00007f1b3596ac2b in QSocketNotifier::event(QEvent*) () at /lib64/libQt6Core.so.6
#13 0x00007f1b36c3d6b8 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib64/libQt6Widgets.so.6
#14 0x00007f1b358f3a38 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib64/libQt6Core.so.6
#15 0x00007f1b35ab8686 in QEventDispatcherUNIXPrivate::activateSocketNotifiers() () at /lib64/libQt6Core.so.6
#16 0x00007f1b35ab8fd4 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt6Core.so.6
#17 0x00007f1b366b8e32 in QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt6Gui.so.6
#18 0x00007f1b3590221b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt6Core.so.6
#19 0x00007f1b358fda2e in QCoreApplication::exec() () at /lib64/libQt6Core.so.6
#20 0x00005602caf7b895 in main ()

Reported using DrKonqi
Comment 1 David Edmundson 2024-11-13 11:21:52 UTC
*** Bug 494044 has been marked as a duplicate of this bug. ***
Comment 2 Nate Graham 2025-03-11 22:11:41 UTC
*** Bug 501272 has been marked as a duplicate of this bug. ***
Comment 3 TraceyC 2025-03-21 00:42:11 UTC
*** Bug 501756 has been marked as a duplicate of this bug. ***
Comment 4 Zamundaaa 2025-03-25 20:27:10 UTC
This should be fixed with https://invent.kde.org/plasma/kwin/-/merge_requests/7288, the backport of which will be in 6.3.4