Bug 489180

Summary: plasma crashed in QtWaylandClient::QWaylandWindow::waylandScreen() when external monitor lost power
Product: [Plasma] plasmashell Reporter: Mariusz Libera <mariusz.libera>
Component: generic-crashAssignee: Plasma Bugs List <plasma-bugs>
Status: CONFIRMED ---    
Severity: crash CC: andrea.ippo, arsen, dearburn, dtombaugh, fanf42, gymo279kt, ivdokmc, jaxad0127, jimtahu, jlp, kde, marek321, mitchell, nate, ollilein, pavel.urusov, pwarren, vlad.zahorodnii, xaver.hugl, yurapostates
Priority: VHI Keywords: multiscreen, wayland
Version: 6.1.0   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=489072
Latest Commit: Version Fixed In:
Attachments: backtrace
Backtrace from plasmashell 6.1.2
Kde crashmanager backtrace logfile

Description Mariusz Libera 2024-06-25 13:45:48 UTC
Created attachment 170961 [details]
backtrace

Application: plasmashell (6.1.0)

Qt Version: 6.7.2
Frameworks Version: 6.3.0
Operating System: Linux 6.9.5-arch1-1-ml x86_64
Windowing System: Wayland
Distribution: Arch Linux
DrKonqi: 6.1.0 [CoredumpBackend]

-- Information about the crash:
I had a brief power outage - my external monitor turned off and plasma crashed.

The reporter is unsure if this crash is reproducible.

-- Backtrace:
Comment 1 Nate Graham 2024-06-25 14:48:51 UTC
Thread 1 (Thread 0x74b12aa006c0 (LWP 1543)):
[KCrash Handler]
#5  QtWaylandClient::QWaylandWindow::waylandScreen (this=0x61fe6f5864b0) at /usr/src/debug/qt6-wayland/qtwayland/src/client/qwaylandwindow.cpp:956
#6  QtWaylandClient::QWaylandWindow::devicePixelRatio (this=0x61fe6f5864b0) at /usr/src/debug/qt6-wayland/qtwayland/src/client/qwaylandwindow.cpp:1519
#7  0x000074b183eccf0c in QtWaylandClient::QWaylandEglWindow::updateSurface (this=0x61fe6f5864b0, create=true) at /usr/src/debug/qt6-wayland/qtwayland/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp:70
#8  0x000074b183ecd905 in QtWaylandClient::QWaylandGLContext::makeCurrent (this=this@entry=0x74b0b8002210, surface=<optimized out>) at /usr/src/debug/qt6-wayland/qtwayland/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp:318
#9  0x000074b18b2adc28 in QOpenGLContext::makeCurrent (this=0x74b0b8001f60, surface=0x61fe6e8b8330) at /usr/src/debug/qt6-base/qtbase/src/gui/kernel/qopenglcontext.cpp:664
#10 0x000074b18b46f112 in QRhiGles2::ensureContext(QSurface*) const [clone .constprop.0] (this=0x74b0b80018c0, surface=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/gui/rhi/qrhigles2.cpp:632
#11 0x000074b18c218647 in QSGRenderThread::invalidateGraphics (this=0x61fe6f50af30, window=0x61fe6f264dd0, inDestructor=true) at /usr/src/debug/qt6-declarative/qtdeclarative/src/quick/scenegraph/qsgthreadedrenderloop.cpp:473
#12 QSGRenderThread::event (this=0x61fe6f50af30, e=<optimized out>) at /usr/src/debug/qt6-declarative/qtdeclarative/src/quick/scenegraph/qsgthreadedrenderloop.cpp:368
#13 0x000074b18c219f9a in QSGRenderThread::processEventsAndWaitForMore (this=0x61fe6f50af30) at /usr/src/debug/qt6-declarative/qtdeclarative/src/quick/scenegraph/qsgthreadedrenderloop.cpp:869
#14 QSGRenderThread::run (this=0x61fe6f50af30) at /usr/src/debug/qt6-declarative/qtdeclarative/src/quick/scenegraph/qsgthreadedrenderloop.cpp:991
#15 0x000074b18aac9747 in operator() (__closure=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qthread_unix.cpp:326
#16 (anonymous namespace)::terminate_on_exception<QThreadPrivate::start(void*)::<lambda()> > (t=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qthread_unix.cpp:262
#17 QThreadPrivate::start (arg=0x61fe6f50af30) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qthread_unix.cpp:285
#18 0x000074b18a2a6ded in start_thread (arg=<optimized out>) at pthread_create.c:447
#19 0x000074b18a32a0dc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
Comment 2 Nate Graham 2024-06-25 22:36:11 UTC
*** Bug 489065 has been marked as a duplicate of this bug. ***
Comment 3 Nate Graham 2024-06-26 16:03:23 UTC
*** Bug 489211 has been marked as a duplicate of this bug. ***
Comment 4 Nate Graham 2024-06-27 19:14:11 UTC
*** Bug 489309 has been marked as a duplicate of this bug. ***
Comment 5 duha.bugs 2024-06-28 18:57:06 UTC
*** Bug 489369 has been marked as a duplicate of this bug. ***
Comment 6 duha.bugs 2024-06-28 18:58:43 UTC
*** Bug 489363 has been marked as a duplicate of this bug. ***
Comment 7 Nate Graham 2024-06-28 19:25:58 UTC
*** Bug 489072 has been marked as a duplicate of this bug. ***
Comment 8 mitchell 2024-06-29 01:44:35 UTC
Hello, I can confirm this is a bug. I get crashes in plasmashell whenever my primary screen turns off - including when the system sleeps. New issue in 6.1.

