Bug 436180

Summary: Plasma crashed during keyboard layout switching
Product: [Plasma] plasmashell Reporter: Eugene <ken20001>
Component: Keyboard LayoutAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: crash CC: butirsky, kishore96, materka, nate, plasma-bugs
Priority: NOR Keywords: drkonqi
Version: 5.21.4   
Target Milestone: 1.0   
Platform: Ubuntu   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=435991
Latest Commit: Version Fixed In: 5.22

Description Eugene 2021-04-25 18:26:07 UTC
Application: plasmashell (5.21.4)

Qt Version: 5.15.2
Frameworks Version: 5.81.0
Operating System: Linux 5.11.0-16-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 just switched keyboard layout several times when crash happened.

The crash does not seem to be reproducible.

-- Backtrace:
Application: Плазма (plasmashell), signal: Aborted

[KCrash Handler]
#4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49
#5  0x00007f2dd70f7864 in __GI_abort () at abort.c:79
#6  0x00007f2dd715a736 in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7f2dd727f953 "*** %s ***: terminated\n") at ../sysdeps/posix/libc_fatal.c:155
#7  0x00007f2dd71f93fa in __GI___fortify_fail (msg=msg@entry=0x7f2dd727f93b "stack smashing detected") at fortify_fail.c:26
#8  0x00007f2dd71f93c6 in __stack_chk_fail () at stack_chk_fail.c:24
#9  0x00007f2dc832d209 in ?? () from /lib/x86_64-linux-gnu/libKF5ItemModels.so.5
#10 0x00007f2dd77c6b44 in doActivate<false> (sender=0x55d5ba06c950, signal_index=3, argv=argv@entry=0x7fffeec8ac90) at kernel/qobject.cpp:3898
#11 0x00007f2dd77bfcb8 in QMetaObject::activate (sender=sender@entry=0x55d5ba06c950, m=m@entry=0x7f2dd7a27640 <QAbstractItemModel::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fffeec8ac90) at kernel/qobject.cpp:3946
#12 0x00007f2dd7728459 in QAbstractItemModel::dataChanged (this=this@entry=0x55d5ba06c950, _t1=..., _t2=..., _t3=...) at .moc/moc_qabstractitemmodel.cpp:557
#13 0x00007f2dc8301ee8 in StatusNotifierModel::dataUpdated (this=0x55d5ba06c950, sourceName=..., data=...) at ./applets/systemtray/systemtraymodel.cpp:442
#14 0x00007f2dd77c6b44 in doActivate<false> (sender=0x55d5b9feacc0, signal_index=3, argv=0x7fffeec8ae70) at kernel/qobject.cpp:3898
#15 0x00007f2dd962461b in Plasma::DataContainer::dataUpdated(QString const&, QMap<QString, QVariant> const&) () from /lib/x86_64-linux-gnu/libKF5Plasma.so.5
#16 0x00007f2dd9624f40 in Plasma::DataContainer::checkForUpdate() () from /lib/x86_64-linux-gnu/libKF5Plasma.so.5
#17 0x00007f2d8c12d3af in StatusNotifierItemSource::refreshCallback (this=<optimized out>, call=<optimized out>) at ./dataengines/statusnotifieritem/statusnotifieritemsource.cpp:382
#18 0x00007f2dd77c6b0e in QtPrivate::QSlotObjectBase::call (a=0x7fffeec8b0f0, r=0x55d5b9feacc0, this=0x7f2dcc02a440) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#19 doActivate<false> (sender=0x55d5bbd0c0f0, signal_index=3, argv=0x7fffeec8b0f0) at kernel/qobject.cpp:3886
#20 0x00007f2dd81676f3 in QDBusPendingCallWatcher::finished(QDBusPendingCallWatcher*) () from /lib/x86_64-linux-gnu/libQt5DBus.so.5
#21 0x00007f2dd77bc2a1 in QObject::event (this=0x55d5bbd0c0f0, e=0x7f2dc4069c40) at kernel/qobject.cpp:1314
#22 0x00007f2dd8453173 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x55d5bbd0c0f0, e=0x7f2dc4069c40) at kernel/qapplication.cpp:3632
#23 0x00007f2dd778f22a in QCoreApplication::notifyInternal2 (receiver=0x55d5bbd0c0f0, event=0x7f2dc4069c40) at kernel/qcoreapplication.cpp:1063
#24 0x00007f2dd7791d01 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x55d5b8cae320) at kernel/qcoreapplication.cpp:1817
#25 0x00007f2dd77e8f37 in postEventSourceDispatch (s=0x55d5b8d93440) at kernel/qeventdispatcher_glib.cpp:277
#26 0x00007f2dd5b5d84b in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#27 0x00007f2dd5bb0c68 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#28 0x00007f2dd5b5af83 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#29 0x00007f2dd77e8594 in QEventDispatcherGlib::processEvents (this=0x55d5b8d9d150, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#30 0x00007f2dd778db8b in QEventLoop::exec (this=this@entry=0x7fffeec8b4c0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#31 0x00007f2dd7796024 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#32 0x000055d5b899ae5e in main (argc=<optimized out>, argv=0x7fffeec8b630) at ./shell/main.cpp:251
[Inferior 1 (process 1394) detached]

