Bug 456947

Summary: On X11, Plasma crashes in ShellCorona::screenInvariants() when computer starts up without screen or monitor
Product: [Plasma] plasmashell Reporter: partain.m
Component: Desktop ContainmentAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: crash CC: akaykaya810, aleixpol, bertram.daniel, ferenosdev, kde, nate, nicolas.fella, notmart, nstoica2008, postix
Priority: NOR Keywords: drkonqi, multiscreen
Version: 5.24.5   
Target Milestone: 1.0   
Platform: unspecified   
OS: Linux   
URL: https://crash-reports.kde.org/organizations/kde/issues/5387/?project=9&query=is%3Aunresolved&referrer=issue-stream&sort=freq&statsPeriod=14d&stream_index=5
See Also: https://bugs.kde.org/show_bug.cgi?id=413782
https://bugs.kde.org/show_bug.cgi?id=468430
https://bugs.kde.org/show_bug.cgi?id=484838
Latest Commit: Version Fixed In: 6.0.5
Sentry Crash Report:
Attachments: New crash information added by DrKonqi
New crash information added by DrKonqi

Description partain.m 2022-07-20 16:09:59 UTC
Application: plasmashell (5.24.5)

Qt Version: 5.15.3
Frameworks Version: 5.93.0
Operating System: Linux 5.15.0-41-generic x86_64
Windowing System: X11
Distribution: Feren OS
DrKonqi: 5.24.5 [KCrashBackend]

-- Information about the crash:
- What I was doing when the application crashed:
I rebooted my laptop and closed the lid before it came up.
I rebooted my server with the tv it was connected to turned off.

In all cases, Plasma crashes every time.  Plasma does not crash if I reboot the laptop with the screen open or the server with the TV on and connected to its output.

The crash can be reproduced every time.

-- Backtrace:
Application: Plasma (plasmashell), signal: Aborted

[New LWP 1777]
[New LWP 1903]
[New LWP 2161]
[New LWP 2454]
[New LWP 2456]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007fcf3430b99f in poll () from /lib/x86_64-linux-gnu/libc.so.6
__preamble__
[Current thread is 1 (Thread 0x7fcf3044e9c0 (LWP 1759))]