This is particularly bad for me as my primary screen has a firmware bug causing it to appear disconnected to the video card even when it's turned off via the onscreen display. So when I turn my main screen off and then back on, plasmashell crashes as it appears as if I had unplugged it and replugged it.

My stack trace is the same as the one already in the thread。
Comment 9 Akseli Lahtinen 2024-07-02 08:22:46 UTC
*** Bug 489419 has been marked as a duplicate of this bug. ***
Comment 10 Akseli Lahtinen 2024-07-02 08:23:09 UTC
*** Bug 489370 has been marked as a duplicate of this bug. ***
Comment 11 Nate Graham 2024-07-02 19:46:34 UTC
*** Bug 489535 has been marked as a duplicate of this bug. ***
Comment 12 Nate Graham 2024-07-02 20:00:52 UTC
*** Bug 489458 has been marked as a duplicate of this bug. ***
Comment 13 Nate Graham 2024-07-02 20:02:10 UTC
*** Bug 488730 has been marked as a duplicate of this bug. ***
Comment 14 ollilein 2024-07-03 11:56:00 UTC
Created attachment 171328 [details]
Backtrace from plasmashell 6.1.2

I updated to
KDE Plasma Version: 6.1.2
KDE Frameworks Version: 6.3.0 
Qt Version: 6.7.2
and the bug still persist.
Comment 15 ollilein 2024-07-03 14:49:44 UTC
Created attachment 171332 [details]
Kde crashmanager backtrace logfile

I looked at the kde crashmanager and saved this logfile, maybe it's helpful.
Comment 16 LongueBarche 2024-07-03 15:06:20 UTC
I have the same issue on a a dual monitor setup. Once the automatic power saving enters after 10 min, my system crashes completely.
Doing a manual shutdown of the monitors will trigger the same behavior.
For the time being, I disabled all energy saving features.

KDE Plasma: 6.1.1
KDE Frameworks: 6.3.0
Qt : 6.7.2
Kernel : 6.6.35-rt34-x64v-rt-1-xanmod1
Session type : Wayland

