Bug 443075 - Kwin crashes when alt-tabbing - Manifested after plasmashell, krunner, and kmserver-logout-greeter also crashed
Summary: Kwin crashes when alt-tabbing - Manifested after plasmashell, krunner, and km...
Status: RESOLVED DUPLICATE of bug 434422
Alias: None
Product: libplasma
Classification: Frameworks and Libraries
Component: libplasma (show other bugs)
Version: 5.80.0
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Marco Martin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-28 15:03 UTC by stuart.lopresti
Modified: 2023-12-13 10:49 UTC (History)
2 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 stuart.lopresti 2021-09-28 15:03:32 UTC
Application: kwin_x11 (5.21.4)

Qt Version: 5.15.2
Frameworks Version: 5.80.0
Operating System: Linux 5.11.0-37-generic x86_64
Windowing System: X11
Drkonqi Version: 5.21.4
Distribution: Ubuntu 21.04

-- Information about the crash:
- What I was doing when the application crashed:
I was attempting to alt-tab between windows when kwin would crash

- Unusual behavior I noticed:
This seems to be part of a larger issue. When attempting to use VLC, plasmashell would crash. I neglected filing a bug report since I didn't want to install all the necessary debug symbol packages, and I could simply restart plasmashell with krunner. Then, after a software update, plasmashell began crashing again, and krunner would crash immediately without displaying the text prompt so that no commands could be entered. Attempting to ctrl-alt-del and logout or reboot the system, I found that kmserver-logout-greeter would also crash, and the crash handler for it and krunner would close before I could attempt to generate a backtrace and report the issue. Logging into another TTY with ctrl-alt-F4 and rebooting from the command line, I find that plasmashell now crashes on startup. Thankfully, my desktop session starts with several open windows, and the crash handler for kwin has allowed me to generate this bug report, though I've had to submit it manually.

The crash can be reproduced every time.

