Bug 435941 - Crash on sleep
Summary: Crash on sleep
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: git master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 428706 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-04-19 22:29 UTC by Aleix Pol
Modified: 2021-05-11 12:58 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.22


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aleix Pol 2021-04-19 22:29:08 UTC
I left my system to go make dinner with both a running session on tty3 and a valgrind debug session on tty4. Both of them crashed. I got slightly different backtraces on both, boiling down to a crash when deleting a GLTexture:
KWin::GLShader::~GLShader() (this=0x5560bcce0e30) at /home/apol/devel/frameworks/kwin/src/libkwineffects/kwinglutils.cpp:159

It all seems to happen when my displays go to sleep

Backtrace of my running system
#0  0x00007f35ae825ef5 in raise () at /usr/lib/libc.so.6
#1  0x00007f35ae80f912 in abort () at /usr/lib/libc.so.6
#2  0x00007f35ae80f747 in _nl_load_domain.cold () at /usr/lib/libc.so.6
#3  0x00007f35ae81e646 in  () at /usr/lib/libc.so.6
#4  0x00007f35aef83f28 in  () at /usr/lib/libepoxy.so.0
#5  0x00007f35aef3314a in  () at /usr/lib/libepoxy.so.0
#6  0x00007f35b1f18d7f in KWin::GLShader::~GLShader() (this=0x5560bcce0e30) at /home/apol/devel/frameworks/kwin/src/libkwineffects/kwinglutils.cpp:159
#7  0x00007f359b4dc987 in QScopedPointerDeleter<KWin::GLShader>::cleanup(KWin::GLShader*) (pointer=0x5560bcce0e30) at /home/apol/devel/kde5/include/QtCore/qscopedpointer.h:60
#8  0x00007f359b4dadd0 in QScopedPointer<KWin::GLShader, QScopedPointerDeleter<KWin::GLShader> >::~QScopedPointer() (this=0x5560bc04d3d8) at /home/apol/devel/kde5/include/QtCore/qscopedpointer.h:107
#9  0x00007f359b4d7dd0 in KWin::LanczosFilter::~LanczosFilter() (this=0x5560bc04d3b0) at /home/apol/devel/frameworks/kwin/src/plugins/scenes/opengl/lanczosfilter.cpp:51
#10 0x00007f359b4d7e1c in KWin::LanczosFilter::~LanczosFilter() (this=0x5560bc04d3b0) at /home/apol/devel/frameworks/kwin/src/plugins/scenes/opengl/lanczosfilter.cpp:48
#11 0x00007f359b4efff9 in KWin::SceneOpenGL2::performPaintWindow(KWin::EffectWindowImpl*, int, QRegion const&, KWin::WindowPaintData&)::$_10::operator()() const (this=0x5560bccc80c0) at /home/apol/devel/frameworks/kwin/src/plugins/scenes/opengl/scene_opengl.cpp:1094
#12 0x00007f359b4eff76 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, KWin::SceneOpenGL2::performPaintWindow(KWin::EffectWindowImpl*, int, QRegion const&, KWin::WindowPaintData&)::$_10>::call(KWin::SceneOpenGL2::performPaintWindow(KWin::EffectWindowImpl*, int, QRegion const&, KWin::WindowPaintData&)::$_10&, void**) (f=..., arg=0x7ffdf7f3b550)
    at /home/apol/devel/kde5/include/QtCore/qobjectdefs_impl.h:146
#13 0x00007f359b4eff41 in QtPrivate::Functor<KWin::SceneOpenGL2::performPaintWindow(KWin::EffectWindowImpl*, int, QRegion const&, KWin::WindowPaintData&)::$_10, 0>::call<QtPrivate::List<>, void>(KWin::SceneOpenGL2::performPaintWindow(KWin::EffectWindowImpl*, int, QRegion const&, KWin::WindowPaintData&)::$_10&, void*, void**) (f=..., arg=0x7ffdf7f3b550) at /home/apol/devel/kde5/include/QtCore/qobjectdefs_impl.h:256
#14 0x00007f359b4efeec in QtPrivate::QFunctorSlotObject<KWin::SceneOpenGL2::performPaintWindow(KWin::EffectWindowImpl*, int, QRegion const&, KWin::WindowPaintData&)::$_10, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x5560bccc80b0, r=0x5560bb7b9c50, a=0x7ffdf7f3b550, ret=0x0) at /home/apol/devel/kde5/include/QtCore/qobjectdefs_impl.h:443
#15 0x00007f35af3613d6 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7ffdf7f3b550, r=0x5560bb7b9c50, this=0x5560bccc80b0) at ../../include/QtCore/../../../../../devel/frameworks/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:398
#16 doActivate<false>(QObject*, int, void**) (sender=0x5560bb466d80, signal_index=4, argv=0x7ffdf7f3b550) at /home/apol/devel/frameworks/qt5/qtbase/src/corelib/kernel/qobject.cpp:3886
#17 0x00007f35b229edb8 in KWin::Screens::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x5560bb466d80, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7f35b229edb8 <KWin::Screens::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)+920>) at src/kwin_autogen/EWIEGA46WW/moc_screens.cpp:187
#18 0x00007f35b24b2201 in QObject::connect<void (KWin::Screens::*)(int, int), void (KWin::Screens::*)()>(QtPrivate::FunctionPointer<void (KWin::Screens::*)(int, int)>::Object const*, void (KWin::Screens::*)(int, int), QtPrivate::FunctionPointer<void (KWin::Screens::*)()>::Object const*, void (KWin::Screens::*)(), Qt::ConnectionType)
    (sender=0x7f35b229ed90 <KWin::Screens::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)+880>, signal=NULL, receiver=0x5560bb466d80, slot=NULL, type=32565) at /home/apol/devel/kde5/include/QtCore/qobject.h:265
#19 0x00007f35b24b2168 in  () at /home/apol/devel/kde5/lib/libkwin.so.5
#20 0x00007ffdf7f3b650 in  ()
#21 0x00007ffdf7f3b780 in  ()
#22 0x00007f35b229ed90 in KWin::Screens::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x0, _c=32565, _id=-1305875056, _a=0x0) at src/kwin_autogen/EWIEGA46WW/moc_screens.cpp:185
#23 0x00007f35b24b2095 in QObject::connect<void (KWin::Platform::*)(), void (KWin::Screens::*)()>(QtPrivate::FunctionPointer<void (KWin::Platform::*)()>::Object const*, void (KWin::Platform::*)(), QtPrivate::FunctionPointer<void (KWin::Screens::*)()>::Object const*, void (KWin::Screens::*)(), Qt::ConnectionType)
    (sender=0x7ffdf7f3b778, signal=(void (KWin::Platform::*)(KWin::Platform * const)) 0x5560bb466d80, this adjustment 93873947224096, receiver=0x7ffdf7f3b780, slot=NULL, type=32565) at /home/apol/devel/kde5/include/QtCore/qobject.h:261
