Bug 441325 - Locking screen causes kwin_wayland to crash in KWin::EffectsHandlerImpl::ungrabKeyboard()
Summary: Locking screen causes kwin_wayland to crash in KWin::EffectsHandlerImpl::ungr...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: effects-overview (show other bugs)
Version: git master
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: wayland-only
Depends on:
Blocks:
 
Reported: 2021-08-21 23:13 UTC by Kyle Devir
Modified: 2021-08-24 20:13 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 Kyle Devir 2021-08-21 23:13:50 UTC
SUMMARY


STEPS TO REPRODUCE
1. Update kdesrc-build modules to latest master
2. Restart kwin_wayland
3. Try to lock screen via application launcher

OBSERVED RESULT
kwin_wayland briefly visually glitches and then crashes a quarter or so of a second later

EXPECTED RESULT
Lock screen should lock normally

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.22.80
KDE Frameworks Version: 5.86.0
Qt Version: 5.15.2
Kernel Version: 5.13.4-arch1-1-custom-cacule (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 5600X 6-Core Processor
Memory: 15.6 GiB of RAM
Graphics Processor: Radeon RX 580 Series
Comment 1 Kyle Devir 2021-08-21 23:16:38 UTC
kwin_wayland crash coredump

https://mega.nz/file/iMcQQbbT#gwzYDyxic2alpG-nmGb1A1LZS9Be67Nta5ebsAJ-hSU

Exported via coredumpctl
Comment 2 Nate Graham 2021-08-23 19:25:16 UTC
Can you please attach a backtrace of the crash? The whole core is not needed, just get a backtrace from that core. See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports#Retrieving_a_backtrace_using_coredumpctl
Comment 3 Kyle Devir 2021-08-24 10:15:39 UTC
Oops. Sorry.

Here's the backtrace:

https://invent.kde.org/-/snippets/1813
Comment 4 Nate Graham 2021-08-24 15:09:59 UTC
Thanks! Pasting inline:

#0  0x00007f1d9f8aed22 in raise () at /usr/lib/libc.so.6
#1  0x00007f1d9f89890e in abort () at /usr/lib/libc.so.6
#2  0x00007f1da01a9910 in  () at /usr/lib/libQt5Core.so.5
#3  0x00007f1da01a8cf5 in qt_assert_x(char const*, char const*, char const*, int) () at /usr/lib/libQt5Core.so.5
#4  0x00007f1da35cd08d in KWin::EffectsHandlerImpl::ungrabKeyboard() (this=0x56069f3418d0) at /run/media/valmar/DataSSD/kde/sources/plasma/kwin/src/effects.cpp:651
#5  0x00007f1da32e1934 in KWin::OverviewEffect::realDeactivate() (this=0x56069f1ede10) at /run/media/valmar/DataSSD/kde/sources/plasma/kwin/src/effects/overview/overvieweffect.cpp:261
#6  0x00007f1da32e57d7 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (KWin::OverviewEffect::*)()>::call(void (KWin::OverviewEffect::*)(), KWin::OverviewEffect*, void**)
    (f=(void (KWin::OverviewEffect::*)(KWin::OverviewEffect * const)) 0x7f1da32e18c6 <KWin::OverviewEffect::realDeactivate()>, o=0x56069f1ede10, arg=0x7ffe51631960) at /usr/include/qt/QtCore/qobjectdefs_impl.h:152
#7  0x00007f1da32e537d in QtPrivate::FunctionPointer<void (KWin::OverviewEffect::*)()>::call<QtPrivate::List<>, void>(void (KWin::OverviewEffect::*)(), KWin::OverviewEffect*, void**)
    (f=(void (KWin::OverviewEffect::*)(KWin::OverviewEffect * const)) 0x7f1da32e18c6 <KWin::OverviewEffect::realDeactivate()>, o=0x56069f1ede10, arg=0x7ffe51631960) at /usr/include/qt/QtCore/qobjectdefs_impl.h:185
#8  0x00007f1da32e4e35 in QtPrivate::QSlotObject<void (KWin::OverviewEffect::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
    (which=1, this_=0x56069f217e90, r=0x56069f1ede10, a=0x7ffe51631960, ret=0x0) at /usr/include/qt/QtCore/qobjectdefs_impl.h:418
#9  0x00007f1da040975b in  () at /usr/lib/libQt5Core.so.5
#10 0x00007f1da320c315 in KWin::EffectsHandler::screenAboutToLock() (this=0x56069f3418d0) at /run/media/valmar/DataSSD/kde/builds/plasma/kwin/src/libkwineffects/kwineffects_autogen/EWIEGA46WW/moc_kwineffects.cpp:1871
#11 0x00007f1da35e41cd in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (KWin::EffectsHandler::*)()>::call(void (KWin::EffectsHandler::*)(), KWin::EffectsHandler*, void**)
    (f=(void (KWin::EffectsHandler::*)(KWin::EffectsHandler * const)) 0x7f1da320c2ec <KWin::EffectsHandler::screenAboutToLock()>, o=0x56069f3418d0, arg=0x7ffe51631b10) at /usr/include/qt/QtCore/qobjectdefs_impl.h:152
#12 0x00007f1da35e3396 in QtPrivate::FunctionPointer<void (KWin::EffectsHandler::*)()>::call<QtPrivate::List<>, void>(void (KWin::EffectsHandler::*)(), KWin::EffectsHandler*, void**)
    (f=(void (KWin::EffectsHandler::*)(KWin::EffectsHandler * const)) 0x7f1da320c2ec <KWin::EffectsHandler::screenAboutToLock()>, o=0x56069f3418d0, arg=0x7ffe51631b10) at /usr/include/qt/QtCore/qobjectdefs_impl.h:185
#13 0x00007f1da35e0f25 in QtPrivate::QSlotObject<void (KWin::EffectsHandler::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
    (which=1, this_=0x56069f2e4790, r=0x56069f3418d0, a=0x7ffe51631b10, ret=0x0) at /usr/include/qt/QtCore/qobjectdefs_impl.h:418
#14 0x00007f1da040975b in  () at /usr/lib/libQt5Core.so.5
#15 0x00007f1da35132bf in KWin::ScreenLockerWatcher::aboutToLock() (this=0x56069e7ddfb0) at /run/media/valmar/DataSSD/kde/builds/plasma/kwin/src/kwin_autogen/EWIEGA46WW/moc_screenlockerwatcher.cpp:183
#16 0x00007f1da36b6e4c in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (KWin::ScreenLockerWatcher::*)()>::call(void (KWin::ScreenLockerWatcher::*)(), KWin::ScreenLockerWatcher*, void**)
    (f=(void (KWin::ScreenLockerWatcher::*)(KWin::ScreenLockerWatcher * const)) 0x7f1da3513296 <KWin::ScreenLockerWatcher::aboutToLock()>, o=0x56069e7ddfb0, arg=0x7ffe51631cc0) at /usr/include/qt/QtCore/qobjectdefs_impl.h:152
#17 0x00007f1da36b69c0 in QtPrivate::FunctionPointer<void (KWin::ScreenLockerWatcher::*)()>::call<QtPrivate::List<>, void>(void (KWin::ScreenLockerWatcher::*)(), KWin::ScreenLockerWatcher*, void**)
    (f=(void (KWin::ScreenLockerWatcher::*)(KWin::ScreenLockerWatcher * const)) 0x7f1da3513296 <KWin::ScreenLockerWatcher::aboutToLock()>, o=0x56069e7ddfb0, arg=0x7ffe51631cc0) at /usr/include/qt/QtCore/qobjectdefs_impl.h:185
#18 0x00007f1da36b6099 in QtPrivate::QSlotObject<void (KWin::ScreenLockerWatcher::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
    (which=1, this_=0x56069f1ffd70, r=0x56069e7ddfb0, a=0x7ffe51631cc0, ret=0x0) at /usr/include/qt/QtCore/qobjectdefs_impl.h:418
#19 0x00007f1da040975b in  () at /usr/lib/libQt5Core.so.5
#20 0x00007f1da37c8875 in OrgKdeScreensaverInterface::AboutToLock() (this=0x56069e70eee0) at /run/media/valmar/DataSSD/kde/builds/plasma/kwin/src/kscreenlocker_interface.moc:147
#21 0x00007f1da37c8619 in OrgKdeScreensaverInterface::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x56069e70eee0, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7ffe51631e70)
    at /run/media/valmar/DataSSD/kde/builds/plasma/kwin/src/kscreenlocker_interface.moc:85
#22 0x00007f1da37c8824 in OrgKdeScreensaverInterface::qt_metacall(QMetaObject::Call, int, void**) (this=0x56069e70eee0, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7ffe51631e70)
    at /run/media/valmar/DataSSD/kde/builds/plasma/kwin/src/kscreenlocker_interface.moc:134
#23 0x00007f1da3b44300 in  () at /usr/lib/libQt5DBus.so.5
#24 0x00007f1da03ff4ff in QObject::event(QEvent*) () at /usr/lib/libQt5Core.so.5
#25 0x00007f1da1301d62 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#26 0x00007f1da03d23aa in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#27 0x00007f1da03d54a9 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/libQt5Core.so.5
#28 0x00007f1da042847c in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#29 0x000056069dc0817e in QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
#30 0x00007f1da03d0d1c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#31 0x00007f1da03d9284 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
#32 0x000056069db8a2cb in main(int, char**) (argc=15, argv=0x7ffe51632d28) at /run/media/valmar/DataSSD/kde/sources/plasma/kwin/src/main_wayland.cpp:754



Did yo happen to have the Overview effect active at the time the screen locked?
Comment 5 Kyle Devir 2021-08-24 17:54:43 UTC
Yes, I did, and still do, actually.

I turned it on to test it out, and then kind of forgot about it.
Comment 6 Kyle Devir 2021-08-24 17:55:39 UTC
Just disabled the effect. And locking the screen results in no crash.
Comment 7 Bug Janitor Service 2021-08-24 19:46:56 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/1294
Comment 8 David Edmundson 2021-08-24 20:13:10 UTC
Git commit 2fb52274d09099855cf5d6e9f75cbe00b88fd3c8 by David Edmundson.
Committed on 24/08/2021 at 19:45.
Pushed by ngraham into branch 'master'.

Only try to deactivate overview whilst activate

M  +5    -1    src/effects/overview/overvieweffect.cpp

https://invent.kde.org/plasma/kwin/commit/2fb52274d09099855cf5d6e9f75cbe00b88fd3c8