Thread 6 (Thread 0x7fcf1b5cb700 (LWP 2456)):
#0  0x00007fcf3430700c in read () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007fcf32beab2f in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fcf32ba1ebe in g_main_context_check () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fcf32ba2312 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fcf32ba24a3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fcf348dc65b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fcf3488087b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007fcf3469a442 in QThread::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007fcf3625b43a in ?? () from /lib/x86_64-linux-gnu/libQt5Quick.so.5
#9  0x00007fcf3469b623 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#10 0x00007fcf3402f609 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#11 0x00007fcf34318133 in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 5 (Thread 0x7fcf1bdf1700 (LWP 2454)):
#0  0x00007fcf34036376 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007fcf346a168b in QWaitCondition::wait(QMutex*, QDeadlineTimer) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#2  0x00007fcf36321074 in ?? () from /lib/x86_64-linux-gnu/libQt5Quick.so.5
#3  0x00007fcf363214e9 in ?? () from /lib/x86_64-linux-gnu/libQt5Quick.so.5
#4  0x00007fcf3469b623 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fcf3402f609 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#6  0x00007fcf34318133 in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 4 (Thread 0x7fcf2cc5b700 (LWP 2161)):
#0  0x00007fcf3430700c in read () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007fcf32beab2f in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fcf32ba1ebe in g_main_context_check () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fcf32ba2312 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fcf32ba24a3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fcf348dc65b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fcf3488087b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007fcf3469a442 in QThread::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007fcf35ec0b39 in ?? () from /lib/x86_64-linux-gnu/libQt5Qml.so.5
#9  0x00007fcf3469b623 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#10 0x00007fcf3402f609 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#11 0x00007fcf34318133 in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 3 (Thread 0x7fcf2e953700 (LWP 1903)):
#0  0x00007fcf32b9e8ed in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007fcf32ba0345 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fcf32ba1cbf in g_main_context_check () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fcf32ba2312 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fcf32ba24a3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fcf348dc65b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fcf3488087b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007fcf3469a442 in QThread::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007fcf35216f4b in ?? () from /lib/x86_64-linux-gnu/libQt5DBus.so.5
#9  0x00007fcf3469b623 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#10 0x00007fcf3402f609 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#11 0x00007fcf34318133 in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 2 (Thread 0x7fcf2f5bd700 (LWP 1777)):
#0  0x00007fcf3430b99f in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007fcf36a3fc1a in ?? () from /lib/x86_64-linux-gnu/libxcb.so.1
#2  0x00007fcf36a4190a in xcb_wait_for_event () from /lib/x86_64-linux-gnu/libxcb.so.1
#3  0x00007fcf2fcea1a8 in ?? () from /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#4  0x00007fcf3469b623 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fcf3402f609 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#6  0x00007fcf34318133 in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 1 (Thread 0x7fcf3044e9c0 (LWP 1759)):
[KCrash Handler]
#4  0x00007fcf3423c00b in raise () from /lib/x86_64-linux-gnu/libc.so.6
#5  0x00007fcf3421b859 in abort () from /lib/x86_64-linux-gnu/libc.so.6
#6  0x00007fcf3465fbd7 in QMessageLogger::fatal(char const*, ...) const () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007fcf3465efe3 in qt_assert(char const*, char const*, int) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00005574f9eb1356 in ShellCorona::screenInvariants (this=0x5574fb1a5ed0) at /tmp/git-sources/plasma-workspace/shell/shellcorona.cpp:737
#9  0x00005574f9ece642 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (ShellCorona::*)() const>::call(void (ShellCorona::*)() const, ShellCorona*, void**) (f=(void (ShellCorona::*)(const ShellCorona * const)) 0x5574f9eb12ea <ShellCorona::screenInvariants() const>, o=0x5574fb1a5ed0, arg=0x7ffd30a08210) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:158
#10 0x00005574f9eccbe0 in QtPrivate::FunctionPointer<void (ShellCorona::*)() const>::call<QtPrivate::List<>, void>(void (ShellCorona::*)() const, ShellCorona*, void**) (f=(void (ShellCorona::*)(const ShellCorona * const)) 0x5574f9eb12ea <ShellCorona::screenInvariants() const>, o=0x5574fb1a5ed0, arg=0x7ffd30a08210) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:197
#11 0x00005574f9ec9999 in QtPrivate::QSlotObject<void (ShellCorona::*)() const, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x5574fae0a2e0, r=0x5574fb1a5ed0, a=0x7ffd30a08210, ret=0x0) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:418
#12 0x00007fcf348b8dfe in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#13 0x00007fcf348bd93e in QTimer::timeout(QTimer::QPrivateSignal) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#14 0x00007fcf348af875 in QObject::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#15 0x00007fcf3559fdc3 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#16 0x00007fcf355a8bd8 in QApplication::notify(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#17 0x00007fcf34881d7a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#18 0x00007fcf348db990 in QTimerInfoList::activateTimers() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#19 0x00007fcf348dc2c4 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#20 0x00007fcf32ba217d in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#21 0x00007fcf32ba2400 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#22 0x00007fcf32ba24a3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007fcf348dc642 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#24 0x00007fcf3488087b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#25 0x00007fcf34888a24 in QCoreApplication::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#26 0x00005574f9e85ba9 in main (argc=1, argv=0x7ffd30a08a08) at /tmp/git-sources/plasma-workspace/shell/main.cpp:238
[Inferior 1 (process 1759) detached]

Possible duplicates by query: bug 455892, bug 454695, bug 454057, bug 453639, bug 453125.

Reported using DrKonqi
Comment 1 Nate Graham 2022-08-01 19:17:49 UTC
*** Bug 457282 has been marked as a duplicate of this bug. ***
Comment 2 Akay 2022-08-23 06:13:06 UTC
Created attachment 151512 [details]
New crash information added by DrKonqi

