Bug 417177

Summary: Closing notebook lid / suspend to RAM causes powerdevil to crash in KWayland::Client::OutputDevice::enabled()
Product: [Frameworks and Libraries] kwayland Reporter: Christian Rohmann <christian.rohmann>
Component: generalAssignee: Martin Flöser <mgraesslin>
Status: RESOLVED WORKSFORME    
Severity: crash CC: christian.rohmann, ck_ming91, kwin-bugs-null, nate, pascal
Priority: NOR Keywords: drkonqi
Version First Reported In: 5.66.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: New crash information added by DrKonqi

Description Christian Rohmann 2020-02-05 06:54:20 UTC
Application: org_kde_powerdevil (2.0.0)

Qt Version: 5.14.1
Frameworks Version: 5.66.0
Operating System: Linux 5.5.1-arch1-1 x86_64
Distribution: Arch Linux

-- Information about the crash:
I simply disconnected a second monitor and then closed the lid of my Thinkpad T460s (i915 graphics)

The crash can be reproduced every time.

-- Backtrace:
Application: KDE Power Management System (org_kde_powerdevil), signal: Segmentation fault
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f3e5bf95840 (LWP 5594))]

Thread 6 (Thread 0x7f3e594c1700 (LWP 5721)):
#0  0x00007f3e605ebb43 in __libc_enable_asynccancel () at /usr/lib/libc.so.6
#1  0x00007f3e6065a9d7 in poll () at /usr/lib/libc.so.6
#2  0x00007f3e5f190120 in  () at /usr/lib/libglib-2.0.so.0
#3  0x00007f3e5f1901f1 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#4  0x00007f3e60c1703c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#5  0x00007f3e60bbd4cc in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#6  0x00007f3e609e1e52 in QThread::exec() () at /usr/lib/libQt5Core.so.5
#7  0x00007f3e609e2fc6 in  () at /usr/lib/libQt5Core.so.5
#8  0x00007f3e5fcb94cf in start_thread () at /usr/lib/libpthread.so.0
#9  0x00007f3e606652d3 in clone () at /usr/lib/libc.so.6

Thread 5 (Thread 0x7f3e59cc2700 (LWP 5719)):
#0  0x00007f3e6065642c in read () at /usr/lib/libc.so.6
#1  0x00007f3e5f1409f0 in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007f3e5f18e9e1 in g_main_context_check () at /usr/lib/libglib-2.0.so.0
#3  0x00007f3e5f1900c8 in  () at /usr/lib/libglib-2.0.so.0
#4  0x00007f3e5f1901f1 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#5  0x00007f3e60c1703c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#6  0x00007f3e60bbd4cc in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#7  0x00007f3e609e1e52 in QThread::exec() () at /usr/lib/libQt5Core.so.5
#8  0x00007f3e609e2fc6 in  () at /usr/lib/libQt5Core.so.5
#9  0x00007f3e5fcb94cf in start_thread () at /usr/lib/libpthread.so.0
#10 0x00007f3e606652d3 in clone () at /usr/lib/libc.so.6

Thread 4 (Thread 0x7f3e5a756700 (LWP 5638)):
#0  0x00007f3e6065a9ef in poll () at /usr/lib/libc.so.6
#1  0x00007f3e5f190120 in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007f3e5f1910c3 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
#3  0x00007f3e5b05fbc8 in  () at /usr/lib/libgio-2.0.so.0
#4  0x00007f3e5f16cbb1 in  () at /usr/lib/libglib-2.0.so.0
#5  0x00007f3e5fcb94cf in start_thread () at /usr/lib/libpthread.so.0
#6  0x00007f3e606652d3 in clone () at /usr/lib/libc.so.6

Thread 3 (Thread 0x7f3e5af57700 (LWP 5636)):
#0  0x00007f3e5f1404e4 in g_mutex_unlock () at /usr/lib/libglib-2.0.so.0
#1  0x00007f3e5f18f999 in g_main_context_prepare () at /usr/lib/libglib-2.0.so.0
#2  0x00007f3e5f190046 in  () at /usr/lib/libglib-2.0.so.0
#3  0x00007f3e5f1901f1 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#4  0x00007f3e5f190242 in  () at /usr/lib/libglib-2.0.so.0
#5  0x00007f3e5f16cbb1 in  () at /usr/lib/libglib-2.0.so.0
#6  0x00007f3e5fcb94cf in start_thread () at /usr/lib/libpthread.so.0
#7  0x00007f3e606652d3 in clone () at /usr/lib/libc.so.6

Thread 2 (Thread 0x7f3e5ba80700 (LWP 5631)):
#0  0x00007f3e5f18dd3a in  () at /usr/lib/libglib-2.0.so.0
#1  0x00007f3e5f18e67c in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007f3e5f18e7df in g_main_context_check () at /usr/lib/libglib-2.0.so.0
#3  0x00007f3e5f1900c8 in  () at /usr/lib/libglib-2.0.so.0
#4  0x00007f3e5f1901f1 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#5  0x00007f3e60c1703c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#6  0x00007f3e60bbd4cc in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#7  0x00007f3e609e1e52 in QThread::exec() () at /usr/lib/libQt5Core.so.5
#8  0x00007f3e60e67b28 in  () at /usr/lib/libQt5DBus.so.5
#9  0x00007f3e609e2fc6 in  () at /usr/lib/libQt5Core.so.5
#10 0x00007f3e5fcb94cf in start_thread () at /usr/lib/libpthread.so.0
#11 0x00007f3e606652d3 in clone () at /usr/lib/libc.so.6