#24 0x00007f35af3613d6 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7ffdf7f3b780, r=0x5560bb466d80, this=0x5560bb472820) at ../../include/QtCore/../../../../../devel/frameworks/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:398
#25 doActivate<false>(QObject*, int, void**) (sender=0x5560bb3c50d0, signal_index=3, argv=0x7ffdf7f3b780) at /home/apol/devel/frameworks/qt5/qtbase/src/corelib/kernel/qobject.cpp:3886
#26 0x00007f35b229b412 in KWin::Platform::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x7f35b229b412 <KWin::Platform::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)+1490>, _c=32765, _id=-135022624, _a=0x5560bb403f80) at src/kwin_autogen/EWIEGA46WW/moc_platform.cpp:271
#27 0x00007f35a90dc758 in KWin::stringToTransform(QString const&) (text=...) at /home/apol/devel/frameworks/kwin/src/plugins/platforms/drm/drm_backend.cpp:349
#28 0x00007f35a90df309 in std::__move_median_to_first<KWin::DrmOutput**, __gnu_cxx::__ops::_Iter_comp_iter<KWin::DrmBackend::updateOutputs()::$_1> >(KWin::DrmOutput**, KWin::DrmOutput**, KWin::DrmOutput**, KWin::DrmOutput**, __gnu_cxx::__ops::_Iter_comp_iter<KWin::DrmBackend::updateOutputs()::$_1>)
    (__result=0x7f35a4032b00, __a=0x7f35a9137970 <KWin::parseVendor(unsigned char const*)::$_1::operator()() const::qstring_literal+24>, __b=0x7f35a9136487, __c=0x7f35a9135e6c, __comp=...) at /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../include/c++/10.2.0/bits/stl_algo.h:85
#29 0x00007f35a90df116 in std::__push_heap<KWin::DrmOutput**, long, KWin::DrmOutput*, __gnu_cxx::__ops::_Iter_comp_val<KWin::DrmBackend::updateOutputs()::$_1> >(KWin::DrmOutput**, long, long, KWin::DrmOutput*, __gnu_cxx::__ops::_Iter_comp_val<KWin::DrmBackend::updateOutputs()::$_1>&) (__first=0x5560bb3b02d0, __holeIndex=140728763398816, __topIndex=139868446257430, __value=0x7ffdf7f3b9e0, __comp=...)
    at /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../include/c++/10.2.0/bits/stl_heap.h:138
#30 0x00007f35a90df0e1 in std::__push_heap<KWin::DrmOutput**, long, KWin::DrmOutput*, __gnu_cxx::__ops::_Iter_comp_val<KWin::DrmBackend::updateOutputs()::$_1> >(KWin::DrmOutput**, long, long, KWin::DrmOutput*, __gnu_cxx::__ops::_Iter_comp_val<KWin::DrmBackend::updateOutputs()::$_1>&) (__first=0x7ffdf7f3baa0, __holeIndex=139868550276016, __topIndex=139868446257377, __value=0x5560bb3c50d0, __comp=...)
    at /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../include/c++/10.2.0/bits/stl_heap.h:137
#31 0x00007f35af4123b0 in QListData::shared_null () at /home/apol/devel/kde5/lib/libQt5Core.so.5
#32 0x00007ffdf7f3baa0 in  ()
#33 0x00005560bb3c50d0 in  ()
#34 0x00005560bb3b02d0 in  ()
#35 0x00007ffdf7f3b9a0 in  ()
#36 0x00007f35a90df08c in std::__adjust_heap<KWin::DrmOutput**, long, KWin::DrmOutput*, __gnu_cxx::__ops::_Iter_comp_iter<KWin::DrmBackend::updateOutputs()::$_1> >(KWin::DrmOutput**, long, long, KWin::DrmOutput*, __gnu_cxx::__ops::_Iter_comp_iter<KWin::DrmBackend::updateOutputs()::$_1>)
    (__first=0x7f35a90df0e1 <std::__push_heap<KWin::DrmOutput**, long, KWin::DrmOutput*, __gnu_cxx::__ops::_Iter_comp_val<KWin::DrmBackend::updateOutputs()::$_1> >(KWin::DrmOutput**, long, long, KWin::DrmOutput*, __gnu_cxx::__ops::_Iter_comp_val<KWin::DrmBackend::updateOutputs()::$_1>&)+1>, __holeIndex=140728763398480, __len=668919358771598080, __value=0x7ffdf7f3baa0, __comp=...)
    at /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../include/c++/10.2.0/bits/stl_heap.h:246

-----

valgrind output:

Thread 1: status = VgTs_Runnable syscall 56 (lwpid 21791)
==21791==    at 0x8A6FA9D: syscall (in /usr/lib/libc-2.33.so)
==21791==    by 0x7F6E9C8: sys_clone (forkfd_linux.c:88)
==21791==    by 0x7F6E9C8: system_forkfd (forkfd_linux.c:151)
==21791==    by 0x7F6E9C8: forkfd (forkfd.c:651)
==21791==    by 0x7F53239: QProcessPrivate::startProcess() (qprocess_unix.cpp:465)
==21791==    by 0x62FD125: ScreenLocker::KSldApp::startLockProcess(ScreenLocker::EstablishLock) (devel/frameworks/kscreenlocker/ksldapp.cpp:613)
==21791==    by 0x62FEE37: ScreenLocker::KSldApp::initialize()::$_6::operator()(int, QProcess::ExitStatus) const (devel/frameworks/kscreenlocker/ksldapp.cpp:236)
==21791==    by 0x62FE925: QtPrivate::FunctorCall<QtPrivate::IndexesList<0, 1>, QtPrivate::List<int, QProcess::ExitStatus>, void, ScreenLocker::KSldApp::initialize()::$_6>::call(ScreenLocker::KSldApp::initialize()::$_6&, void**) (devel/kde5/include/QtCore/qobjectdefs_impl.h:146)
==21791==    by 0x62FE8E0: void QtPrivate::Functor<ScreenLocker::KSldApp::initialize()::$_6, 2>::call<QtPrivate::List<int, QProcess::ExitStatus>, void>(ScreenLocker::KSldApp::initialize()::$_6&, void*, void**) (devel/kde5/include/QtCore/qobjectdefs_impl.h:256)
==21791==    by 0x62FE88B: QtPrivate::QFunctorSlotObject<ScreenLocker::KSldApp::initialize()::$_6, 2, QtPrivate::List<int, QProcess::ExitStatus>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (devel/kde5/include/QtCore/qobjectdefs_impl.h:443)
==21791==    by 0x80113D5: call (qobjectdefs_impl.h:398)
==21791==    by 0x80113D5: void doActivate<false>(QObject*, int, void**) (qobject.cpp:3886)
==21791==    by 0x7F47E07: QProcess::finished(int, QProcess::ExitStatus) (moc_qprocess.cpp:339)
==21791==    by 0x7F4D592: QProcessPrivate::_q_processDied() (qprocess.cpp:1184)
==21791==    by 0x7F4D6BD: QProcess::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_qprocess.cpp:216)
==21791==    by 0x801140F: void doActivate<false>(QObject*, int, void**) (qobject.cpp:3898)
==21791==    by 0x801481E: QSocketNotifier::activated(QSocketDescriptor, QSocketNotifier::Type, QSocketNotifier::QPrivateSignal) (moc_qsocketnotifier.cpp:178)
==21791==    by 0x801501A: QSocketNotifier::event(QEvent*) (qsocketnotifier.cpp:302)
==21791==    by 0x6C7D17E: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:3632)
==21791==    by 0x7FDADF9: QCoreApplication::notifyInternal2(QObject*, QEvent*) (qcoreapplication.cpp:1064)
==21791==    by 0x802F54A: QEventDispatcherUNIXPrivate::activateSocketNotifiers() (qeventdispatcher_unix.cpp:304)
==21791==    by 0x802F9AA: QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (qeventdispatcher_unix.cpp:511)
==21791==    by 0x1C6E7C: QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (qunixeventdispatcher.cpp:63)
==21791==    by 0x7FD97AA: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (qeventloop.cpp:232)
==21791==    by 0x7FE1A2F: QCoreApplication::exec() (qcoreapplication.cpp:1375)
==21791==    by 0x195D1F: main (devel/frameworks/kwin/src/main_wayland.cpp:802)
client stack range: [0x1FFEFE7000 0x1FFF000FFF] client SP: 0x1FFEFFEF18
valgrind stack range: [0x1002DB6000 0x1002EB5FFF] top usage: 19024 of 1048576