plasmashell (5.25.3) using Qt 5.15.5

masaüstümde yükle ikonunu gördüm ama hali hazırda bilgisayarımda istem vardı ve birkaç saniye sonra çökme uyarısı geldi.

-- Backtrace (Reduced):
#6  0x00007fd55daffbd9 in QMessageLogger::fatal(char const*, ...) const () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007fd55dafefe5 in qt_assert(char const*, char const*, int) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x0000562eb20e1c28 in ShellCorona::screenInvariants (this=0x7fd554005490) at /tmp/git-sources/plasma-workspace/shell/shellcorona.cpp:830
#9  0x0000562eb21033c0 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (ShellCorona::*)() const>::call(void (ShellCorona::*)() const, ShellCorona*, void**) (f=(void (ShellCorona::*)(const ShellCorona * const)) 0x562eb20e17c4 <ShellCorona::screenInvariants() const>, o=0x7fd554005490, arg=0x7ffe03de9040) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:158
#10 0x0000562eb210176e in QtPrivate::FunctionPointer<void (ShellCorona::*)() const>::call<QtPrivate::List<>, void>(void (ShellCorona::*)() const, ShellCorona*, void**) (f=(void (ShellCorona::*)(const ShellCorona * const)) 0x562eb20e17c4 <ShellCorona::screenInvariants() const>, o=0x7fd554005490, arg=0x7ffe03de9040) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:197
Comment 3 tipo 2022-08-31 13:29:28 UTC
Created attachment 151731 [details]
New crash information added by DrKonqi

plasmashell (5.25.4) using Qt 5.15.5

changing themes, the default ones, not other themes from the store.

-- Backtrace (Reduced):
#6  0x00007f836a22ebd9 in QMessageLogger::fatal(char const*, ...) const () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007f836a22dfe5 in qt_assert(char const*, char const*, int) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x000055bcd4540d38 in ShellCorona::screenInvariants (this=0x7f8360005ae0) at /tmp/git-sources/plasma-workspace/shell/shellcorona.cpp:832
#9  0x000055bcd45624d0 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (ShellCorona::*)() const>::call(void (ShellCorona::*)() const, ShellCorona*, void**) (f=(void (ShellCorona::*)(const ShellCorona * const)) 0x55bcd45408d4 <ShellCorona::screenInvariants() const>, o=0x7f8360005ae0, arg=0x7ffc9ea0e220) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:158
#10 0x000055bcd456087e in QtPrivate::FunctionPointer<void (ShellCorona::*)() const>::call<QtPrivate::List<>, void>(void (ShellCorona::*)() const, ShellCorona*, void**) (f=(void (ShellCorona::*)(const ShellCorona * const)) 0x55bcd45408d4 <ShellCorona::screenInvariants() const>, o=0x7f8360005ae0, arg=0x7ffc9ea0e220) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:197
Comment 4 Nate Graham 2022-08-31 20:11:54 UTC
*** Bug 458548 has been marked as a duplicate of this bug. ***
Comment 5 Nate Graham 2023-02-17 23:07:20 UTC
*** Bug 465921 has been marked as a duplicate of this bug. ***
Comment 6 Nate Graham 2023-02-17 23:07:56 UTC
Is anyone who was encountering this specific crash able to reproduce it after upgrading to Plasma 5.27?
Comment 7 Nate Graham 2023-02-22 01:55:01 UTC
.
Comment 8 Bug Janitor Service 2023-03-09 03:45:34 UTC Comment hidden (spam)
Comment 9 Bug Janitor Service 2023-03-24 03:45:40 UTC Comment hidden (spam)
Comment 10 Nate Graham 2023-08-30 20:44:17 UTC
Still getting duplicates; re-opening.
Comment 11 Nate Graham 2023-08-30 20:44:31 UTC
*** Bug 466857 has been marked as a duplicate of this bug. ***
Comment 12 Bug Janitor Service 2024-04-15 11:09:47 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4238
Comment 13 Marco Martin 2024-04-15 12:11:33 UTC
https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4238  *might* fix that, needs to see if it will make sentry reports go down
Comment 14 Marco Martin 2024-04-15 12:36:33 UTC
Git commit dfd160bdf6f660c10b712a664c86a2a7339e8e72 by Marco Martin.
Committed on 15/04/2024 at 12:36.
Pushed by mart into branch 'master'.

