Bug 375750 - Plasma crashes when docking/undocking the laptop
Summary: Plasma crashes when docking/undocking the laptop
Status: RESOLVED DUPLICATE of bug 373885
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (show other bugs)
Version: 5.8.5
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: 1.0
Assignee: David Edmundson
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2017-01-30 12:51 UTC by CK
Modified: 2021-03-08 22:02 UTC (History)
6 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description CK 2017-01-30 12:51:01 UTC
Application: plasmashell (5.8.5)

Qt Version: 5.7.1
Frameworks Version: 5.29.0
Operating System: Linux 4.9.5-200.fc25.x86_64 x86_64
Distribution (Platform): Fedora RPMs

-- Information about the crash:
I have 2 FullHD screens attached when docked on HP ElitBook 8460p

The crash can be reproduced sometimes.

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

Thread 8 (Thread 0x7f0b92da9700 (LWP 4545)):
#0  0x00007f0c545a6814 in g_mutex_unlock () at /lib64/libglib-2.0.so.0
#1  0x00007f0c5456068c in g_main_context_prepare () at /lib64/libglib-2.0.so.0
#2  0x00007f0c5456107b in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#3  0x00007f0c5456126c in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#4  0x00007f0c5c5ca73b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#5  0x00007f0c5c57b73a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#6  0x00007f0c5c3d85f3 in QThread::exec() () at /lib64/libQt5Core.so.5
#7  0x00007f0b946792c7 in KCupsConnection::run() () at /lib64/libkcupslib.so
#8  0x00007f0c5c3dc9da in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
#9  0x00007f0c5ab196ca in start_thread () at /lib64/libpthread.so.0
#10 0x00007f0c5b7cff7f in clone () at /lib64/libc.so.6

Thread 7 (Thread 0x7f0ba62d2700 (LWP 4521)):
#0  0x00007f0c5b7bfbed in read () at /lib64/libc.so.6
#1  0x00007f0c545a5450 in g_wakeup_acknowledge () at /lib64/libglib-2.0.so.0
#2  0x00007f0c54560c60 in g_main_context_check () at /lib64/libglib-2.0.so.0
#3  0x00007f0c545610f4 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#4  0x00007f0c5456126c in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#5  0x00007f0c5c5ca73b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#6  0x00007f0c5c57b73a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#7  0x00007f0c5c3d85f3 in QThread::exec() () at /lib64/libQt5Core.so.5
#8  0x00007f0c5ffd28b6 in QQuickPixmapReader::run() () at /lib64/libQt5Quick.so.5
#9  0x00007f0c5c3dc9da in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
#10 0x00007f0c5ab196ca in start_thread () at /lib64/libpthread.so.0
#11 0x00007f0c5b7cff7f in clone () at /lib64/libc.so.6

Thread 6 (Thread 0x7f0c38ceb700 (LWP 4477)):
#0  0x00007f0c5ab1f460 in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0
#1  0x00007f0c61e842f4 in QTWTF::TCMalloc_PageHeap::scavengerThread() () at /lib64/libQt5Script.so.5
#2  0x00007f0c61e84339 in  () at /lib64/libQt5Script.so.5
#3  0x00007f0c5ab196ca in start_thread () at /lib64/libpthread.so.0
#4  0x00007f0c5b7cff7f in clone () at /lib64/libc.so.6

Thread 5 (Thread 0x7f0c3ab81700 (LWP 4266)):
#0  0x00007f0c545a6814 in g_mutex_unlock () at /lib64/libglib-2.0.so.0
#1  0x00007f0c5456068c in g_main_context_prepare () at /lib64/libglib-2.0.so.0
#2  0x00007f0c5456107b in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#3  0x00007f0c5456126c in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#4  0x00007f0c5c5ca73b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#5  0x00007f0c5c57b73a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#6  0x00007f0c5c3d85f3 in QThread::exec() () at /lib64/libQt5Core.so.5
#7  0x00007f0c5f6494e5 in QQmlThreadPrivate::run() () at /lib64/libQt5Qml.so.5
#8  0x00007f0c5c3dc9da in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
#9  0x00007f0c5ab196ca in start_thread () at /lib64/libpthread.so.0
#10 0x00007f0c5b7cff7f in clone () at /lib64/libc.so.6

Thread 4 (Thread 0x7f0c3bfff700 (LWP 3976)):
#0  0x00007f0c545a6814 in g_mutex_unlock () at /lib64/libglib-2.0.so.0
#1  0x00007f0c54560d1b in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#2  0x00007f0c545611c0 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#3  0x00007f0c5456126c in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#4  0x00007f0c5c5ca73b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#5  0x00007f0c5c57b73a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#6  0x00007f0c5c3d85f3 in QThread::exec() () at /lib64/libQt5Core.so.5
#7  0x00007f0c5f6494e5 in QQmlThreadPrivate::run() () at /lib64/libQt5Qml.so.5
#8  0x00007f0c5c3dc9da in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
#9  0x00007f0c5ab196ca in start_thread () at /lib64/libpthread.so.0
#10 0x00007f0c5b7cff7f in clone () at /lib64/libc.so.6

