Bug 377280

Summary: plasma crash on startup with external monitor connected
Product: [Plasma] plasmashell Reporter: Szymon Janc <szymon.janc>
Component: generic-multiscreenAssignee: Aleix Pol <aleixpol>
Status: RESOLVED FIXED    
Severity: crash CC: bhush94, justin.zobel, notmart, plasma-bugs, rdieter, rizzitello
Priority: NOR Keywords: drkonqi
Version: 5.8.6   
Target Milestone: 1.0   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: crash
plasma-org.kde.plasma.desktop-appletsrc
plasmashellrc

Description Szymon Janc 2017-03-06 11:12:46 UTC
Application: plasmashell (5.8.6)

Qt Version: 5.7.1
Frameworks Version: 5.31.0
Operating System: Linux 4.10.0-1.fc26.x86_64 x86_64
Distribution (Platform): Fedora RPMs

-- Information about the crash:
- What I was doing when the application crashed:

Just start laptop while docked. After (auto) login no plasma desktop is run. Starting
plasmshell manually works just fine. After that I get crash report notification.

- Custom settings of the application:

External monitor has 2560x1440 resolution. Internal monitor is disabled (lid is closed).

The crash can be reproduced every time.

-- Backtrace:
Application: Plasma (plasmashell), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f22079943c0 (LWP 1531))]

Thread 7 (Thread 0x7f215c8d3700 (LWP 2021)):
#0  0x00007f221482c01d in poll () at /lib64/libc.so.6
#1  0x00007f220d39b166 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#2  0x00007f220d39b27c in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#3  0x00007f22156326eb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#4  0x00007f22155e368a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#5  0x00007f22154405e3 in QThread::exec() () at /lib64/libQt5Core.so.5
#6  0x00007f22190428b6 in QQuickPixmapReader::run() () at /lib64/libQt5Quick.so.5
#7  0x00007f22154449ca in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
#8  0x00007f2213b806ca in start_thread () at /lib64/libpthread.so.0
#9  0x00007f2214837f7f in clone () at /lib64/libc.so.6

Thread 6 (Thread 0x7f21e3ef7700 (LWP 1935)):
#0  0x00007f2213b86460 in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0
#1  0x00007f221b1042f4 in QTWTF::TCMalloc_PageHeap::scavengerThread() () at /lib64/libQt5Script.so.5
#2  0x00007f221b104339 in  () at /lib64/libQt5Script.so.5
#3  0x00007f2213b806ca in start_thread () at /lib64/libpthread.so.0
#4  0x00007f2214837f7f in clone () at /lib64/libc.so.6

Thread 5 (Thread 0x7f21f4b55700 (LWP 1771)):
#0  0x00007f2214827bed in read () at /lib64/libc.so.6
#1  0x00007f220d3df4d0 in g_wakeup_acknowledge () at /lib64/libglib-2.0.so.0
#2  0x00007f220d39ac83 in g_main_context_check () at /lib64/libglib-2.0.so.0
#3  0x00007f220d39b104 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#4  0x00007f220d39b27c in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#5  0x00007f22156326eb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#6  0x00007f22155e368a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#7  0x00007f22154405e3 in QThread::exec() () at /lib64/libQt5Core.so.5
#8  0x00007f22186b74e5 in QQmlThreadPrivate::run() () at /lib64/libQt5Qml.so.5
#9  0x00007f22154449ca in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
#10 0x00007f2213b806ca in start_thread () at /lib64/libpthread.so.0
#11 0x00007f2214837f7f in clone () at /lib64/libc.so.6

Thread 4 (Thread 0x7f21f63b0700 (LWP 1713)):
#0  0x00007f2214827bed in read () at /lib64/libc.so.6
#1  0x00007f220d3df4d0 in g_wakeup_acknowledge () at /lib64/libglib-2.0.so.0
#2  0x00007f220d39ac83 in g_main_context_check () at /lib64/libglib-2.0.so.0
#3  0x00007f220d39b104 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#4  0x00007f220d39b27c in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#5  0x00007f22156326eb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#6  0x00007f22155e368a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#7  0x00007f22154405e3 in QThread::exec() () at /lib64/libQt5Core.so.5
#8  0x00007f22186b74e5 in QQmlThreadPrivate::run() () at /lib64/libQt5Qml.so.5
#9  0x00007f22154449ca in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
#10 0x00007f2213b806ca in start_thread () at /lib64/libpthread.so.0
#11 0x00007f2214837f7f in clone () at /lib64/libc.so.6

