Bug 489180 - plasma crashed in QtWaylandClient::QWaylandWindow::waylandScreen() when external monitor lost power
Summary: plasma crashed in QtWaylandClient::QWaylandWindow::waylandScreen() when exter...
Status: RESOLVED UPSTREAM
Alias: None
Product: plasmashell
Classification: Plasma
Component: generic-crash (show other bugs)
Version: 6.1.0
Platform: Arch Linux Linux
: VHI crash
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: multiscreen, wayland
: 488730 489065 489211 489214 489309 489363 489369 489370 489419 489458 489535 489639 489655 489803 489871 489930 489949 489969 489974 489991 490000 490018 490023 490079 490253 490258 490312 490314 490332 490343 490386 490424 490581 490621 490662 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-06-25 13:45 UTC by Mariusz Libera
Modified: 2024-07-22 20:44 UTC (History)
46 users (show)

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


Attachments
backtrace (163.04 KB, text/vnd.kde.kcrash-report)
2024-06-25 13:45 UTC, Mariusz Libera
Details
Backtrace from plasmashell 6.1.2 (5.90 KB, text/x-log)
2024-07-03 11:56 UTC, ollilein
Details
Kde crashmanager backtrace logfile (52.53 KB, text/x-log)
2024-07-03 14:49 UTC, ollilein
Details
qtwayland-6.7.2 patch (2.76 KB, patch)
2024-07-06 15:37 UTC, ollilein
Details
New plasmashell log with patched qtwayland-6.7.2 (103.35 KB, text/x-log)
2024-07-06 15:47 UTC, ollilein
Details
Plasmashell log with experimental qt-6.7.3 (100.78 KB, text/x-log)
2024-07-09 09:36 UTC, ollilein
Details

Note You need to log in before you can comment on or make changes to this bug.
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.
Comment 20 LongueBarche 2024-07-05 13:55:25 UTC
Session locked, monitors manually shut down using power button last night and no issue this morning.
At this point, I would suspect something with power saving, suspend or sleep actions.
Comment 21 ollilein 2024-07-05 13:57:09 UTC
For me there is no crash after resuming from suspend (sleep) it only appears when reactivating the screen from screen blank.
Comment 22 David Edmundson 2024-07-05 15:49:24 UTC
In progress with https://codereview.qt-project.org/c/qt/qtwayland/+/574934
Comment 23 Antonio Rojas 2024-07-06 07:49:10 UTC
*** Bug 489803 has been marked as a duplicate of this bug. ***
Comment 24 ollilein 2024-07-06 15:37:54 UTC
Created attachment 171427 [details]
qtwayland-6.7.2 patch

I made a patch for qtwayland-6.7.2, it compiles fine but it keeps crashing. Don't know if a made something wrong creating the patch.

I will post a new backtrace when it crashes the next time.
Comment 25 ollilein 2024-07-06 15:47:43 UTC
Created attachment 171430 [details]
New plasmashell log with patched qtwayland-6.7.2

Here is a new backtrace from plasmashill with the patched version of qtwayland-6.7.2.
Comment 26 ollilein 2024-07-09 09:36:14 UTC
Created attachment 171494 [details]
Plasmashell log with experimental qt-6.7.3

I have updated qt to qt-6.7.9999 (latest 6.7.3) for testing if it crashes, 2 days before. Today plasmashell crashed again, so i include the backtrace here.

