Summary: | Plasma desktop completely crashes | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | Tobias Voigt <social> |
Component: | general | Assignee: | David Edmundson <kde> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | oded, plasma-bugs, social |
Priority: | NOR | Keywords: | drkonqi |
Version: | master | ||
Target Milestone: | 1.0 | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
New crash information added by DrKonqi
New crash information added by DrKonqi New crash information added by DrKonqi Defensive programming patch |
Description
Tobias Voigt
2020-02-29 09:59:16 UTC
Created attachment 126505 [details]
New crash information added by DrKonqi
plasmashell (5.17.5) using Qt 5.14.1
- What I was doing when the application crashed: starting my pc
- Unusual behavior I noticed:
In Addition to my previous report: The wallpaper as well as my desktop icons are not visible neither clickable
-- Backtrace (Reduced):
#6 0x00007fbcd9a22bc4 in PlasmaQuick::Dialog::isVisible() const () at /usr/lib/libKF5PlasmaQuick.so.5
#7 0x00007fbcd9a22bf0 in () at /usr/lib/libKF5PlasmaQuick.so.5
#8 0x00007fbcd9a251a8 in () at /usr/lib/libKF5PlasmaQuick.so.5
#9 0x00007fbcd7624540 in () at /usr/lib/libQt5Core.so.5
#10 0x00007fbcd79b9183 in QWindow::visibleChanged(bool) () at /usr/lib/libQt5Gui.so.5
Created attachment 126515 [details]
New crash information added by DrKonqi
plasmashell (5.18.2) using Qt 5.14.1
- What I was doing when the application crashed:
started my pc
- Unusual behavior I noticed:
taskbar was there for a second, crashed immediately after that with error message that plasma crashed
- Custom settings of the application:
Im using the manjaro testing branch now. Plasma 5.18.2 is the same example now
-- Backtrace (Reduced):
#6 0x00007ff290fc85f4 in QWindow::isVisible() const () at /usr/lib/libQt5Gui.so.5
#7 0x00007ff293095bf0 in () at /usr/lib/libKF5PlasmaQuick.so.5
#8 0x00007ff2930981a8 in () at /usr/lib/libKF5PlasmaQuick.so.5
#9 0x00007ff290c31540 in () at /usr/lib/libQt5Core.so.5
#10 0x00007ff290fc8183 in QWindow::visibleChanged(bool) () at /usr/lib/libQt5Gui.so.5
Created attachment 126601 [details]
New crash information added by DrKonqi
plasmashell (5.18.2) using Qt 5.12.5
Happened to me as well, with plasma 5.67.0+p20.04+git20200226.0207-0 from KCI stable. I was running KCI unstable (5.68) and then it started crashing, so I downgraded to KCI stable (using ppa-purge) and stable is also crashing with the same stack trace.
-- Backtrace (Reduced):
#6 0x00007f6b04d19b88 in PlasmaQuick::Dialog::isVisible() const (this=0x562810805f40) at ./src/plasmaquick/dialog.cpp:1428
#7 0x00007f6b04d19bc3 in PlasmaQuick::DialogPrivate::updateInputShape() (this=0x5628107e9b10) at ./src/plasmaquick/dialog.cpp:551
#8 0x00007f6b04d1bfac in PlasmaQuick::Dialog::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at ./obj-x86_64-linux-gnu/src/plasmaquick/KF5PlasmaQuick_autogen/include/moc_dialog.cpp:227
[...]
#10 0x00007f6b02df6216 in QWindow::visibleChanged(bool) () at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#11 0x00007f6b02dfd253 in QWindowPrivate::setVisible(bool) () at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
In case it wasn't very clear, the problem is that the plasmashell processes crashes and the entire desktop UX is gone. On my system (Kubuntu with KCI stable) there is some kind of auto-restart thing going on that tries to restart plasmashell 5 times, and sometimes it manages to run for maybe a minute before it crashes again with the same SIGSEGV in PlasmaQuick::Dialog::isVisible(). After a few restarts it gives up. This looks fixed by b6213cdd59cc6826b33a6f4d7ce77ae7787c5146 (feb 26th) Please update and reopen if it's still an issue with a new backtrace. Created attachment 126603 [details]
Defensive programming patch
This looks like some kind of "use after free":
1. PlasmaQuick::Dialog registers PlasmaQuick::DialogPrivate::updateInputShape() as the slot for QWindow::visibleChanged(bool).
2. QWindow d'tor calls QWindowPrivate::setVisible(false) (through QWindowPrivate::destroy()), which will in turn signal QWindow::visibleChanged(bool).
3. PlasmaQuick::DialogPrivate::updateInputShape() gets called after PlasmaQuick::Dialog had already run and released the DialogPrivate reference (and apparently zeroed it out?) and calls back into PlasmaQuick::Dialog::isVisible()
4. When isVisible() tries to access DialogPrivate back, the pointer is already zero and we get SIGSEGVED
The attached defensive patch works around the problem for me (a bit - I did get one crash after it, but I didn't get a stack trace - so it may not be the same).
This is obviously not the correct approach. Maybe unregister from the signals during d'tor?
>Maybe unregister from the signals during d'tor?
That's what b6213cdd59cc6826b33a6f4d7ce77ae7787c5146 does
> This looks fixed by b6213cdd59cc6826b33a6f4d7ce77ae7787c5146 (feb 26th)
>
> Please update and reopen if it's still an issue with a new backtrace.
Heh, just saw your comment :-)
Yea, as expected that fix indeed causes plasma to stop crashing.
|