Thread 3 (Thread 0x7f21f7df5700 (LWP 1655)):
#0  0x00007f220d3e0894 in g_mutex_unlock () at /lib64/libglib-2.0.so.0
#1  0x00007f220d39a690 in g_main_context_prepare () at /lib64/libglib-2.0.so.0
#2  0x00007f220d39b08b in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#3  0x00007f220d39b27c in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#4  0x00007f22156326eb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#5  0x00007f22155e368a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#6  0x00007f22154405e3 in QThread::exec() () at /lib64/libQt5Core.so.5
#7  0x00007f2215ce0739 in QDBusConnectionManager::run() () at /lib64/libQt5DBus.so.5
#8  0x00007f22154449ca in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
#9  0x00007f2213b806ca in start_thread () at /lib64/libpthread.so.0
#10 0x00007f2214837f7f in clone () at /lib64/libc.so.6

Thread 2 (Thread 0x7f21fd79f700 (LWP 1647)):
#0  0x00007f221482c01d in poll () at /lib64/libc.so.6
#1  0x00007f2219a0fd10 in _xcb_conn_wait () at /lib64/libxcb.so.1
#2  0x00007f2219a11aa9 in xcb_wait_for_event () at /lib64/libxcb.so.1
#3  0x00007f2200dd3d69 in QXcbEventReader::run() () at /lib64/libQt5XcbQpa.so.5
#4  0x00007f22154449ca in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
#5  0x00007f2213b806ca in start_thread () at /lib64/libpthread.so.0
#6  0x00007f2214837f7f in clone () at /lib64/libc.so.6

Thread 1 (Thread 0x7f22079943c0 (LWP 1531)):
[KCrash Handler]
#6  0x00007f22163eb89b in KConfigGroupPrivate::fullName() const () at /lib64/libKF5ConfigCore.so.5
#7  0x00007f22163eac29 in KConfigGroup::readEntry(char const*, QVariant const&) const () at /lib64/libKF5ConfigCore.so.5
#8  0x0000562c35ceebda in int KConfigGroup::readEntry<int>(char const*, int const&) const ()
#9  0x0000562c35cec8f5 in PanelView::restore() ()
#10 0x0000562c35cecbc4 in PanelView::containmentChanged() ()
#11 0x0000562c35cee36d in PanelView::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) ()
#12 0x00007f221560b721 in QMetaObject::activate(QObject*, int, int, void**) () at /lib64/libQt5Core.so.5
#13 0x00007f221b2404c9 in PlasmaQuick::ContainmentViewPrivate::setContainment(Plasma::Containment*) () at /lib64/libKF5PlasmaQuick.so.5
#14 0x0000562c35cf87d8 in ShellCorona::createWaitingPanels() ()
#15 0x00007f221560ba56 in QMetaObject::activate(QObject*, int, int, void**) () at /lib64/libQt5Core.so.5
#16 0x00007f2215617c08 in QTimer::timerEvent(QTimerEvent*) () at /lib64/libQt5Core.so.5
#17 0x00007f221560c79b in QObject::event(QEvent*) () at /lib64/libQt5Core.so.5
#18 0x00007f2215eb0ecc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib64/libQt5Widgets.so.5
#19 0x00007f2215eb8671 in QApplication::notify(QObject*, QEvent*) () at /lib64/libQt5Widgets.so.5
#20 0x00007f22155e46fa in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib64/libQt5Core.so.5
#21 0x00007f2215631ceb in QTimerInfoList::activateTimers() () at /lib64/libQt5Core.so.5
#22 0x00007f2215632241 in timerSourceDispatch(_GSource*, int (*)(void*), void*) () at /lib64/libQt5Core.so.5
#23 0x00007f220d39ae52 in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#24 0x00007f220d39b1d0 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#25 0x00007f220d39b27c in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#26 0x00007f22156326cf in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#27 0x00007f22155e368a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#28 0x00007f22155eb18c in QCoreApplication::exec() () at /lib64/libQt5Core.so.5
#29 0x0000562c35cd9752 in main ()

Possible duplicates by query: bug 366707.

Reported using DrKonqi
Comment 1 Marco Martin 2017-03-06 14:50:44 UTC
can this be reproduced with full debug packages installed?
(at least plasma-workspace and kconfig)
Comment 2 Marco Martin 2017-03-06 15:08:50 UTC
can you post here those two files?
plasmashellrc
and
plasma-org.kde.plasma.desktop-appletsrc
Comment 3 Szymon Janc 2017-03-07 09:16:33 UTC
Hi,

attaching requested files and trace with debugs.

I also noticed that this happen only with auto login. If I logout and login then there is no crash.
Comment 4 Szymon Janc 2017-03-07 09:17:15 UTC
Created attachment 104431 [details]
crash
Comment 5 Szymon Janc 2017-03-07 09:17:41 UTC
Created attachment 104432 [details]
plasma-org.kde.plasma.desktop-appletsrc
Comment 6 Szymon Janc 2017-03-07 09:17:54 UTC
Created attachment 104433 [details]
plasmashellrc
Comment 7 Marco Martin 2017-05-22 14:04:19 UTC
pasting inline backtrace