Fix redundantoutputs when the enabled screens change very quickly

on X11, when a single transaction from KScreen disables screenA and
enabled screenB, a new output order arrivers before the old output gets removed
 and in that moment the new screen will be considered redundant to che screen
that is about to be removed, causing an invalid internal state
Related: bug 484687

M  +4    -3    shell/screenpool.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/dfd160bdf6f660c10b712a664c86a2a7339e8e72
Comment 15 Bug Janitor Service 2024-04-15 12:37:40 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4239
Comment 16 Marco Martin 2024-04-15 12:56:52 UTC
Git commit da35849d5f4913221ba362d3961fd29526f364d5 by Marco Martin.
Committed on 15/04/2024 at 12:37.
Pushed by mart into branch 'Plasma/6.0'.

Fix redundantoutputs when the enabled screens change very quickly

on X11, when a single transaction from KScreen disables screenA and
enabled screenB, a new output order arrivers before the old output gets removed
 and in that moment the new screen will be considered redundant to che screen
that is about to be removed, causing an invalid internal state
Related: bug 484687


(cherry picked from commit dfd160bdf6f660c10b712a664c86a2a7339e8e72)

c6ff79fd Fix redundantoutputs when the enabled screens change very quickly

M  +4    -3    shell/screenpool.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/da35849d5f4913221ba362d3961fd29526f364d5
Comment 17 Bug Janitor Service 2024-04-16 09:24:38 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/libplasma/-/merge_requests/1102
Comment 18 Akseli Lahtinen 2024-04-16 09:26:43 UTC
Git commit ce01af99fc76ef3c3f48e739c12e96f85b4a79e9 by Akseli Lahtinen.
Committed on 16/04/2024 at 09:26.
Pushed by akselmo into branch 'master'.

containmentview: Remove QueuedConnection from setContainment

Queued connection here causes a race condition when restarting plasmashell
and can cause it to get stuck to crash loop, since plasmashell
tries to assert for panel to be visible but this slot is not even called
yet, even though the signal is emitted.

M  +5    -10   src/plasmaquick/containmentview.cpp

https://invent.kde.org/plasma/libplasma/-/commit/ce01af99fc76ef3c3f48e739c12e96f85b4a79e9
Comment 19 Bug Janitor Service 2024-04-16 09:27:48 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/libplasma/-/merge_requests/1103
Comment 20 Akseli Lahtinen 2024-04-16 09:29:20 UTC
Git commit b76440b35bb8c067731dfe30e888589ade90551f by Akseli Lahtinen.
Committed on 16/04/2024 at 09:27.
Pushed by akselmo into branch 'Plasma/6.0'.

containmentview: Remove QueuedConnection from setContainment

Queued connection here causes a race condition when restarting plasmashell
and can cause it to get stuck to crash loop, since plasmashell
tries to assert for panel to be visible but this slot is not even called
yet, even though the signal is emitted.


(cherry picked from commit ce01af99fc76ef3c3f48e739c12e96f85b4a79e9)

5ff7251c containmentview: Remove queuedconnection from setContainment

M  +5    -10   src/plasmaquick/containmentview.cpp

https://invent.kde.org/plasma/libplasma/-/commit/b76440b35bb8c067731dfe30e888589ade90551f
Comment 21 Nate Graham 2024-05-10 14:00:37 UTC
That commit made it into Plasma 6.0.5, which will be been released in about two weeks. We think this may have resolved the issue fully; closing the bug report. However please do feel free to re-open if if you can still reproduce the crash with 6.0.5 or later.

If you do, make sure it's the exact same crash, with the same backtrace.

Thanks!