Today i will go back to qt-6.7.2, because i don't want experimental stuff on my pc.
Comment 27 ollilein 2024-07-09 09:38:54 UTC
I forgot to reopen the bug.
Comment 28 Antonio Rojas 2024-07-09 10:57:02 UTC
The fix is not merged in 6.7 yet
https://codereview.qt-project.org/c/qt/qtwayland/+/574983
Comment 29 ollilein 2024-07-09 12:42:00 UTC
(In reply to Antonio Rojas from comment #28)
> The fix is not merged in 6.7 yet
> https://codereview.qt-project.org/c/qt/qtwayland/+/574983

Ok, then it's my fault, sorry for this.
Comment 30 Kacper Koniuszy 2024-07-09 17:07:09 UTC
(In reply to ollilein from comment #29)
> (In reply to Antonio Rojas from comment #28)
> > The fix is not merged in 6.7 yet
> > https://codereview.qt-project.org/c/qt/qtwayland/+/574983
> 
> Ok, then it's my fault, sorry for this.

No, you applied the patch correctly. Compare the first stacktraces and the current ones - they're rather different. 

Before applying the patch, we had a segfault in QWaylandWindow::waylandScreen. With this patch, this is solved but we get a crash due to a null pointer reference in QWaylandWindow::handleScreensChanged.  

This issue can be considered solved, but there's another one. Bug 489072 describes the problem you have right now. Take a look at this comment: https://bugs.kde.org/show_bug.cgi?id=489072#c2
Comment 31 Kacper Koniuszy 2024-07-09 17:57:00 UTC
*** Bug 489969 has been marked as a duplicate of this bug. ***
Comment 32 Kacper Koniuszy 2024-07-09 17:58:09 UTC
*** Bug 489949 has been marked as a duplicate of this bug. ***
Comment 33 Kacper Koniuszy 2024-07-09 17:59:35 UTC
*** Bug 489930 has been marked as a duplicate of this bug. ***
Comment 34 Kacper Koniuszy 2024-07-09 18:00:00 UTC
*** Bug 489871 has been marked as a duplicate of this bug. ***
Comment 35 Antonio Rojas 2024-07-09 20:08:41 UTC
*** Bug 489991 has been marked as a duplicate of this bug. ***
Comment 36 Kacper Koniuszy 2024-07-10 04:42:51 UTC
*** Bug 490000 has been marked as a duplicate of this bug. ***
Comment 37 cwo 2024-07-10 08:29:29 UTC
*** Bug 489974 has been marked as a duplicate of this bug. ***
Comment 38 Antonio Rojas 2024-07-10 17:34:35 UTC
*** Bug 490018 has been marked as a duplicate of this bug. ***
Comment 39 Zamundaaa 2024-07-10 17:42:16 UTC
*** Bug 489214 has been marked as a duplicate of this bug. ***
Comment 40 ollilein 2024-07-10 17:53:39 UTC
(In reply to Kacper Koniuszy from comment #30)
> (In reply to ollilein from comment #29)
> > (In reply to Antonio Rojas from comment #28)
> > > The fix is not merged in 6.7 yet
> > > https://codereview.qt-project.org/c/qt/qtwayland/+/574983
> > 
> > Ok, then it's my fault, sorry for this.
> 
> No, you applied the patch correctly. Compare the first stacktraces and the
> current ones - they're rather different. 
> 
> Before applying the patch, we had a segfault in
> QWaylandWindow::waylandScreen. With this patch, this is solved but we get a
> crash due to a null pointer reference in
> QWaylandWindow::handleScreensChanged.  
> 
> This issue can be considered solved, but there's another one. Bug 489072
> describes the problem you have right now. Take a look at this comment:
> https://bugs.kde.org/show_bug.cgi?id=489072#c2

Thank you for the hint with the other bug :-)
Comment 41 Antonio Rojas 2024-07-11 06:16:35 UTC
*** Bug 490023 has been marked as a duplicate of this bug. ***
Comment 42 Antonio Rojas 2024-07-11 06:48:57 UTC
*** Bug 490079 has been marked as a duplicate of this bug. ***
Comment 43 Jared Adams 2024-07-11 18:55:20 UTC
Can confirm fix. I'm now getting the QWaylandWindow::handleScreensChanged error instead of the QWaylandWindow::waylandScreen error.

Qt 6.7.2
Plasma 6.1.2
Frameworks 6.3.0
Kernel 6.9.8-arch1-1
Arch Linux
Wayland
Comment 44 Nate Graham 2024-07-14 03:03:01 UTC
Yeah, that one is Bug 489072.
Comment 45 Antonio Rojas 2024-07-14 07:21:37 UTC
*** Bug 490253 has been marked as a duplicate of this bug. ***
Comment 46 Antonio Rojas 2024-07-14 07:25:07 UTC
*** Bug 490258 has been marked as a duplicate of this bug. ***
Comment 47 cwo 2024-07-15 21:36:33 UTC
*** Bug 490312 has been marked as a duplicate of this bug. ***
Comment 48 cwo 2024-07-15 21:38:21 UTC
*** Bug 490314 has been marked as a duplicate of this bug. ***
Comment 49 cwo 2024-07-16 04:35:19 UTC
*** Bug 490332 has been marked as a duplicate of this bug. ***
Comment 50 cwo 2024-07-16 09:48:33 UTC
*** Bug 490343 has been marked as a duplicate of this bug. ***
Comment 51 cwo 2024-07-18 09:33:34 UTC
*** Bug 490424 has been marked as a duplicate of this bug. ***
Comment 52 cwo 2024-07-22 14:11:35 UTC
*** Bug 490621 has been marked as a duplicate of this bug. ***
Comment 53 cwo 2024-07-22 14:12:56 UTC
*** Bug 490581 has been marked as a duplicate of this bug. ***
Comment 54 TraceyC 2024-07-22 20:40:57 UTC
*** Bug 490662 has been marked as a duplicate of this bug. ***
Comment 55 TraceyC 2024-07-22 20:44:02 UTC
*** Bug 490386 has been marked as a duplicate of this bug. ***