Thread 1 (Thread 0x7f7b278cf3c0 (LWP 1565)):
[KCrash Handler]
#6  0x00007f7b3632689b in QExplicitlySharedDataPointer<KConfigGroupPrivate>::operator!() const (this=<optimized out>) at /usr/include/qt5/QtCore/qshareddata.h:210
#7  0x00007f7b3632689b in KConfigGroupPrivate::fullName() const (this=0x0) at /usr/src/debug/kconfig-5.31.0/src/core/kconfiggroup.cpp:86
#8  0x00007f7b36325c29 in KConfigGroup::readEntry(char const*, QVariant const&) const (this=this@entry=0x7ffe30eb5670, key=key@entry=0x55da0aefc458 "alignment", aDefault=...) at /usr/src/debug/kconfig-5.31.0/src/core/kconfiggroup.cpp:719
#9  0x000055da0aeb4bda in KConfigGroup::readEntry<int>(char const*, int const&) const (this=this@entry=0x7ffe30eb5670, key=key@entry=0x55da0aefc458 "alignment", defaultValue=@0x7ffe30eb5650: 1) at /usr/include/KF5/KConfigCore/kconfiggroup.h:723
#10 0x000055da0aeb28f5 in PanelView::restore() (this=this@entry=0x55da0c28a8e0) at /usr/src/debug/plasma-workspace-5.8.6/shell/panelview.cpp:494
#11 0x000055da0aeb2bc4 in PanelView::containmentChanged() (this=0x55da0c28a8e0) at /usr/src/debug/plasma-workspace-5.8.6/shell/panelview.cpp:1049
#12 0x000055da0aeb436d in PanelView::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x55da0c28a8e0, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /usr/src/debug/plasma-workspace-5.8.6/x86_64-redhat-linux-gnu/shell/moc_panelview.cpp:234
#13 0x00007f7b35546721 in QMetaObject::activate(QObject*, int, int, void**) (sender=0x55da0c28a8e0, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=2, argv=argv@entry=0x0) at kernel/qobject.cpp:3740
#14 0x00007f7b35546fc7 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=<optimized out>, m=m@entry=0x7f7b3b39f720 <PlasmaQuick::ContainmentView::staticMetaObject>, local_signal_index=local_signal_index@entry=2, argv=argv@entry=0x0) at kernel/qobject.cpp:3602
#15 0x00007f7b3b17b0b3 in PlasmaQuick::ContainmentView::containmentChanged() (this=<optimized out>) at /usr/src/debug/plasma-framework-5.31.0/x86_64-redhat-linux-gnu/src/plasmaquick/moc_containmentview.cpp:261
#16 0x00007f7b3b17b4c9 in PlasmaQuick::ContainmentViewPrivate::setContainment(Plasma::Containment*) (this=0x55da0bfe61f0, cont=0x55da0b3c6fa0) at /usr/src/debug/plasma-framework-5.31.0/src/plasmaquick/containmentview.cpp:96
#17 0x00007f7b3b17bf09 in PlasmaQuick::ContainmentView::setContainment(Plasma::Containment*) (this=this@entry=0x55da0c28a8e0, cont=<optimized out>) at /usr/src/debug/plasma-framework-5.31.0/src/plasmaquick/containmentview.cpp:258
#18 0x000055da0aebe7d8 in ShellCorona::createWaitingPanels() (this=0x55da0b334ca0) at /usr/src/debug/plasma-workspace-5.8.6/shell/shellcorona.cpp:1275
#19 0x00007f7b35546a56 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7ffe30eb5be0, r=0x55da0b334ca0, this=<optimized out>) at ../../src/corelib/kernel/qobject_impl.h:101
#20 0x00007f7b35546a56 in QMetaObject::activate(QObject*, int, int, void**) (sender=sender@entry=0x55da0b334d60, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3723
#21 0x00007f7b35546fc7 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=sender@entry=0x55da0b334d60, m=m@entry=0x7f7b3575bda0 <QTimer::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3602
#22 0x00007f7b355b6890 in QTimer::timeout(QTimer::QPrivateSignal) (this=this@entry=0x55da0b334d60) at .moc/moc_qtimer.cpp:198
#23 0x00007f7b35552c08 in QTimer::timerEvent(QTimerEvent*) (this=0x55da0b334d60, e=<optimized out>) at kernel/qtimer.cpp:254
#24 0x00007f7b3554779b in QObject::event(QEvent*) (this=0x55da0b334d60, e=<optimized out>) at kernel/qobject.cpp:1285
#25 0x00007f7b35debecc in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x55da0b334d60, e=0x7ffe30eb5f00) at kernel/qapplication.cpp:3799
#26 0x00007f7b35df3671 in QApplication::notify(QObject*, QEvent*) (this=0x7ffe30eb62c0, receiver=0x55da0b334d60, e=0x7ffe30eb5f00) at kernel/qapplication.cpp:3556
#27 0x00007f7b3551f6fa in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x55da0b334d60, event=event@entry=0x7ffe30eb5f00) at kernel/qcoreapplication.cpp:988
#28 0x00007f7b3556cceb in QCoreApplication::sendEvent(QObject*, QEvent*) (event=0x7ffe30eb5f00, receiver=<optimized out>) at ../../src/corelib/kernel/qcoreapplication.h:231
#29 0x00007f7b3556cceb in QTimerInfoList::activateTimers() (this=0x55da0b2d5b50) at kernel/qtimerinfo_unix.cpp:644
#30 0x00007f7b3556d241 in timerSourceDispatch(GSource*, GSourceFunc, gpointer) (source=<optimized out>) at kernel/qeventdispatcher_glib.cpp:182
#31 0x00007f7b2d2d5e52 in g_main_dispatch (context=0x7f7b180016f0) at gmain.c:3203
#32 0x00007f7b2d2d5e52 in g_main_context_dispatch (context=context@entry=0x7f7b180016f0) at gmain.c:3856
#33 0x00007f7b2d2d61d0 in g_main_context_iterate (context=context@entry=0x7f7b180016f0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3929
#34 0x00007f7b2d2d627c in g_main_context_iteration (context=0x7f7b180016f0, may_block=may_block@entry=1) at gmain.c:3990
#35 0x00007f7b3556d6cf in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x55da0b2f2030, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#36 0x00007f7b3551e68a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7ffe30eb6150, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#37 0x00007f7b3552618c in QCoreApplication::exec() () at kernel/qcoreapplication.cpp:1261
#38 0x000055da0ae9f752 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/plasma-workspace-5.8.6/shell/main.cpp:166
Comment 8 Marco Martin 2017-05-22 15:43:37 UTC
Git commit d602198f6807bbfa175b6aaaa1bdf1708fce703e by Marco Martin.
Committed on 22/05/2017 at 15:39.
Pushed by mart into branch 'Plasma/5.10'.