Backtrace:
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=11, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007d35438a8eb3 in __pthread_kill_internal (threadid=<optimized out>, signo=11) at pthread_kill.c:78
#2  0x00007d3543850a30 in __GI_raise (sig=11) at ../sysdeps/posix/raise.c:26
#3  0x00007d3545ebd643 in KCrash::defaultCrashHandler (sig=11) at /usr/src/debug/kcrash/kcrash-6.3.0/src/kcrash.cpp:597
#4  <signal handler called>
#5  QtWaylandClient::QWaylandWindow::waylandScreen (this=0x5a9d4e8c7820) at /usr/src/debug/qt6-wayland/qtwayland/src/client/qwaylandwindow.cpp:956
#6  QtWaylandClient::QWaylandWindow::devicePixelRatio (this=0x5a9d4e8c7820) at /usr/src/debug/qt6-wayland/qtwayland/src/client/qwaylandwindow.cpp:1519
#7  0x00007d353d2b2f0c in QtWaylandClient::QWaylandEglWindow::updateSurface (this=0x5a9d4e8c7820, create=true) at /usr/src/debug/qt6-wayland/qtwayland/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp:70
#8  0x00007d353d2b3905 in QtWaylandClient::QWaylandGLContext::makeCurrent (this=this@entry=0x7d34dc2866e0, surface=<optimized out>)
    at /usr/src/debug/qt6-wayland/qtwayland/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp:318
#9  0x00007d3543eadc28 in QOpenGLContext::makeCurrent (this=0x7d34dc2fe120, surface=0x5a9d4dd719a0) at /usr/src/debug/qt6-base/qtbase/src/gui/kernel/qopenglcontext.cpp:664
#10 0x00007d354406f112 in QRhiGles2::ensureContext(QSurface*) const [clone .constprop.0] (this=0x7d34dc2fa4b0, surface=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/gui/rhi/qrhigles2.cpp:632
#11 0x00007d3544e18647 in QSGRenderThread::invalidateGraphics (this=0x5a9d4bf51020, window=0x5a9d4eebf900, inDestructor=true) at /usr/src/debug/qt6-declarative/qtdeclarative/src/quick/scenegraph/qsgthreadedrenderloop.cpp:473
#12 QSGRenderThread::event (this=0x5a9d4bf51020, e=<optimized out>) at /usr/src/debug/qt6-declarative/qtdeclarative/src/quick/scenegraph/qsgthreadedrenderloop.cpp:368
#13 0x00007d3544e19f9a in QSGRenderThread::processEventsAndWaitForMore (this=0x5a9d4bf51020) at /usr/src/debug/qt6-declarative/qtdeclarative/src/quick/scenegraph/qsgthreadedrenderloop.cpp:869
#14 QSGRenderThread::run (this=0x5a9d4bf51020) at /usr/src/debug/qt6-declarative/qtdeclarative/src/quick/scenegraph/qsgthreadedrenderloop.cpp:991
#15 0x00007d35434c9747 in operator() (__closure=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qthread_unix.cpp:326
#16 (anonymous namespace)::terminate_on_exception<QThreadPrivate::start(void*)::<lambda()> > (t=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qthread_unix.cpp:262
#17 QThreadPrivate::start (arg=0x5a9d4bf51020) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qthread_unix.cpp:285
#18 0x00007d35438a6ded in start_thread (arg=<optimized out>) at pthread_create.c:447
#19 0x00007d354392a0dc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
Comment 17 Nate Graham 2024-07-03 17:29:53 UTC
*** Bug 489639 has been marked as a duplicate of this bug. ***
Comment 18 Nate Graham 2024-07-03 19:50:46 UTC
*** Bug 489655 has been marked as a duplicate of this bug. ***
Comment 19 LongueBarche 2024-07-04 16:34:24 UTC
I've locked my session last night with sleep savings disabled and without turning off my monitors and no issue to report this morning.
Will try again tonight while manually turning off my monitors.