-- Backtrace:
Application: KWin (kwin_x11), signal: Bus error
Content of s_kcrashErrorMessage: [Current thread is 1 (LWP 5681)]
[KCrash Handler]
#6  __strncmp_avx2 () at ../sysdeps/x86_64/multiarch/strcmp-avx2.S:101
#7  0x00007f1604cec08d in qstrncmp (len=<optimized out>, str2=<optimized out>, str1=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qbytearray.h:97
#8  SharedMemory::findNamedEntry (this=0x7f15bdfe5000, key=...) at ./src/lib/caching/kshareddatacache.cpp:767
#9  0x00007f1604ce9db5 in KSharedDataCache::find (this=this@entry=0x55fba4bdcef0, key=..., destination=destination@entry=0x7fff4839d5c8) at ./src/lib/caching/kshareddatacache.cpp:1557
#10 0x00007f1603022e19 in KSharedPixmapCacheMixin<KSharedDataCache>::findPixmap (destination=0x7fff4839d5d0, key=..., this=0x55fba4bdcee0) at /usr/include/KF5/KGuiAddons/kimagecache.h:138
#11 Plasma::Theme::findInCache (this=this@entry=0x55fba4ae7a10, key=..., pix=..., lastModified=lastModified@entry=1616065857) at ./src/plasma/theme.cpp:306
#12 0x00007f1603013f40 in Plasma::FrameSvgPrivate::generateBackground (this=this@entry=0x55fba4ae7810, frame=...) at ./src/plasma/framesvg.cpp:499
#13 0x00007f1603014d5a in Plasma::FrameSvgPrivate::generateBackground (frame=..., this=0x55fba4ae7810) at ./src/plasma/framesvg.cpp:454
#14 Plasma::FrameSvgPrivate::alphaMask (this=0x55fba4ae7810) at ./src/plasma/framesvg.cpp:454
#15 0x00007f1603014fdc in Plasma::FrameSvg::mask (this=0x55fba4a84bf0) at ./src/plasma/framesvg.cpp:340
#16 0x00007f15c423f766 in Plasma::FrameSvgItem::mask (this=<optimized out>) at ./src/declarativeimports/core/framesvgitem.cpp:484
#17 0x00007f15c422aa16 in PlasmaQuick::DialogPrivate::updateTheme (this=this@entry=0x55fba4ae9560) at ./src/plasmaquick/dialog.cpp:241
#18 0x00007f15c422b8ea in PlasmaQuick::DialogPrivate::syncToMainItemSize (this=this@entry=0x55fba4ae9560) at ./src/plasmaquick/dialog.cpp:647
#19 0x00007f15c422bc89 in PlasmaQuick::DialogPrivate::updateVisibility (this=0x55fba4ae9560, visible=visible@entry=true) at ./src/plasmaquick/dialog.cpp:292
#20 0x00007f15c422d8a2 in PlasmaQuick::Dialog::event (this=0x55fba48a5760, event=0x7fff4839dc40) at ./src/plasmaquick/dialog.cpp:1242
#21 0x00007f16046d8783 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x55fba48a5760, e=0x7fff4839dc40) at kernel/qapplication.cpp:3632
#22 0x00007f1603b287ba in QCoreApplication::notifyInternal2 (receiver=0x55fba48a5760, event=0x7fff4839dc40) at kernel/qcoreapplication.cpp:1063
#23 0x00007f1603fd9a93 in QWindowPrivate::setVisible (this=0x55fba495e490, visible=<optimized out>) at kernel/qwindow.cpp:384
#24 0x00007f1602422a9f in QQmlPropertyData::writeProperty (flags=..., value=0x7fff4839dc9f, target=<optimized out>, this=<optimized out>) at ../../include/QtQml/5.15.2/QtQml/private/../../../../../src/qml/qml/qqmlpropertydata_p.h:375
#25 GenericBinding<1>::doStore<bool> (flags=..., pd=<optimized out>, value=<optimized out>, this=<optimized out>) at qml/qqmlbinding.cpp:342
#26 GenericBinding<1>::write (this=0x55fba4a5b4d0, result=..., isUndefined=<optimized out>, flags=...) at qml/qqmlbinding.cpp:305
#27 0x00007f1602423513 in QQmlNonbindingBinding::doUpdate (this=0x55fba4a5b4d0, watcher=..., flags=..., scope=...) at qml/qqmlbinding.cpp:258
#28 0x00007f1602421154 in QQmlBinding::update (this=0x55fba4a5b4d0, flags=...) at qml/qqmlbinding.cpp:194
#29 0x00007f16023fdb8d in QQmlNotifier::emitNotify (endpoint=<optimized out>, a=0x0) at qml/qqmlnotifier.cpp:104
#30 0x00007f1603b60121 in doActivate<false> (sender=0x55fba48a2b10, signal_index=3, argv=argv@entry=0x0) at kernel/qobject.cpp:3778
#31 0x00007f1603b59728 in QMetaObject::activate (sender=sender@entry=0x55fba48a2b10, m=<optimized out>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3946
#32 0x00007f160507698d in KWin::TabBox::SwitcherItem::visibleChanged (this=0x55fba48a2b10) at ./obj-x86_64-linux-gnu/kwin_autogen/WF44ZIICEP/moc_switcheritem.cpp:278
#33 KWin::TabBox::SwitcherItem::setVisible (visible=true, this=0x55fba48a2b10) at ./tabbox/switcheritem.cpp:65
#34 KWin::TabBox::TabBoxHandlerPrivate::show (this=0x55fba47de310) at ./tabbox/tabboxhandler.cpp:329
#35 KWin::TabBox::TabBoxHandler::show (this=0x55fba47e1390) at ./tabbox/tabboxhandler.cpp:373
#36 KWin::TabBox::TabBox::show (this=<optimized out>) at ./tabbox/tabbox.cpp:704
#37 KWin::TabBox::TabBox::show (this=<optimized out>) at ./tabbox/tabbox.cpp:694
#38 0x00007f1603b605c7 in QtPrivate::QSlotObjectBase::call (a=0x7fff4839f950, r=0x55fba47c2270, this=0x55fba47e4e40) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#39 doActivate<false> (sender=0x55fba47c2298, signal_index=3, argv=argv@entry=0x7fff4839f950) at kernel/qobject.cpp:3886
#40 0x00007f1603b59728 in QMetaObject::activate (sender=<optimized out>, m=m@entry=0x7f1603dc42a0 <QTimer::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fff4839f950) at kernel/qobject.cpp:3946
#41 0x00007f1603b6472e in QTimer::timeout (this=<optimized out>, _t1=...) at .moc/moc_qtimer.cpp:205
#42 0x00007f1603b5602f in QObject::event (this=0x55fba47c2298, e=0x7fff4839fac0) at kernel/qobject.cpp:1336
#43 0x00007f16046d8783 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x55fba47c2298, e=0x7fff4839fac0) at kernel/qapplication.cpp:3632
#44 0x00007f1603b287ba in QCoreApplication::notifyInternal2 (receiver=0x55fba47c2298, event=0x7fff4839fac0) at kernel/qcoreapplication.cpp:1063
#45 0x00007f1603b81533 in QTimerInfoList::activateTimers (this=this@entry=0x55fba44eb118) at kernel/qtimerinfo_unix.cpp:643
#46 0x00007f1603b7ec40 in QEventDispatcherUNIXPrivate::activateTimers (this=this@entry=0x55fba44eb090) at kernel/qeventdispatcher_unix.cpp:249
#47 0x00007f1603b7f997 in QEventDispatcherUNIX::processEvents (this=<optimized out>, flags=...) at kernel/qeventdispatcher_unix.cpp:516
#48 0x00007f15fd735e42 in QXcbUnixEventDispatcher::processEvents (this=0x55fba45c3d00, flags=...) at qxcbeventdispatcher.cpp:60
#49 0x00007f1603b2711b in QEventLoop::exec (this=this@entry=0x7fff4839fc60, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#50 0x00007f1603b2f604 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#51 0x00007f1603fc1520 in QGuiApplication::exec () at kernel/qguiapplication.cpp:1867
#52 0x00007f16046d86f9 in QApplication::exec () at kernel/qapplication.cpp:2824
#53 0x000055fba3363b8f in main (argc=<optimized out>, argv=0x7fff4839fee8) at ./main_x11.cpp:491
[Inferior 1 (process 5681) detached]

Possible duplicates by query: bug 399080, bug 340657, bug 339285, bug 317595, bug 311920.

Report to https://bugs.kde.org/
Comment 1 stuart.lopresti 2021-09-28 15:19:49 UTC
Based on similar problems reported in the KDE support forum circa 2015, I renamed my ~/.cache folder, rebooted, and the issue was fixed.
Comment 2 Nate Graham 2021-09-28 20:28:02 UTC
It looks like somehow bad Plasma SVGs are able to crash KWin with invalid memory...?
Comment 3 Vlad Zahorodnii 2021-09-30 11:14:48 UTC
Yeah, looks like a bug in FrameSVG.
Comment 4 Vlad Zahorodnii 2023-12-13 10:49:25 UTC
*** This bug has been marked as a duplicate of bug 434422 ***