Possible duplicates by query: bug 436129, bug 436072, bug 436021, bug 435760, bug 435008.

Reported using DrKonqi
Comment 1 Eugene 2021-04-25 18:30:21 UTC
Recently checked: it crashes again and again. Just need to switch layouts again and again several times. I am using three layouts (English, Russian, Ukrainian).
Comment 2 Nate Graham 2021-04-27 18:05:24 UTC
> #7  0x00007f2dd71f93fa in __GI___fortify_fail (msg=msg@entry=0x7f2dd727f93b "stack smashing detected") at fortify_fail.c:26
LOL is this a backtrace or a message about an ongoing battle? :D
Comment 3 Andrey 2021-04-27 18:28:35 UTC
How do you switching the layout - using old SNI widget in systray, using "main" shortcut set in Keyboard KCM, "additional" shortcut there, or using the shortcut specific for that particular layout?
Does it also happens with disabled keyboard layout indicator in the Keyboard KCM?
Could you also try to reproduce on Wayland session?
Comment 4 Eugene 2021-04-27 22:50:53 UTC
I am sorry but I am not able to reproduce it currently.
Comment 5 Eugene 2021-04-27 22:52:16 UTC
(In reply to Andrey from comment #3)
> How do you switching the layout - using old SNI widget in systray, using
> "main" shortcut set in Keyboard KCM, "additional" shortcut there, or using
> the shortcut specific for that particular layout?
> Does it also happens with disabled keyboard layout indicator in the Keyboard
> KCM?
> Could you also try to reproduce on Wayland session?

My layout is usually changing through Alt+Shift hotkey.
Comment 6 Konrad Materka 2021-04-28 21:38:20 UTC
can you install additional debug symbols?
sudo apt install libkf5itemmodels5-dbgsym

You crash report is missing line number:
#9  0x00007f2dc832d209 in ?? () from /lib/x86_64-linux-gnu/libKF5ItemModels.so.5
Comment 7 Konrad Materka 2021-04-28 21:58:20 UTC
crash is probably somewher in KConcatenateRowsProxyModelPrivate::slotDataChanged but without better stack trace I'm not sure where (and why).

Eugene, please try to reproduce this crash with debug symbols installed. Please follow these instructions:
https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports#Ubuntu-based_distros_.28Ubuntu.2C_Kubuntu.2C_KDE_Neon.2C_Linux_Mint.29
Comment 8 Eugene 2021-04-30 02:22:23 UTC
(In reply to Konrad Materka from comment #6)
> can you install additional debug symbols?
> sudo apt install libkf5itemmodels5-dbgsym
> 
> You crash report is missing line number:
> #9  0x00007f2dc832d209 in ?? () from
> /lib/x86_64-linux-gnu/libKF5ItemModels.so.5

Unfortunately I am not able to reproduce this crash. I tried several times.
Comment 9 Andrey 2021-04-30 10:34:14 UTC
Still, please install the debug symbols.
With that, you should be able to repost backtraces from previous crashes using coredumpctl.
Comment 10 Konrad Materka 2021-05-01 19:48:37 UTC
Git commit 26f369ad7a23fb51d685438c51fec97654ca63e6 by Konrad Materka.
Committed on 01/05/2021 at 19:41.
Pushed by kmaterka into branch 'master'.

[dataengine] Emit sourceRemoved earlier

Emit `sourceRemoved` before source is actually removed, so that
visualization has a chance to disconnect itself.
Related: bug 436350, bug 435991

M  +2    -2    src/plasma/dataengine.cpp

https://invent.kde.org/frameworks/plasma-framework/commit/26f369ad7a23fb51d685438c51fec97654ca63e6
Comment 11 Konrad Materka 2021-05-05 20:28:25 UTC
Git commit 5984d4960fa5ecf60a20b1fbc782fb841faa4af7 by Konrad Materka.
Committed on 04/05/2021 at 07:14.
Pushed by kmaterka into branch 'master'.

[dataengine] Emit sourceRemoved earlier

Emit `sourceRemoved` before source is actually removed, so that
visualization has a chance to disconnect itself.
Related: bug 436350, bug 435991

M  +2    -2    src/plasma/dataengine.cpp

https://invent.kde.org/frameworks/plasma-framework/commit/5984d4960fa5ecf60a20b1fbc782fb841faa4af7