Thread 1 (Thread 0x7f3e5bf95840 (LWP 5594)):
[KCrash Handler]
#6  0x00007f3e59e75224 in KWayland::Client::OutputDevice::enabled() const () at /usr/lib/libKF5WaylandClient.so.5
#7  0x00007f3e59cd4d28 in  () at /usr/lib/qt/plugins/kf5/kscreen/KSC_KWayland.so
#8  0x00007f3e59cd6fc9 in  () at /usr/lib/qt/plugins/kf5/kscreen/KSC_KWayland.so
#9  0x00007f3e59ccfeff in  () at /usr/lib/qt/plugins/kf5/kscreen/KSC_KWayland.so
#10 0x00007f3e59ccc9c4 in  () at /usr/lib/qt/plugins/kf5/kscreen/KSC_KWayland.so
#11 0x00007f3e60bf446e in  () at /usr/lib/libQt5Core.so.5
#12 0x00007f3e59cce26b in  () at /usr/lib/qt/plugins/kf5/kscreen/KSC_KWayland.so
#13 0x00007f3e60bf446e in  () at /usr/lib/libQt5Core.so.5
#14 0x00007f3e60bf446e in  () at /usr/lib/libQt5Core.so.5
#15 0x00007f3e60bf446e in  () at /usr/lib/libQt5Core.so.5
#16 0x00007f3e59e612d2 in KWayland::Client::Registry::interfaceRemoved(unsigned int) () at /usr/lib/libKF5WaylandClient.so.5
#17 0x00007f3e61e9f69a in ffi_call_unix64 () at /usr/lib/libffi.so.6
#18 0x00007f3e61e9efb6 in ffi_call () at /usr/lib/libffi.so.6
#19 0x00007f3e61eacf8f in  () at /usr/lib/libwayland-client.so.0
#20 0x00007f3e61ea96ba in  () at /usr/lib/libwayland-client.so.0
#21 0x00007f3e61eaabfc in wl_display_dispatch_queue_pending () at /usr/lib/libwayland-client.so.0
#22 0x00007f3e59e6f35f in KWayland::Client::EventQueue::dispatch() () at /usr/lib/libKF5WaylandClient.so.5
#23 0x00007f3e60bec26a in QObject::event(QEvent*) () at /usr/lib/libQt5Core.so.5
#24 0x00007f3e60bbe962 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#25 0x00007f3e60bc11c6 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/libQt5Core.so.5
#26 0x00007f3e60c179d4 in  () at /usr/lib/libQt5Core.so.5
#27 0x00007f3e5f18e39e in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#28 0x00007f3e5f1901b1 in  () at /usr/lib/libglib-2.0.so.0
#29 0x00007f3e5f1901f1 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#30 0x00007f3e60c17020 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#31 0x00007f3e60bbd4cc in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#32 0x00007f3e60bc54d6 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
#33 0x000055b61b80f18d in  ()
#34 0x00007f3e6058d153 in __libc_start_main () at /usr/lib/libc.so.6
#35 0x000055b61b80f1fe in _start ()
[Inferior 1 (process 5594) detached]

Possible duplicates by query: bug 417083, bug 416900, bug 416816, bug 416730, bug 416549.

Reported using DrKonqi
Comment 1 Nate Graham 2020-02-05 21:56:16 UTC
*** Bug 417083 has been marked as a duplicate of this bug. ***
Comment 2 Pascal d'Hermilly 2020-02-19 09:25:28 UTC
Created attachment 126154 [details]
New crash information added by DrKonqi

org_kde_powerdevil (2.0.0) using Qt 5.13.2

- What I was doing when the application crashed:
in wayland. 
Unplugged the power, hdmi and usb keyboard at same time.
KDED and systemsetings (looking at displays) also died.

-- Backtrace (Reduced):
#6  0x00007fb0cca38564 in KWayland::Client::OutputDevice::enabled (this=0x563fb836cfb0) at ./src/client/outputdevice.cpp:535
#7  0x00007fb0cc3bd566 in KScreen::WaylandOutput::updateKScreenOutput (this=this@entry=0x563fb8359dc0, output=...) at ./backends/kwayland/waylandoutput.cpp:102
#8  0x00007fb0cc3be7fc in KScreen::WaylandOutput::toKScreenOutput (this=0x563fb8359dc0) at ./backends/kwayland/waylandoutput.cpp:94
#9  0x00007fb0cc3b5e0e in KScreen::WaylandConfig::currentConfig (this=0x563fb82e4db0) at ./backends/kwayland/waylandconfig.cpp:294
#10 0x00007fb0cc3b3cb3 in KScreen::WaylandBackend::<lambda()>::operator() (__closure=<optimized out>) at ./backends/kwayland/waylandbackend.cpp:45
Comment 3 Justin Zobel 2022-10-03 10:37:42 UTC
Thank you for reporting this crash in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the crash with a recent software version?

If you can reproduce the issue, please change the status to "CONFIRMED" when replying. Thank you!
Comment 4 Christian Rohmann 2022-10-12 12:28:51 UTC
(In reply to Justin Zobel from comment #3)
> Thank you for reporting this crash in KDE software. As it has been a while
> since this issue was reported, can we please ask you to see if you can
> reproduce the crash with a recent software version?
> 
> If you can reproduce the issue, please change the status to "CONFIRMED" when
> replying. Thank you!

I cannot as I unfortunately don't have the mentioned system (TP T460s using Intel i915 graphics) anymore.
With the T14s Gen1 (AMD) I never experienced this issue.
Comment 5 Nate Graham 2022-10-12 16:49:18 UTC
OK, thanks!