don't check for panel visible during startup

if any kscreen related activities occurred
during startup, the panel wouldn't be visible
yet, and this would assert. This often happens
when a screen gets disabled at startup

M  +1    -0    shell/panelview.cpp
M  +5    -1    shell/shellcorona.cpp

https://commits.kde.org/plasma-workspace/d602198f6807bbfa175b6aaaa1bdf1708fce703e
Comment 9 Marco Martin 2017-05-22 15:43:38 UTC
Git commit 6602e991617cf857c262ac3fbb2ac00c7de1fb15 by Marco Martin.
Committed on 22/05/2017 at 15:43.
Pushed by mart into branch 'master'.

don't check for panel visible during startup

if any kscreen related activities occurred
during startup, the panel wouldn't be visible
yet, and this would assert. This often happens
when a screen gets disabled at startup

M  +1    -0    shell/panelview.cpp
M  +5    -1    shell/shellcorona.cpp

https://commits.kde.org/plasma-workspace/6602e991617cf857c262ac3fbb2ac00c7de1fb15
Comment 10 Marco Martin 2017-05-22 15:44:41 UTC
this commit may have helped, but with a different crash, still can't reproduce locally that exact backtrace
Comment 11 Chris Rizzitello 2019-10-28 11:38:27 UTC
I have a similar Issue with 
Qt: 5.12.4
KF5: 5.62.0
Kubuntu: 19.10
Xorg
It does not crash but i get a black screen w/ only a kicker on it. I have to run kwin_x11 --replace then my desktop comes up by its shifted to the far right of my screen i can only see 1/4 of it. Changing the settings in the display config does not help. I have to use the laptops hot keys to switch to unified display then back to external only.
Comment 12 Justin Zobel 2020-12-06 21:19:58 UTC
Thank you for the report.

As this was reported on an older version of plasmashell, can you please test on a recent and confirm if this issue is still occurring or if this bug report can be marked as resolved.

I have set the bug status to "needsinfo" pending your response, please change back to "reported" or "resolved/worksforme" when you respond, thank you.
Comment 13 Chris Rizzitello 2020-12-07 14:28:08 UTC
This is no longer happening for me 

PlasmaShell: 5.18.5
KDE Frameworks: 5.58.0
Qt: 5.12.8
Kubuntu: 20.04
Comment 14 Justin Zobel 2020-12-08 00:22:01 UTC
I'll leave as waiting info so the OP can confirm.
Comment 15 Szymon Janc 2020-12-08 07:48:59 UTC
I can confirm that this is no longer the case