Thread 3 (Thread 0x7f0c41ead700 (LWP 3958)):
#0  0x00007f0c545a67f9 in g_mutex_lock () at /lib64/libglib-2.0.so.0
#1  0x00007f0c5456113b in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#2  0x00007f0c5456126c in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#3  0x00007f0c5c5ca73b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#4  0x00007f0c5c57b73a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#5  0x00007f0c5c3d85f3 in QThread::exec() () at /lib64/libQt5Core.so.5
#6  0x00007f0c5cc78739 in QDBusConnectionManager::run() () at /lib64/libQt5DBus.so.5
#7  0x00007f0c5c3dc9da in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
#8  0x00007f0c5ab196ca in start_thread () at /lib64/libpthread.so.0
#9  0x00007f0c5b7cff7f in clone () at /lib64/libc.so.6

Thread 2 (Thread 0x7f0c4349c700 (LWP 3953)):
#0  0x00007f0c5b7c401d in poll () at /lib64/libc.so.6
#1  0x00007f0c6078fd10 in _xcb_conn_wait () at /lib64/libxcb.so.1
#2  0x00007f0c60791aa9 in xcb_wait_for_event () at /lib64/libxcb.so.1
#3  0x00007f0c46cf1d69 in QXcbEventReader::run() () at /lib64/libQt5XcbQpa.so.5
#4  0x00007f0c5c3dc9da in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
#5  0x00007f0c5ab196ca in start_thread () at /lib64/libpthread.so.0
#6  0x00007f0c5b7cff7f in clone () at /lib64/libc.so.6

Thread 1 (Thread 0x7f0c4d98a940 (LWP 3874)):
[KCrash Handler]
#6  0x00007f0c604fe234 in Plasma::Applet::destroyed() const () at /lib64/libKF5Plasma.so.5
#7  0x0000559d303e7400 in ShellCorona::createContainmentForActivity(QString const&, int) ()
#8  0x0000559d303e7764 in ShellCorona::addOutput(QScreen*) ()
#9  0x00007f0c5c5a3ae6 in QMetaObject::activate(QObject*, int, int, void**) () at /lib64/libQt5Core.so.5
#10 0x00007f0c5c8a9672 in QGuiApplication::screenAdded(QScreen*) () at /lib64/libQt5Gui.so.5
#11 0x00007f0c46cf199d in QXcbConnection::createScreen(QXcbVirtualDesktop*, xcb_randr_output_change_t const&, xcb_randr_get_output_info_reply_t*) () at /lib64/libQt5XcbQpa.so.5
#12 0x00007f0c46cf3447 in QXcbConnection::updateScreens(xcb_randr_notify_event_t const*) () at /lib64/libQt5XcbQpa.so.5
#13 0x00007f0c46cf3da3 in QXcbConnection::handleXcbEvent(xcb_generic_event_t*) () at /lib64/libQt5XcbQpa.so.5
#14 0x00007f0c46cf4225 in QXcbConnection::processXcbEvents() () at /lib64/libQt5XcbQpa.so.5
#15 0x00007f0c5c5a4879 in QObject::event(QEvent*) () at /lib64/libQt5Core.so.5
#16 0x00007f0c5ce48ecc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib64/libQt5Widgets.so.5
#17 0x00007f0c5ce50671 in QApplication::notify(QObject*, QEvent*) () at /lib64/libQt5Widgets.so.5
#18 0x00007f0c5c57c7aa in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib64/libQt5Core.so.5
#19 0x00007f0c5c57ee90 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /lib64/libQt5Core.so.5
#20 0x00007f0c5c5ca6a3 in postEventSourceDispatch(_GSource*, int (*)(void*), void*) () at /lib64/libQt5Core.so.5
#21 0x00007f0c54560e42 in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#22 0x00007f0c545611c0 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#23 0x00007f0c5456126c in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#24 0x00007f0c5c5ca71f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#25 0x00007f0c5c57b73a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#26 0x00007f0c5c58323c in QCoreApplication::exec() () at /lib64/libQt5Core.so.5
#27 0x0000559d303c5452 in main ()

Reported using DrKonqi
Comment 1 Kai Uwe Broulik 2017-02-01 15:53:58 UTC
Seems m_desktopContainments contains a junk/a deleted containment, offending code:

if (m_desktopContainments.contains(activity)) {
    for (Plasma::Containment *cont : m_desktopContainments.value(activity)) {
        if (!cont->destroyed() && cont->screen() == screenNum && cont->activity() == activity) {
            return cont;
        }
    }
}
Comment 2 Marco Martin 2017-03-17 14:30:13 UTC
(In reply to Kai Uwe Broulik from comment #1)
> Seems m_desktopContainments contains a junk/a deleted containment, offending
> code:

hmm, weird, in theory desktop containments should never be deleted when a screen gets removed, the containment* should stay there.
the only moment they should be deleted should be activity removal, which there obviously isn't the case as it was iterating trough containments of current activity
Comment 3 Justin Zobel 2020-11-19 04:40:30 UTC
Marco/Kai is this code still present in 5.20.2?
Comment 4 Nate Graham 2021-01-26 23:10:46 UTC
Still present; we are still getting duplicates (incoming).
Comment 5 Nate Graham 2021-01-26 23:11:35 UTC
Forward-duping to Bug 431726 since that one has debug symbols.

*** This bug has been marked as a duplicate of bug 431726 ***
Comment 6 Nate Graham 2021-01-26 23:15:49 UTC

*** This bug has been marked as a duplicate of bug 421895 ***
Comment 7 Nate Graham 2021-03-08 22:02:17 UTC

*** This bug has been marked as a duplicate of bug 373885 ***