Note: see also the FAQ in the source distribution.
It contains workarounds to several common problems.
In particular, if Valgrind aborted or crashed after
identifying problems in your program, there's a good chance
that fixing those problems will prevent Valgrind aborting or
crashing, especially if it happened in m_mallocfree.c.

If that doesn't help, please report this bug to: www.valgrind.org

In the bug report, send all the above text, the valgrind
version, and what OS and version you are using.  Thanks.



 kwin_wayland_drm: KWin::DrmBackend::initialize()::(anonymous class)::operator() Received hot plug event for monitored drm device
 kwin_wayland_drm: KWin::DrmPipeline::setCursor|KWin::DrmOutput::hideCursor|KWin::DrmOutput::teardown Could not set cursor: Permission denied
 kwin_wayland_drm: KWin::DrmBackend::readOutputsConfiguration Reading output configuration for [ "1729bea0-836b-5626-a6c4-609e5e3b6cac" ] [ QUuid("{1729bea0-836b-5626-a6c4-609e5e3b6cac}") ]
==20651== Conditional jump or move depends on uninitialised value(s)
==20651==    at 0x52EED88: KWin::ContrastEffect::supported() (devel/frameworks/kwin/src/effects/backgroundcontrast/contrast.cpp:275)
==20651==    by 0x52EE11E: KWin::ContrastEffect::slotScreenGeometryChanged() (devel/frameworks/kwin/src/effects/backgroundcontrast/contrast.cpp:69)
==20651==    by 0x52F27E0: QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (KWin::ContrastEffect::*)()>::call(void (KWin::ContrastEffect::*)(), KWin::ContrastEffect*, void**) (devel/kde5/include/QtCore/qobjectdefs_impl.h:152)
==20651==    by 0x52F2747: void QtPrivate::FunctionPointer<void (KWin::ContrastEffect::*)()>::call<QtPrivate::List<>, void>(void (KWin::ContrastEffect::*)(), KWin::ContrastEffect*, void**) (devel/kde5/include/QtCore/qobjectdefs_impl.h:185)
==20651==    by 0x52F2674: QtPrivate::QSlotObject<void (KWin::ContrastEffect::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (devel/kde5/include/QtCore/qobjectdefs_impl.h:418)
==20651==    by 0x80113D5: call (qobjectdefs_impl.h:398)
==20651==    by 0x80113D5: void doActivate<false>(QObject*, int, void**) (qobject.cpp:3886)
==20651==    by 0x53A79E5: KWin::EffectsHandler::screenGeometryChanged(QSize const&) (moc_kwineffects.cpp:1801)
==20651==    by 0x4D85EFE: KWin::EffectsHandlerImpl::desktopResized(QSize const&) (devel/frameworks/kwin/src/effects.cpp:805)
==20651==    by 0x4F6C60E: KWin::Workspace::desktopResized() (devel/frameworks/kwin/src/workspace.cpp:1987)
==20651==    by 0x4F3CF40: QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (KWin::Workspace::*)()>::call(void (KWin::Workspace::*)(), KWin::Workspace*, void**) (devel/kde5/include/QtCore/qobjectdefs_impl.h:152)
==20651==    by 0x4F3CEA7: void QtPrivate::FunctionPointer<void (KWin::Workspace::*)()>::call<QtPrivate::List<>, void>(void (KWin::Workspace::*)(), KWin::Workspace*, void**) (devel/kde5/include/QtCore/qobjectdefs_impl.h:185)
==20651==    by 0x4F3CDD4: QtPrivate::QSlotObject<void (KWin::Workspace::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (devel/kde5/include/QtCore/qobjectdefs_impl.h:418)
==20651==    by 0x80113D5: call (qobjectdefs_impl.h:398)
==20651==    by 0x80113D5: void doActivate<false>(QObject*, int, void**) (qobject.cpp:3886)
==20651==    by 0x4C9EDB7: KWin::Screens::changed() (moc_screens.cpp:272)
==20651==    by 0x4EB2220: QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (KWin::Screens::*)()>::call(void (KWin::Screens::*)(), KWin::Screens*, void**) (devel/kde5/include/QtCore/qobjectdefs_impl.h:152)
==20651==    by 0x4C9EDB7: KWin::Screens::changed() (moc_screens.cpp:272)                                                                                                                                                                                                                                                                                                                                                               [408/1752]
==20651==    by 0x4EB2220: QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (KWin::Screens::*)()>::call(void (KWin::Screens::*)(), KWin::Screens*, void**) (devel/kde5/include/QtCore/qobjectdefs_impl.h:152)
==20651==    by 0x4EB2187: void QtPrivate::FunctionPointer<void (KWin::Screens::*)()>::call<QtPrivate::List<>, void>(void (KWin::Screens::*)(), KWin::Screens*, void**) (devel/kde5/include/QtCore/qobjectdefs_impl.h:185)
==20651==    by 0x4EB20B4: QtPrivate::QSlotObject<void (KWin::Screens::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (devel/kde5/include/QtCore/qobjectdefs_impl.h:418)
==20651==    by 0x80113D5: call (qobjectdefs_impl.h:398)
==20651==    by 0x80113D5: void doActivate<false>(QObject*, int, void**) (qobject.cpp:3886)
==20651==    by 0x4C9B411: KWin::Platform::screensQueried() (moc_platform.cpp:348)
==20651==    by 0xE9EEB97: KWin::DrmBackend::updateOutputs() (devel/frameworks/kwin/src/plugins/platforms/drm/drm_backend.cpp:318)
==20651==    by 0xE9F1748: KWin::DrmBackend::initialize()::$_0::operator()() const (devel/frameworks/kwin/src/plugins/platforms/drm/drm_backend.cpp:266)
==20651==    by 0xE9F1555: QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, KWin::DrmBackend::initialize()::$_0>::call(KWin::DrmBackend::initialize()::$_0&, void**) (devel/kde5/include/QtCore/qobjectdefs_impl.h:146)
==20651==    by 0xE9F1520: void QtPrivate::Functor<KWin::DrmBackend::initialize()::$_0, 0>::call<QtPrivate::List<>, void>(KWin::DrmBackend::initialize()::$_0&, void*, void**) (devel/kde5/include/QtCore/qobjectdefs_impl.h:256)
==20651==    by 0xE9F14CB: QtPrivate::QFunctorSlotObject<KWin::DrmBackend::initialize()::$_0, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (devel/kde5/include/QtCore/qobjectdefs_impl.h:443)
==20651==    by 0x80113D5: call (qobjectdefs_impl.h:398)
==20651==    by 0x80113D5: void doActivate<false>(QObject*, int, void**) (qobject.cpp:3886)
==20651==    by 0x801481E: QSocketNotifier::activated(QSocketDescriptor, QSocketNotifier::Type, QSocketNotifier::QPrivateSignal) (moc_qsocketnotifier.cpp:178)
==20651==    by 0x801501A: QSocketNotifier::event(QEvent*) (qsocketnotifier.cpp:302)
==20651==    by 0x6C7D17E: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:3632)
==20651==    by 0x7FDADF9: QCoreApplication::notifyInternal2(QObject*, QEvent*) (qcoreapplication.cpp:1064)
==20651==    by 0x802F54A: QEventDispatcherUNIXPrivate::activateSocketNotifiers() (qeventdispatcher_unix.cpp:304)
==20651==    by 0x802F9AA: QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (qeventdispatcher_unix.cpp:511)
==20651==    by 0x1C6E7C: QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (qunixeventdispatcher.cpp:63)
==20651==    by 0x7FD97AA: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (qeventloop.cpp:232)
==20651==    by 0x7FE1A2F: QCoreApplication::exec() (qcoreapplication.cpp:1375)
==20651==    by 0x195D1F: main (devel/frameworks/kwin/src/main_wayland.cpp:802)
==20651==
kwin_wayland: ../libepoxy/src/dispatch_common.c:858: epoxy_get_proc_address: Assertion `0 && "Couldn't find current GLX or EGL context.\n"' failed.
==20651==
==20651== Process terminating with default action of signal 6 (SIGABRT): dumping core
==20651==    at 0x89B2EF5: raise (in /usr/lib/libc-2.33.so)
==20651==    by 0x899C911: abort (in /usr/lib/libc-2.33.so)
==20651==    by 0x899C746: __assert_fail_base.cold (in /usr/lib/libc-2.33.so)
==20651==    by 0x89AB645: __assert_fail (in /usr/lib/libc-2.33.so)
==20651==    by 0x83F8F27: ??? (in /usr/lib/libepoxy.so.0.0.0)
==20651==    by 0x83A8149: ??? (in /usr/lib/libepoxy.so.0.0.0)
==20651==    by 0x540ED7E: KWin::GLShader::~GLShader() (devel/frameworks/kwin/src/libkwineffects/kwinglutils.cpp:159)
==20651==    by 0x52F326E: KWin::ContrastShader::reset() (devel/frameworks/kwin/src/effects/backgroundcontrast/contrastshader.cpp:40)
==20651==    by 0x52F3237: KWin::ContrastShader::~ContrastShader() (devel/frameworks/kwin/src/effects/backgroundcontrast/contrastshader.cpp:30)
==20651==    by 0x52F32BB: KWin::ContrastShader::~ContrastShader() (devel/frameworks/kwin/src/effects/backgroundcontrast/contrastshader.cpp:29)
==20651==    by 0x52EEC72: KWin::ContrastEffect::~ContrastEffect() (devel/frameworks/kwin/src/effects/backgroundcontrast/contrast.cpp:63)
==20651==    by 0x52EECEB: KWin::ContrastEffect::~ContrastEffect() (devel/frameworks/kwin/src/effects/backgroundcontrast/contrast.cpp:62)
==20651==    by 0x4D833C0: KWin::EffectsHandlerImpl::destroyEffect(KWin::Effect*) (devel/frameworks/kwin/src/effects.cpp:1428)
==20651==    by 0x4D887B3: KWin::EffectsHandlerImpl::unloadEffect(QString const&) (devel/frameworks/kwin/src/effects.cpp:1402)
==20651==    by 0x4D89005: KWin::EffectsHandlerImpl::reloadEffect(KWin::Effect*) (devel/frameworks/kwin/src/effects.cpp:1486)
==20651==    by 0x52EE143: KWin::ContrastEffect::slotScreenGeometryChanged() (devel/frameworks/kwin/src/effects/backgroundcontrast/contrast.cpp:70)
==20651==    by 0x52F27E0: QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (KWin::ContrastEffect::*)()>::call(void (KWin::ContrastEffect::*)(), KWin::ContrastEffect*, void**) (devel/kde5/include/QtCore/qobjectdefs_impl.h:152)
==20651==    by 0x52F2747: void QtPrivate::FunctionPointer<void (KWin::ContrastEffect::*)()>::call<QtPrivate::List<>, void>(void (KWin::ContrastEffect::*)(), KWin::ContrastEffect*, void**) (devel/kde5/include/QtCore/qobjectdefs_impl.h:185)
==20651==    by 0x52F2674: QtPrivate::QSlotObject<void (KWin::ContrastEffect::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (devel/kde5/include/QtCore/qobjectdefs_impl.h:418)
==20651==    by 0x80113D5: call (qobjectdefs_impl.h:398)
==20651==    by 0x80113D5: void doActivate<false>(QObject*, int, void**) (qobject.cpp:3886)
==20651==    by 0x53A79E5: KWin::EffectsHandler::screenGeometryChanged(QSize const&) (moc_kwineffects.cpp:1801)
==20651==    by 0x4D85EFE: KWin::EffectsHandlerImpl::desktopResized(QSize const&) (devel/frameworks/kwin/src/effects.cpp:805)
==20651==    by 0x4F6C60E: KWin::Workspace::desktopResized() (devel/frameworks/kwin/src/workspace.cpp:1987)
==20651==    by 0x4F3CF40: QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (KWin::Workspace::*)()>::call(void (KWin::Workspace::*)(), KWin::Workspace*, void**) (devel/kde5/include/QtCore/qobjectdefs_impl.h:152)
==20651==    by 0x4F3CEA7: void QtPrivate::FunctionPointer<void (KWin::Workspace::*)()>::call<QtPrivate::List<>, void>(void (KWin::Workspace::*)(), KWin::Workspace*, void**) (devel/kde5/include/QtCore/qobjectdefs_impl.h:185)
==20651==    by 0x4F3CDD4: QtPrivate::QSlotObject<void (KWin::Workspace::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (devel/kde5/include/QtCore/qobjectdefs_impl.h:418)
==20651==    by 0x80113D5: call (qobjectdefs_impl.h:398)
==20651==    by 0x80113D5: void doActivate<false>(QObject*, int, void**) (qobject.cpp:3886)
==20651==    by 0x4C9EDB7: KWin::Screens::changed() (moc_screens.cpp:272)
==20651==    by 0x4EB2220: QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (KWin::Screens::*)()>::call(void (KWin::Screens::*)(), KWin::Screens*, void**) (devel/kde5/include/QtCore/qobjectdefs_impl.h:152)
==20651==    by 0x4EB2187: void QtPrivate::FunctionPointer<void (KWin::Screens::*)()>::call<QtPrivate::List<>, void>(void (KWin::Screens::*)(), KWin::Screens*, void**) (devel/kde5/include/QtCore/qobjectdefs_impl.h:185)
==20651==    by 0x4EB20B4: QtPrivate::QSlotObject<void (KWin::Screens::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (devel/kde5/include/QtCore/qobjectdefs_impl.h:418)
==20651==    by 0x80113D5: call (qobjectdefs_impl.h:398)
==20651==    by 0x80113D5: void doActivate<false>(QObject*, int, void**) (qobject.cpp:3886)
==20651==    by 0x4C9B411: KWin::Platform::screensQueried() (moc_platform.cpp:348)
==20651==    by 0xE9EEB97: KWin::DrmBackend::updateOutputs() (devel/frameworks/kwin/src/plugins/platforms/drm/drm_backend.cpp:318)
==20651==    by 0xE9F1748: KWin::DrmBackend::initialize()::$_0::operator()() const (devel/frameworks/kwin/src/plugins/platforms/drm/drm_backend.cpp:266)
==20651==    by 0xE9F1555: QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, KWin::DrmBackend::initialize()::$_0>::call(KWin::DrmBackend::initialize()::$_0&, void**) (devel/kde5/include/QtCore/qobjectdefs_impl.h:146)
==20651==    by 0xE9F1520: void QtPrivate::Functor<KWin::DrmBackend::initialize()::$_0, 0>::call<QtPrivate::List<>, void>(KWin::DrmBackend::initialize()::$_0&, void*, void**) (devel/kde5/include/QtCore/qobjectdefs_impl.h:256)
==20651==    by 0xE9F14CB: QtPrivate::QFunctorSlotObject<KWin::DrmBackend::initialize()::$_0, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (devel/kde5/include/QtCore/qobjectdefs_impl.h:443)
==20651==    by 0x80113D5: call (qobjectdefs_impl.h:398)
==20651==    by 0x80113D5: void doActivate<false>(QObject*, int, void**) (qobject.cpp:3886)
==20651==    by 0x801481E: QSocketNotifier::activated(QSocketDescriptor, QSocketNotifier::Type, QSocketNotifier::QPrivateSignal) (moc_qsocketnotifier.cpp:178)
==20651==    by 0x801501A: QSocketNotifier::event(QEvent*) (qsocketnotifier.cpp:302)
==20651==    by 0x6C7D17E: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:3632)
==20651==    by 0x7FDADF9: QCoreApplication::notifyInternal2(QObject*, QEvent*) (qcoreapplication.cpp:1064)
==20651==    by 0x802F54A: QEventDispatcherUNIXPrivate::activateSocketNotifiers() (qeventdispatcher_unix.cpp:304)
==20651==    by 0x802F9AA: QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (qeventdispatcher_unix.cpp:511)
==20651==    by 0x1C6E7C: QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (qunixeventdispatcher.cpp:63)
==20651==    by 0x7FD97AA: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (qeventloop.cpp:232)
==20651==    by 0x7FE1A2F: QCoreApplication::exec() (qcoreapplication.cpp:1375)
==20651==    by 0x195D1F: main (devel/frameworks/kwin/src/main_wayland.cpp:802)
==20651==
Comment 1 Alois Wohlschlager 2021-04-20 16:25:48 UTC
Seems related to the crash I got today after enabling a monitor. I'm using openSUSE Tumbleweed with Plasma 5.21.4 and Wayland.

#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49
#1  0x00007f119c2d3914 in __GI_abort () at abort.c:100
#2  0x00007f119c2d3749 in __assert_fail_base
    (fmt=0x7f1195ac6554 "%s%s%s:%u: %s%sZusicherung »%s« nicht erfüllt.\n%n", assertion=0x7f119c835750 "0 && \"Couldn't find current GLX or EGL context.\\n\"", file=0x7f119c835829 "../src/dispatch_common.c", line=858, function=<optimized out>) at assert.c:92
#3  0x00007f119c2e29b6 in __GI___assert_fail
    (assertion=assertion@entry=0x7f119c835750 "0 && \"Couldn't find current GLX or EGL context.\\n\"", file=file@entry=0x7f119c835829 "../src/dispatch_common.c", line=line@entry=858, function=function@entry=0x7f119c835c80 <__PRETTY_FUNCTION__.0.lto_priv.0> "epoxy_get_proc_address") at assert.c:101
#4  0x00007f119c811df7 in epoxy_get_proc_address (name=0x7f119c81c139 <entrypoint_strings.lto_priv+9849> "glDeleteProgram") at ../src/dispatch_common.c:858
#5  0x00007f119c7c105a in epoxy_glDeleteProgram_resolver () at src/gl_generated_dispatch.c:81668
#6  epoxy_glDeleteProgram_global_rewrite_ptr (program=31) at src/gl_generated_dispatch.c:49458
#7  0x00007f11947aca30 in QScopedPointerDeleter<KWin::GLShader>::cleanup(KWin::GLShader*) (pointer=0x5601a20850d0) at /usr/include/qt5/QtCore/qscopedpointer.h:52
#8  QScopedPointerDeleter<KWin::GLShader>::cleanup(KWin::GLShader*) (pointer=0x5601a20850d0) at /usr/include/qt5/QtCore/qscopedpointer.h:52
#9  QScopedPointer<KWin::GLShader, QScopedPointerDeleter<KWin::GLShader> >::~QScopedPointer() (this=0x5601a2182fe8, this=<optimized out>) at /usr/include/qt5/QtCore/qscopedpointer.h:107
#10 KWin::LanczosFilter::~LanczosFilter() (this=0x5601a2182fc0, this=<optimized out>) at /usr/src/debug/kwin5-5.21.4-1.1.x86_64/plugins/scenes/opengl/lanczosfilter.cpp:47
#11 0x00007f11947b7cc0 in KWin::LanczosFilter::~LanczosFilter() (this=0x5601a2182fc0, this=<optimized out>) at /usr/src/debug/kwin5-5.21.4-1.1.x86_64/plugins/scenes/opengl/lanczosfilter.cpp:47
#12 operator() (__closure=0x5601a1ccd220) at /usr/src/debug/kwin5-5.21.4-1.1.x86_64/plugins/scenes/opengl/scene_opengl.cpp:1042
#13 QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, KWin::SceneOpenGL2::performPaintWindow(KWin::EffectWindowImpl*, int, const QRegion&, KWin::WindowPaintData&)::<lambda()> >::call
    (arg=<optimized out>, f=...) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:146
#14 QtPrivate::Functor<KWin::SceneOpenGL2::performPaintWindow(KWin::EffectWindowImpl*, int, const QRegion&, KWin::WindowPaintData&)::<lambda()>, 0>::call<QtPrivate::List<>, void> (arg=<optimized out>, f=...)
    at /usr/include/qt5/QtCore/qobjectdefs_impl.h:256
#15 QtPrivate::QFunctorSlotObject<KWin::SceneOpenGL2::performPaintWindow(KWin::EffectWindowImpl*, int, const QRegion&, KWin::WindowPaintData&)::<lambda()>, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=<optimized out>, this_=0x5601a1ccd210, r=<optimized out>, a=<optimized out>, ret=<optimized out>) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:443
#16 0x00007f119ddb2c17 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7fffbe025f00, r=0x5601a0e7c770, this=0x5601a1ccd210) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#17 doActivate<false>(QObject*, int, void**) (sender=0x5601a0b99820, signal_index=4, argv=0x7fffbe025f00) at kernel/qobject.cpp:3886
#18 0x00007f119ddb2c17 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7fffbe025fe0, r=0x5601a0b99820, this=0x5601a0baaff0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#19 doActivate<false>(QObject*, int, void**) (sender=0x5601a0a55f60, signal_index=3, argv=0x7fffbe025fe0, argv@entry=0x0) at kernel/qobject.cpp:3886
#20 0x00007f119ddabf60 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=sender@entry=0x5601a0a55f60, m=m@entry=0x7f119da8e100, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0)
    at kernel/qobject.cpp:3946
#21 0x00007f119d838a30 in KWin::Platform::screensQueried() (this=this@entry=0x5601a0a55f60) at /usr/src/debug/kwin5-5.21.4-1.1.x86_64/build/kwin_autogen/EWIEGA46WW/moc_platform.cpp:359
#22 0x00007f1196333232 in KWin::DrmBackend::enableOutput(KWin::DrmOutput*, bool) (this=0x5601a0a55f60, output=<optimized out>, enable=<optimized out>)
    at /usr/src/debug/kwin5-5.21.4-1.1.x86_64/plugins/platforms/drm/drm_backend.cpp:521
#23 0x00007f119634275c in KWin::DrmOutput::atomicEnable() (this=<optimized out>) at /usr/src/debug/kwin5-5.21.4-1.1.x86_64/plugins/platforms/drm/drm_output.cpp:488
#24 0x00007f119d8f39f0 in KWin::Platform::requestOutputsChange(KWaylandServer::OutputConfigurationInterface*) (this=0x5601a0a55f60, config=0x5601a2c5f060) at /usr/src/debug/kwin5-5.21.4-1.1.x86_64/platform.cpp:135
#25 0x00007f119ddb2c17 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7fffbe026240, r=0x5601a0a3b7e0, this=0x5601a0a6e3b0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#26 doActivate<false>(QObject*, int, void**) (sender=0x5601a0a6e2c0, signal_index=4, argv=argv@entry=0x7fffbe026240) at kernel/qobject.cpp:3886
#27 0x00007f119ddabf60 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**)
    (sender=<optimized out>, m=m@entry=0x7f119ca213c0 <KWaylandServer::OutputManagementInterface::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fffbe026240) at kernel/qobject.cpp:3946
#28 0x00007f119c933e6f in KWaylandServer::OutputManagementInterface::configurationChangeRequested(KWaylandServer::OutputConfigurationInterface*) (this=<optimized out>, _t1=<optimized out>)
    at /usr/src/debug/kwayland-server-5.21.4-1.1.x86_64/build/src/server/KWaylandServer_autogen/EWIEGA46WW/moc_outputmanagement_interface.cpp:136
#29 0x00007f11994be42d in ffi_call_unix64 () at ../src/x86/unix64.S:106
#30 0x00007f11994ba4f9 in ffi_call_int (cif=<optimized out>, fn=<optimized out>, rvalue=<optimized out>, avalue=<optimized out>, closure=<optimized out>) at ../src/x86/ffi64.c:669
#31 0x00007f1199fad005 in wl_closure_invoke (closure=closure@entry=0x5601a2b12240, target=<optimized out>, target@entry=0x5601a23238e0, opcode=opcode@entry=5, data=<optimized out>, 
    data@entry=0x5601a2c623f0, flags=<optimized out>) at src/connection.c:1018
#32 0x00007f1199fb0edc in wl_client_connection_data (fd=<optimized out>, mask=<optimized out>, data=<optimized out>) at src/wayland-server.c:432
#33 0x00007f1199fafad2 in wl_event_loop_dispatch (loop=0x5601a0a5f840, timeout=timeout@entry=0) at src/event-loop.c:1027
#34 0x00007f119c9488b6 in KWaylandServer::Display::dispatchEvents() (this=<optimized out>) at /usr/src/debug/kwayland-server-5.21.4-1.1.x86_64/src/server/display.cpp:107
#35 0x00007f119ddb2c17 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7fffbe026a90, r=0x5601a0a5f440, this=0x5601a13e06c0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#36 doActivate<false>(QObject*, int, void**) (sender=0x5601a0a62b50, signal_index=3, argv=argv@entry=0x7fffbe026a90) at kernel/qobject.cpp:3886
#37 0x00007f119ddabf60 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**)
    (sender=sender@entry=0x5601a0a62b50, m=m@entry=0x7f119e061a60, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fffbe026a90) at kernel/qobject.cpp:3946
#38 0x00007f119ddb60bf in QSocketNotifier::activated(QSocketDescriptor, QSocketNotifier::Type, QSocketNotifier::QPrivateSignal) (this=this@entry=0x5601a0a62b50, _t1=..., _t2=<optimized out>, _t3=...) at .moc/moc_qsocketnotifier.cpp:178
#39 0x00007f119ddb68bb in QSocketNotifier::event(QEvent*) (this=0x5601a0a62b50, e=0x7fffbe026ba0) at kernel/qsocketnotifier.cpp:302
#40 0x00007f119cd84aff in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x5601a0a62b50, e=0x7fffbe026ba0) at kernel/qapplication.cpp:3632
#41 0x00007f119dd7c13a in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x5601a0a62b50, event=0x7fffbe026ba0) at kernel/qcoreapplication.cpp:1063
#42 0x00007f119ddd109b in QEventDispatcherUNIXPrivate::activateSocketNotifiers() (this=0x5601a0a19f00) at kernel/qeventdispatcher_unix.cpp:304
#43 0x00007f119ddd14f3 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=<optimized out>, flags=...) at kernel/qeventdispatcher_unix.cpp:511
#44 0x000056019ffa0dad in QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=<optimized out>, flags=...) at qunixeventdispatcher.cpp:63
#45 0x00007f119dd7ab7b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fffbe026d30, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#46 0x00007f119dd82db0 in QCoreApplication::exec() () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#47 0x00007f119e1dda9c in QGuiApplication::exec() () at kernel/qguiapplication.cpp:1867
#48 0x00007f119cd84a75 in QApplication::exec() () at kernel/qapplication.cpp:2824
#49 0x000056019ff4e53c in main(int, char**) (argc=<optimized out>, argv=0x7fffbe026f70) at /usr/src/debug/kwin5-5.21.4-1.1.x86_64/main_wayland.cpp:788
Comment 2 Aleix Pol 2021-04-20 23:35:36 UTC
I've been testing a bit further with the suggested branch, it didn't really make a difference.

I've seen my amdgpu@kernel freak out over it, so it might just be an issue there.

[  208.208074] divide error: 0000 [#1] PREEMPT SMP NOPTI
[  208.208078] CPU: 3 PID: 2137 Comm: kwin_wayland Tainted: G           OE     5.11.15-arch1-2 #1
[  208.208080] Hardware name: ASUS System Product Name/PRIME B550-PLUS, BIOS 1401 12/03/2020
[  208.208081] RIP: 0010:amdgpu_dm_atomic_check+0x46c/0xcc0 [amdgpu]
[  208.208202] Code: 48 83 7e 10 00 74 5b 69 46 28 e8 03 00 00 44 0f b7 4e 3e 31 d2 41 f7 f1 45 0f b7 48 3e 31 d2 41 89 c3 41 69 40 28 e8 03 00 00 <41> f7 f1 41 39 c3 0f 85 22 08 00 00 69 46 2c e8 03 00 00 0f b7 76
[  208.208203] RSP: 0018:ffffba5bc19c7be8 EFLAGS: 00010246
[  208.208205] RAX: 0000000000000000 RBX: ffffba5bc19c7c17 RCX: ffff9ca0ff4a8838
[  208.208206] RDX: 0000000000000000 RSI: ffff9ca103e27e00 RDI: ffff9ca0ff4a8918
[  208.208207] RBP: ffff9ca10cc91600 R08: ffff9ca103e269c0 R09: 0000000000000000
[  208.208208] R10: 0000000000000000 R11: 00000000000003e8 R12: 0000000000000000
[  208.208208] R13: ffff9ca0ff4aa000 R14: 0000000000000000 R15: 0000000000000000
[  208.208210] FS:  00007f64b8d188c0(0000) GS:ffff9ca78e8c0000(0000) knlGS:0000000000000000
[  208.208211] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  208.208212] CR2: 00007f63ea187000 CR3: 00000001101ea000 CR4: 0000000000350ee0
[  208.208213] Call Trace:
[  208.208217]  drm_atomic_check_only+0x5db/0x8d0 [drm]
[  208.208236]  drm_mode_atomic_ioctl+0x724/0xaf0 [drm]
[  208.208252]  ? drm_atomic_set_property+0xb30/0xb30 [drm]
[  208.208265]  drm_ioctl_kernel+0xb2/0x100 [drm]
[  208.208279]  drm_ioctl+0x215/0x390 [drm]
[  208.208293]  ? drm_atomic_set_property+0xb30/0xb30 [drm]
[  208.208307]  amdgpu_drm_ioctl+0x49/0x80 [amdgpu]
[  208.208385]  __x64_sys_ioctl+0x83/0xb0
[  208.208389]  do_syscall_64+0x33/0x40
[  208.208391]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[  208.208393] RIP: 0033:0x7f64bca94e6b
[  208.208395] Code: ff ff ff 85 c0 79 8b 49 c7 c4 ff ff ff ff 5b 5d 4c 89 e0 41 5c c3 66 0f 1f 84 00 00 00 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d d5 af 0c 00 f7 d8 64 89 01 48
[  208.208396] RSP: 002b:00007fffeaf02828 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[  208.208397] RAX: ffffffffffffffda RBX: 00007fffeaf02870 RCX: 00007f64bca94e6b
[  208.208398] RDX: 00007fffeaf02870 RSI: 00000000c03864bc RDI: 000000000000000f
[  208.208399] RBP: 00000000c03864bc R08: 0000000000000002 R09: 0000000000000002
[  208.208400] R10: 00007f64bcb60a00 R11: 0000000000000246 R12: 0000558a63ea7200
[  208.208401] R13: 000000000000000f R14: 0000558a65250c70 R15: 0000558a6482b770
Comment 3 Alois Wohlschlager 2021-04-21 05:11:10 UTC
Unlikely that this is an amdgpu problem, I have an Intel GPU. Unfortunately, I don't have a dmesg available since I have turned the machine off by now.
Comment 4 Vlad Zahorodnii 2021-04-21 08:47:54 UTC
I can reproduce the kernel panic

ermit,pam_faillock acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/2 res=success'
[  135.410806] divide error: 0000 [#1] PREEMPT SMP NOPTI
[  135.410811] CPU: 0 PID: 1110 Comm: kwin_wayland Tainted: G           OE     5.11.15-arch1-2 #1
[  135.410813] Hardware name: Micro-Star International Co., Ltd. MS-7B17/MPG Z390 GAMING EDGE AC (MS-7B17), BIOS A.20 11/13/2018
[  135.410813] RIP: 0010:amdgpu_dm_atomic_check+0x46c/0xcc0 [amdgpu]
[  135.410956] Code: 48 83 7e 10 00 74 5b 69 46 28 e8 03 00 00 44 0f b7 4e 3e 31 d2 41 f7 f1 45 0f b7 48 3e 31 d2 41 89 c3 41 69 40 28 e8 03 00 00 <41> f7 f1 41 39 c3 0f 85 22 08 00 00 69 46 2c e8 03 00 00 0f b7 76
[  135.410958] RSP: 0018:ffffb45681e33be8 EFLAGS: 00010206
[  135.410959] RAX: 0000000000000000 RBX: ffffb45681e33c17 RCX: ffff8fa93f3ba600
[  135.410961] RDX: 0000000000000000 RSI: ffff8fa93f3ec9c0 RDI: ffff8fa93f3ba750
[  135.410961] RBP: ffff8fa927b18c80 R08: ffff8fa93f3ec300 R09: 0000000000000000
[  135.410962] R10: 0000000000000000 R11: 00000000000003e8 R12: 0000000000000000
[  135.410963] R13: ffff8fa911452600 R14: 0000000000000000 R15: 0000000000000000
[  135.410964] FS:  00007f1798c8b8c0(0000) GS:ffff8fb82dc00000(0000) knlGS:0000000000000000
[  135.410966] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  135.410967] CR2: 00007f1754089000 CR3: 000000013124c002 CR4: 00000000003706f0
[  135.410968] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  135.410969] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[  135.410969] Call Trace:
[  135.410973]  drm_atomic_check_only+0x5db/0x8d0 [drm]
[  135.410995]  drm_mode_atomic_ioctl+0x724/0xaf0 [drm]
[  135.411012]  ? drm_atomic_set_property+0xb30/0xb30 [drm]
[  135.411028]  drm_ioctl_kernel+0xb2/0x100 [drm]
[  135.411043]  drm_ioctl+0x215/0x390 [drm]
[  135.411058]  ? drm_atomic_set_property+0xb30/0xb30 [drm]
[  135.411074]  amdgpu_drm_ioctl+0x49/0x80 [amdgpu]
[  135.411156]  __x64_sys_ioctl+0x83/0xb0
[  135.411160]  do_syscall_64+0x33/0x40
[  135.411162]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[  135.411164] RIP: 0033:0x7f179c6b7e6b
[  135.411166] Code: ff ff ff 85 c0 79 8b 49 c7 c4 ff ff ff ff 5b 5d 4c 89 e0 41 5c c3 66 0f 1f 84 00 00 00 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d d5 af 0c 00 f7 d8 64 89 01 48
[  135.411167] RSP: 002b:00007fff7ddbed08 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[  135.411168] RAX: ffffffffffffffda RBX: 00007fff7ddbed50 RCX: 00007f179c6b7e6b
[  135.411169] RDX: 00007fff7ddbed50 RSI: 00000000c03864bc RDI: 000000000000000f
[  135.411170] RBP: 00000000c03864bc R08: 0000000000000002 R09: 0000000000000002
[  135.411171] R10: 00007f179c783a00 R11: 0000000000000246 R12: 000055f02909d990
[  135.411172] R13: 000000000000000f R14: 000055f02a377060 R15: 000055f02a378aa0

however, I was seeing it even without https://invent.kde.org/plasma/kwin/-/merge_requests/871
Comment 5 Aleix Pol 2021-04-21 09:15:53 UTC
Correct, 871 doesn't make a difference for me.
Comment 6 Vlad Zahorodnii 2021-04-21 09:55:36 UTC
(In reply to Aleix Pol from comment #5)
> Correct, 871 doesn't make a difference for me.

Hmm, I'll recompile my kernel to get a useful kernel coredump. Hopefully, it will shed some light on it...
Comment 7 Vlad Zahorodnii 2021-04-21 16:45:13 UTC
I built a kernel with debug symbols and got a core dump, however the crash utility is completely broken, it either prints that it cannot allocate anymore memory (despite a reasonable amount of free ram on my computer) or it simply crashes. :|
Comment 8 Vlad Zahorodnii 2021-04-21 16:55:29 UTC
(gdb) l *amdgpu_dm_atomic_check+0x46c
0x1b51ec is in amdgpu_dm_atomic_check (drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:9099).
9094            cursor_scale_w = new_cursor_state->crtc_w * 1000 /
9095                             (new_cursor_state->src_w >> 16);
9096            cursor_scale_h = new_cursor_state->crtc_h * 1000 /
9097                             (new_cursor_state->src_h >> 16);
9098
9099            primary_scale_w = new_primary_state->crtc_w * 1000 /
9100                             (new_primary_state->src_w >> 16);
9101            primary_scale_h = new_primary_state->crtc_h * 1000 /
9102                             (new_primary_state->src_h >> 16);

the kernel seems to crash somewhere over here
Comment 9 Vlad Zahorodnii 2021-04-21 17:09:17 UTC
At quick glance, we can work around this crash by un-setting the framebuffer for the cursor plane.
Comment 10 Bug Janitor Service 2021-04-22 00:31:17 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/881
Comment 11 Aleix Pol 2021-04-22 05:23:40 UTC
Git commit 0d9185053c0042f05470190ececf8606edb1c55c by Aleix Pol Gonzalez, on behalf of Vlad Zahorodnii.
Committed on 21/04/2021 at 23:17.
Pushed by vladz into branch 'master'.

platforms/drm: Ignore udev events while session is inactive

While the session is inactive, the drm master permissions are revoked.
Therefore, we cannot perform things such as modesetting, etc. It also
makes no sense to create or destroy DrmOutput objects.

M  +30   -26   src/plugins/platforms/drm/drm_backend.cpp
M  +1    -0    src/plugins/platforms/drm/drm_backend.h

https://invent.kde.org/plasma/kwin/commit/0d9185053c0042f05470190ececf8606edb1c55c
Comment 12 Aleix Pol 2021-04-22 10:18:50 UTC
Git commit b3ddb11b7cf8f9a817142903fa356bf764691cf7 by Aleix Pol Gonzalez, on behalf of Aleix Pol.
Committed on 22/04/2021 at 10:18.
Pushed by apol into branch 'master'.

drm: hide the cursor as we are setting dpms off

It seems to crash amdgpu and it's consistent with how we're cleaning all
our planes.

M  +1    -0    src/plugins/platforms/drm/drm_output.cpp

https://invent.kde.org/plasma/kwin/commit/b3ddb11b7cf8f9a817142903fa356bf764691cf7
Comment 13 Nate Graham 2021-05-11 12:58:50 UTC
*** Bug 428706 has been marked as a duplicate of this bug. ***