Bug 452572 - kwin_wayland crashes in KWin::GLRenderTarget::valid() when clicking on KScreen OSD
Summary: kwin_wayland crashes in KWin::GLRenderTarget::valid() when clicking on KScree...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (other bugs)
Version First Reported In: master
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-13 12:13 UTC by Nicolas Fella
Modified: 2022-04-22 16:19 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Fella 2022-04-13 12:13:40 UTC
After plugging in a second monitor the KScreen OSD appeared. After I clicked on that kwin crashesd

 #0  0x00007fb1d07b24dc in KWin::GLRenderTarget::valid() const (this=0xd) at /home/nico/kde/src/kwin/src/libkwineffects/kwinglutils.h:424
#1  KWin::GLRenderTarget::bind() (this=0xd) at /home/nico/kde/src/kwin/src/libkwineffects/kwinglutils.cpp:1031
#2  0x00007fb1d07b596e in KWin::GLRenderTarget::popRenderTarget() () at /home/nico/kde/src/kwin/src/libkwineffects/kwinglutils.cpp:993
#3  KWin::GLRenderTarget::popRenderTarget() () at /home/nico/kde/src/kwin/src/libkwineffects/kwinglutils.cpp:989
#4  0x00007fb1c8baa4c9 in KWin::EglGbmLayer::endFrame(QRegion const&, QRegion const&) (this=0x20c50d0, renderedRegion=<optimized out>, damagedRegion=...) at /home/nico/kde/src/kwin/src/backends/drm/egl_gbm_layer.cpp:143
#5  0x00007fb1c8ba8e0d in KWin::EglGbmLayer::renderTestBuffer() (this=this@entry=0x20c50d0) at /home/nico/kde/src/kwin/src/backends/drm/egl_gbm_layer.cpp:187
#6  0x00007fb1c8ba96f4 in KWin::EglGbmLayer::testBuffer() (this=0x20c50d0) at /home/nico/kde/src/kwin/src/backends/drm/egl_gbm_layer.cpp:174
#7  0x00007fb1c8b9fd6c in KWin::DrmPipeline::commitPipelinesAtomic(QVector<KWin::DrmPipeline*> const&, KWin::DrmPipeline::CommitMode, QVector<KWin::DrmObject*> const&) (pipelines=..., mode=mode@entry=KWin::DrmPipeline::CommitMode::Test, unusedObjects=...)
    at /home/nico/kde/src/kwin/src/backends/drm/drm_pipeline.cpp:116
#8  0x00007fb1c8ba0c74 in KWin::DrmPipeline::commitPipelines(QVector<KWin::DrmPipeline*> const&, KWin::DrmPipeline::CommitMode, QVector<KWin::DrmObject*> const&) (pipelines=..., mode=mode@entry=KWin::DrmPipeline::CommitMode::Test, unusedObjects=...)
    at /home/nico/kde/src/kwin/src/backends/drm/drm_pipeline.cpp:88
#9  0x00007fb1c8b974fd in KWin::DrmGpu::testPipelines() (this=this@entry=0x1e5a0b0) at /home/nico/kde/src/kwin/src/backends/drm/drm_gpu.cpp:440
#10 0x00007fb1c8b97775 in KWin::DrmGpu::checkCrtcAssignment(QVector<KWin::DrmConnector*>, QVector<KWin::DrmCrtc*> const&) (this=this@entry=0x1e5a0b0, connectors=..., crtcs=...) at /home/nico/kde/src/kwin/src/backends/drm/drm_gpu.cpp:345
#11 0x00007fb1c8b97c4e in KWin::DrmGpu::checkCrtcAssignment(QVector<KWin::DrmConnector*>, QVector<KWin::DrmCrtc*> const&) (this=this@entry=0x1e5a0b0, connectors=..., crtcs=...) at /home/nico/kde/src/kwin/src/backends/drm/drm_gpu.cpp:352
#12 0x00007fb1c8b97e96 in KWin::DrmGpu::checkCrtcAssignment(QVector<KWin::DrmConnector*>, QVector<KWin::DrmCrtc*> const&) (this=this@entry=0x1e5a0b0, connectors=..., crtcs=...) at /home/nico/kde/src/kwin/src/backends/drm/drm_gpu.cpp:366
#13 0x00007fb1c8b98469 in operator() (__closure=<optimized out>) at /home/nico/kde/src/kwin/src/backends/drm/drm_gpu.cpp:408
#14 operator() (__closure=<optimized out>) at /home/nico/kde/src/kwin/src/backends/drm/drm_gpu.cpp:406
#15 KWin::DrmGpu::testPendingConfiguration(KWin::DrmGpu::TestMode) (this=0x1e5a0b0, mode=mode@entry=KWin::DrmGpu::TestMode::TestWithCrtcReallocation) at /home/nico/kde/src/kwin/src/backends/drm/drm_gpu.cpp:413
#16 0x00007fb1c8b7d3cc in KWin::DrmBackend::applyOutputChanges(KWin::WaylandOutputConfig const&) (this=0x1e1b280, config=...) at /home/nico/kde/src/kwin/src/backends/drm/drm_backend.cpp:658
#17 0x00007fb1d09e5831 in KWin::Platform::requestOutputsChange(KWaylandServer::OutputConfigurationV2Interface*) (this=0x1e1b280, config=0x2b1dfd0) at /home/nico/kde/src/kwin/src/platform.cpp:139
#18 0x00007fb1ced9cb9d in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7fff0bd35230, r=0x1e08370, this=0x1e3af40) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#19 doActivate<false>(QObject*, int, void**) (sender=0x1e3ae10, signal_index=3, argv=0x7fff0bd35230) at kernel/qobject.cpp:3886
#20 0x00007fb1ced9657f in QMetaObject::activate(QObject*, QMetaObject const*, int, void**)
    (sender=<optimized out>, m=m@entry=0x7fb1cfb6c9c0 <KWaylandServer::OutputManagementV2Interface::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fff0bd35230) at kernel/qobject.cpp:3946
#21 0x00007fb1cfa18bef in KWaylandServer::OutputManagementV2Interface::configurationChangeRequested(KWaylandServer::OutputConfigurationV2Interface*) (this=<optimized out>, _t1=<optimized out>)
    at /home/nico/kde/build/kwayland-server/src/server/KWaylandServer_autogen/EWIEGA46WW/moc_outputmanagement_v2_interface.cpp:136
#22 0x00007fb1ccb6c572 in ffi_call_unix64 () at ../src/x86/unix64.S:105
#23 0x00007fb1ccb69296 in ffi_call_int (cif=<optimized out>, fn=<optimized out>, rvalue=<optimized out>, avalue=<optimized out>, closure=<optimized out>) at ../src/x86/ffi64.c:672
#24 0x00007fb1cf980090 in wl_closure_invoke (closure=closure@entry=0x29469f0, target=<optimized out>, target@entry=0x2fa51f0, opcode=opcode@entry=5, data=<optimized out>, data@entry=0x22a46d0, flags=<optimized out>) at ../src/connection.c:1025
#25 0x00007fb1cf984234 in wl_client_connection_data (fd=<optimized out>, mask=<optimized out>, data=0x22a46d0) at ../src/wayland-server.c:437
#26 0x00007fb1cf982cea in wl_event_loop_dispatch (loop=0x1e0aff0, timeout=<optimized out>) at ../src/event-loop.c:1027
#27 0x00007fb1cfa2a7d8 in KWaylandServer::Display::dispatchEvents() (this=<optimized out>) at /home/nico/kde/src/kwayland-server/src/server/display.cpp:114
#28 0x00007fb1ced9cb9d in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7fff0bd35a60, r=0x1e2d0d0, this=0x243fa60) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#29 doActivate<false>(QObject*, int, void**) (sender=0x22b34e0, signal_index=3, argv=0x7fff0bd35a60) at kernel/qobject.cpp:3886
#30 0x00007fb1ced9657f in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=sender@entry=0x22b34e0, m=m@entry=0x7fb1cf03e160 <QSocketNotifier::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fff0bd35a60)
    at kernel/qobject.cpp:3946
#31 0x00007fb1ced9feaf in QSocketNotifier::activated(QSocketDescriptor, QSocketNotifier::Type, QSocketNotifier::QPrivateSignal) (this=this@entry=0x22b34e0, _t1=..., _t2=<optimized out>, _t3=...) at .moc/moc_qsocketnotifier.cpp:178
#32 0x00007fb1ceda05ab in QSocketNotifier::event(QEvent*) (this=0x22b34e0, e=0x7fff0bd35b70) at kernel/qsocketnotifier.cpp:302
#33 0x00007fb1cddb8a3f in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x22b34e0, e=0x7fff0bd35b70) at kernel/qapplication.cpp:3637
#34 0x00007fb1ced688ca in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x22b34e0, event=0x7fff0bd35b70) at kernel/qcoreapplication.cpp:1064
#35 0x00007fb1cedb997b in QEventDispatcherUNIXPrivate::activateSocketNotifiers() (this=0x1e081c0) at kernel/qeventdispatcher_unix.cpp:304
#36 0x00007fb1cedb9dbb in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=<optimized out>, flags=...) at kernel/qeventdispatcher_unix.cpp:511
#37 0x000000000054484d in QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=<optimized out>, flags=...) at qunixeventdispatcher.cpp:63
#38 0x00007fb1ced6744b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fff0bd35ce0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#39 0x00007fb1ced6f09c in QCoreApplication::exec() () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#40 0x00007fb1cf18d45c in QGuiApplication::exec() () at kernel/qguiapplication.cpp:1867
#41 0x00007fb1cddb89b5 in QApplication::exec() () at kernel/qapplication.cpp:2829
#42 0x000000000044bf53 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /home/nico/kde/src/kwin/src/main_wayland.cpp:659

last kwin commit is 7358daa92c73e41b2b659702c49ca2cdfb8b2f87
Comment 1 Nicolas Fella 2022-04-13 12:23:23 UTC
Also reproducible with fresher master (e3fe69041f2b1cc8a8c232123d2a54a0e8ba93ba)

#0  0x00007f00e84324dc in KWin::GLFramebuffer::valid() const (this=0xd) at /home/nico/kde/src/kwin/src/libkwineffects/kwinglutils.h:424
#1  KWin::GLFramebuffer::bind() (this=0xd) at /home/nico/kde/src/kwin/src/libkwineffects/kwinglutils.cpp:1031
#2  0x00007f00e843596e in KWin::GLFramebuffer::popFramebuffer() () at /home/nico/kde/src/kwin/src/libkwineffects/kwinglutils.cpp:993
#3  KWin::GLFramebuffer::popFramebuffer() () at /home/nico/kde/src/kwin/src/libkwineffects/kwinglutils.cpp:989
#4  0x00007f00e082a699 in KWin::EglGbmLayer::endFrame(QRegion const&, QRegion const&) (this=0x2a2f190, renderedRegion=<optimized out>, damagedRegion=...) at /home/nico/kde/src/kwin/src/backends/drm/egl_gbm_layer.cpp:146
#5  0x00007f00e0828fcf in KWin::EglGbmLayer::renderTestBuffer() (this=this@entry=0x2a2f190) at /home/nico/kde/src/kwin/src/backends/drm/egl_gbm_layer.cpp:190
#6  0x00007f00e08298c4 in KWin::EglGbmLayer::testBuffer() (this=0x2a2f190) at /home/nico/kde/src/kwin/src/backends/drm/egl_gbm_layer.cpp:177
#7  0x00007f00e081ff5c in KWin::DrmPipeline::commitPipelinesAtomic(QVector<KWin::DrmPipeline*> const&, KWin::DrmPipeline::CommitMode, QVector<KWin::DrmObject*> const&) (pipelines=..., mode=mode@entry=KWin::DrmPipeline::CommitMode::Test, unusedObjects=...)
    at /home/nico/kde/src/kwin/src/backends/drm/drm_pipeline.cpp:116
#8  0x00007f00e0820e64 in KWin::DrmPipeline::commitPipelines(QVector<KWin::DrmPipeline*> const&, KWin::DrmPipeline::CommitMode, QVector<KWin::DrmObject*> const&) (pipelines=..., mode=mode@entry=KWin::DrmPipeline::CommitMode::Test, unusedObjects=...)
    at /home/nico/kde/src/kwin/src/backends/drm/drm_pipeline.cpp:88
#9  0x00007f00e0817609 in KWin::DrmGpu::testPipelines() (this=this@entry=0x2327ce0) at /home/nico/kde/src/kwin/src/backends/drm/drm_gpu.cpp:451
#10 0x00007f00e08177a5 in KWin::DrmGpu::checkCrtcAssignment(QVector<KWin::DrmConnector*>, QVector<KWin::DrmCrtc*> const&) (this=this@entry=0x2327ce0, connectors=..., crtcs=...) at /home/nico/kde/src/kwin/src/backends/drm/drm_gpu.cpp:359
#11 0x00007f00e0817ec6 in KWin::DrmGpu::checkCrtcAssignment(QVector<KWin::DrmConnector*>, QVector<KWin::DrmCrtc*> const&) (this=this@entry=0x2327ce0, connectors=..., crtcs=...) at /home/nico/kde/src/kwin/src/backends/drm/drm_gpu.cpp:380
#12 0x00007f00e0817c7e in KWin::DrmGpu::checkCrtcAssignment(QVector<KWin::DrmConnector*>, QVector<KWin::DrmCrtc*> const&) (this=this@entry=0x2327ce0, connectors=..., crtcs=...) at /home/nico/kde/src/kwin/src/backends/drm/drm_gpu.cpp:366
#13 0x00007f00e0818499 in operator() (__closure=<optimized out>) at /home/nico/kde/src/kwin/src/backends/drm/drm_gpu.cpp:422
#14 operator() (__closure=<optimized out>) at /home/nico/kde/src/kwin/src/backends/drm/drm_gpu.cpp:420
#15 KWin::DrmGpu::testPendingConfiguration(KWin::DrmGpu::TestMode) (this=0x2327ce0, mode=mode@entry=KWin::DrmGpu::TestMode::TestWithCrtcReallocation) at /home/nico/kde/src/kwin/src/backends/drm/drm_gpu.cpp:427
#16 0x00007f00e07fd3fc in KWin::DrmBackend::applyOutputChanges(KWin::WaylandOutputConfig const&) (this=0x229f940, config=...) at /home/nico/kde/src/kwin/src/backends/drm/drm_backend.cpp:658
#17 0x00007f00e8664851 in KWin::Platform::requestOutputsChange(KWaylandServer::OutputConfigurationV2Interface*) (this=0x229f940, config=0x306e160) at /home/nico/kde/src/kwin/src/platform.cpp:139
#18 0x00007f00e6a1cb9d in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7fff36551ae0, r=0x22d6790, this=0x2308e90) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#19 doActivate<false>(QObject*, int, void**) (sender=0x2308d60, signal_index=3, argv=0x7fff36551ae0) at kernel/qobject.cpp:3886
#20 0x00007f00e6a1657f in QMetaObject::activate(QObject*, QMetaObject const*, int, void**)
    (sender=<optimized out>, m=m@entry=0x7f00e77ec9c0 <KWaylandServer::OutputManagementV2Interface::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fff36551ae0) at kernel/qobject.cpp:3946
#21 0x00007f00e7698bef in KWaylandServer::OutputManagementV2Interface::configurationChangeRequested(KWaylandServer::OutputConfigurationV2Interface*) (this=<optimized out>, _t1=<optimized out>)
    at /home/nico/kde/build/kwayland-server/src/server/KWaylandServer_autogen/EWIEGA46WW/moc_outputmanagement_v2_interface.cpp:136
#22 0x00007f00e47ec572 in ffi_call_unix64 () at ../src/x86/unix64.S:105
#23 0x00007f00e47e9296 in ffi_call_int (cif=<optimized out>, fn=<optimized out>, rvalue=<optimized out>, avalue=<optimized out>, closure=<optimized out>) at ../src/x86/ffi64.c:672
#24 0x00007f00e7600090 in wl_closure_invoke (closure=closure@entry=0x290fd80, target=<optimized out>, target@entry=0x29bae50, opcode=opcode@entry=5, data=<optimized out>, data@entry=0x2f3c420, flags=<optimized out>) at ../src/connection.c:1025
#25 0x00007f00e7604234 in wl_client_connection_data (fd=<optimized out>, mask=<optimized out>, data=0x2f3c420) at ../src/wayland-server.c:437
#26 0x00007f00e7602cea in wl_event_loop_dispatch (loop=0x22dbbf0, timeout=<optimized out>) at ../src/event-loop.c:1027
#27 0x00007f00e76aa7d8 in KWaylandServer::Display::dispatchEvents() (this=<optimized out>) at /home/nico/kde/src/kwayland-server/src/server/display.cpp:114
#28 0x00007f00e6a1cb9d in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7fff36552310, r=0x22fb220, this=0x28ae5f0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#29 doActivate<false>(QObject*, int, void**) (sender=0x292c300, signal_index=3, argv=0x7fff36552310) at kernel/qobject.cpp:3886
#30 0x00007f00e6a1657f in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=sender@entry=0x292c300, m=m@entry=0x7f00e6cbe160 <QSocketNotifier::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fff36552310)
    at kernel/qobject.cpp:3946
#31 0x00007f00e6a1feaf in QSocketNotifier::activated(QSocketDescriptor, QSocketNotifier::Type, QSocketNotifier::QPrivateSignal) (this=this@entry=0x292c300, _t1=..., _t2=<optimized out>, _t3=...) at .moc/moc_qsocketnotifier.cpp:178
#32 0x00007f00e6a205ab in QSocketNotifier::event(QEvent*) (this=0x292c300, e=0x7fff36552420) at kernel/qsocketnotifier.cpp:302
#33 0x00007f00e5a38a3f in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x292c300, e=0x7fff36552420) at kernel/qapplication.cpp:3637
#34 0x00007f00e69e88ca in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x292c300, event=0x7fff36552420) at kernel/qcoreapplication.cpp:1064
#35 0x00007f00e6a3997b in QEventDispatcherUNIXPrivate::activateSocketNotifiers() (this=0x22d65e0) at kernel/qeventdispatcher_unix.cpp:304
#36 0x00007f00e6a39dbb in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=<optimized out>, flags=...) at kernel/qeventdispatcher_unix.cpp:511
#37 0x00000000005448bd in QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=<optimized out>, flags=...) at qunixeventdispatcher.cpp:63
#38 0x00007f00e69e744b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fff36552590, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#39 0x00007f00e69ef09c in QCoreApplication::exec() () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#40 0x00007f00e6e0d45c in QGuiApplication::exec() () at kernel/qguiapplication.cpp:1867
#41 0x00007f00e5a389b5 in QApplication::exec() () at kernel/qapplication.cpp:2829
#42 0x000000000044bf53 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /home/nico/kde/src/kwin/src/main_wayland.cpp:659
Comment 2 Marco Martin 2022-04-19 14:20:23 UTC
This code has changed a lot lately.
can you test again if still happens?
(and if it does the backtraces would probably be a bit different, which would be useful to have here)
Comment 3 Nicolas Fella 2022-04-19 16:28:21 UTC
Still reproducible with cc6b5491129db24227273fa9d44bbd183834bafb


#0  0x00007f7e772aea7c in KWin::GLFramebuffer::valid() const (this=<optimized out>) at /home/nico/kde/src/kwin/src/libkwineffects/kwinglutils.h:424
#1  KWin::GLFramebuffer::bind() (this=0xd) at /home/nico/kde/src/kwin/src/libkwineffects/kwinglutils.cpp:1031
#2  0x00007f7e772b210e in KWin::GLFramebuffer::popFramebuffer() () at /home/nico/kde/src/kwin/src/libkwineffects/kwinglutils.cpp:993
#3  KWin::GLFramebuffer::popFramebuffer() () at /home/nico/kde/src/kwin/src/libkwineffects/kwinglutils.cpp:989
#4  0x00007f7e6e322f87 in KWin::EglGbmLayerSurface::endRendering(QFlags<KWin::DrmPlane::Transformation>, QRegion const&) (this=this@entry=0x55a91de3be78, renderTransform=..., damagedRegion=...)
    at /home/nico/kde/src/kwin/src/backends/drm/egl_gbm_layer_surface.cpp:135
#5  0x00007f7e6e319a96 in KWin::EglGbmLayer::endFrame(QRegion const&, QRegion const&) (this=this@entry=0x55a91de3be30, renderedRegion=..., damagedRegion=...) at /home/nico/kde/src/kwin/src/backends/drm/egl_gbm_layer.cpp:67
#6  0x00007f7e6e319d5f in KWin::EglGbmLayer::renderTestBuffer() (this=this@entry=0x55a91de3be30) at /home/nico/kde/src/kwin/src/backends/drm/egl_gbm_layer.cpp:91
#7  0x00007f7e6e31a675 in KWin::EglGbmLayer::testBuffer() (this=0x55a91de3be30) at /home/nico/kde/src/kwin/src/backends/drm/egl_gbm_layer.cpp:81
#8  0x00007f7e6e312914 in KWin::DrmPipeline::commitPipelinesAtomic(QVector<KWin::DrmPipeline*> const&, KWin::DrmPipeline::CommitMode, QVector<KWin::DrmObject*> const&)
    (pipelines=..., mode=mode@entry=KWin::DrmPipeline::CommitMode::Test, unusedObjects=...) at /home/nico/kde/src/kwin/src/backends/drm/drm_pipeline.cpp:116
#9  0x00007f7e6e313844 in KWin::DrmPipeline::commitPipelines(QVector<KWin::DrmPipeline*> const&, KWin::DrmPipeline::CommitMode, QVector<KWin::DrmObject*> const&)
    (pipelines=..., mode=mode@entry=KWin::DrmPipeline::CommitMode::Test, unusedObjects=...) at /home/nico/kde/src/kwin/src/backends/drm/drm_pipeline.cpp:88
#10 0x00007f7e6e309ea9 in KWin::DrmGpu::testPipelines() (this=this@entry=0x55a91cb48a20) at /home/nico/kde/src/kwin/src/backends/drm/drm_gpu.cpp:444
#11 0x00007f7e6e30a09d in KWin::DrmGpu::checkCrtcAssignment(QVector<KWin::DrmConnector*>, QVector<KWin::DrmCrtc*> const&) (this=this@entry=0x55a91cb48a20, connectors=..., crtcs=...) at /home/nico/kde/src/kwin/src/backends/drm/drm_gpu.cpp:359
#12 0x00007f7e6e30a7c6 in KWin::DrmGpu::checkCrtcAssignment(QVector<KWin::DrmConnector*>, QVector<KWin::DrmCrtc*> const&) (this=this@entry=0x55a91cb48a20, connectors=..., crtcs=...) at /home/nico/kde/src/kwin/src/backends/drm/drm_gpu.cpp:380
#13 0x00007f7e6e30a57e in KWin::DrmGpu::checkCrtcAssignment(QVector<KWin::DrmConnector*>, QVector<KWin::DrmCrtc*> const&) (this=this@entry=0x55a91cb48a20, connectors=..., crtcs=...) at /home/nico/kde/src/kwin/src/backends/drm/drm_gpu.cpp:366
#14 0x00007f7e6e30abce in KWin::DrmGpu::testPendingConfiguration() (this=0x55a91cb48a20) at /home/nico/kde/src/kwin/src/backends/drm/drm_gpu.cpp:420
#15 0x00007f7e6e2ef767 in KWin::DrmBackend::applyOutputChanges(KWin::OutputConfiguration const&) (this=0x55a91cb34de0, config=...) at /home/nico/kde/src/kwin/src/backends/drm/drm_backend.cpp:658
#16 0x00007f7e774e8b72 in KWin::Platform::requestOutputsChange(KWaylandServer::OutputConfigurationV2Interface*) (this=0x55a91cb34de0, config=0x55a91de1e470) at /home/nico/kde/src/kwin/src/platform.cpp:132
#17 0x00007f7e75670203 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7ffd725d8220, r=0x55a91cad49e0, this=0x55a91cb2bba0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#18 doActivate<false>(QObject*, int, void**) (sender=0x55a91cb2ba70, signal_index=3, argv=0x7ffd725d8220) at kernel/qobject.cpp:3886
#19 0x00007f7e762ddb82 in KWaylandServer::OutputManagementV2Interface::configurationChangeRequested(KWaylandServer::OutputConfigurationV2Interface*) (this=0x55a91cb2ba70, _t1=0x55a91de1e470)
    at /home/nico/kde/build/kwayland-server/src/server/KWaylandServer_autogen/EWIEGA46WW/moc_outputmanagement_v2_interface.cpp:136
#20 0x00007f7e7632c4ab in KWaylandServer::OutputConfigurationV2InterfacePrivate::emitConfigurationChangeRequested() const (this=0x55a91de0e970) at /home/nico/kde/src/kwayland-server/src/server/outputconfiguration_v2_interface.cpp:183
#21 0x00007f7e7632c066 in KWaylandServer::OutputConfigurationV2InterfacePrivate::kde_output_configuration_v2_apply(QtWaylandServer::kde_output_configuration_v2::Resource*) (this=0x55a91de0e970, resource=0x55a91de1e520)
    at /home/nico/kde/src/kwayland-server/src/server/outputconfiguration_v2_interface.cpp:128
#22 0x00007f7e763bca38 in QtWaylandServer::kde_output_configuration_v2::handle_apply(wl_client*, wl_resource*) (client=0x55a91dada7f0, resource=0x55a91dcaee50)
    at /home/nico/kde/build/kwayland-server/src/server/qwayland-server-kde-output-management-v2.cpp:572
#23 0x00007f7e72d95d4a in  () at /usr/lib/libffi.so.8
#24 0x00007f7e72d95267 in  () at /usr/lib/libffi.so.8
#25 0x00007f7e7624aaf2 in  () at /usr/lib/libwayland-server.so.0
#26 0x00007f7e7624ee14 in  () at /usr/lib/libwayland-server.so.0
#27 0x00007f7e7624d84a in wl_event_loop_dispatch () at /usr/lib/libwayland-server.so.0
#28 0x00007f7e762fee06 in KWaylandServer::Display::dispatchEvents() (this=0x55a91cb23fe0) at /home/nico/kde/src/kwayland-server/src/server/display.cpp:114
#29 0x00007f7e763038b5 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (KWaylandServer::Display::*)()>::call(void (KWaylandServer::Display::*)(), KWaylandServer::Display*, void**)
    (f=(void (KWaylandServer::Display::*)(KWaylandServer::Display * const)) 0x7f7e762fedca <KWaylandServer::Display::dispatchEvents()>, o=0x55a91cb23fe0, arg=0x7ffd725d8bb0) at /home/nico/kde/usr/include/QtCore/qobjectdefs_impl.h:152
#30 0x00007f7e7630363d in QtPrivate::FunctionPointer<void (KWaylandServer::Display::*)()>::call<QtPrivate::List<>, void>(void (KWaylandServer::Display::*)(), KWaylandServer::Display*, void**)
    (f=(void (KWaylandServer::Display::*)(KWaylandServer::Display * const)) 0x7f7e762fedca <KWaylandServer::Display::dispatchEvents()>, o=0x55a91cb23fe0, arg=0x7ffd725d8bb0) at /home/nico/kde/usr/include/QtCore/qobjectdefs_impl.h:185
#31 0x00007f7e76302973 in QtPrivate::QSlotObject<void (KWaylandServer::Display::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
    (which=1, this_=0x55a91ce03f80, r=0x55a91cb23fe0, a=0x7ffd725d8bb0, ret=0x0) at /home/nico/kde/usr/include/QtCore/qobjectdefs_impl.h:418
#32 0x00007f7e75670203 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7ffd725d8bb0, r=0x55a91cb23fe0, this=0x55a91ce03f80) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#33 doActivate<false>(QObject*, int, void**) (sender=0x55a91cf5cb70, signal_index=3, argv=0x7ffd725d8bb0) at kernel/qobject.cpp:3886
#34 0x00007f7e756696cf in QMetaObject::activate(QObject*, QMetaObject const*, int, void**)
    (sender=sender@entry=0x55a91cf5cb70, m=m@entry=0x7f7e75910120 <QSocketNotifier::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7ffd725d8bb0) at kernel/qobject.cpp:3946
#35 0x00007f7e756736ef in QSocketNotifier::activated(QSocketDescriptor, QSocketNotifier::Type, QSocketNotifier::QPrivateSignal) (this=this@entry=0x55a91cf5cb70, _t1=..., _t2=<optimized out>, _t3=...) at .moc/moc_qsocketnotifier.cpp:178
#36 0x00007f7e75673eeb in QSocketNotifier::event(QEvent*) (this=0x55a91cf5cb70, e=0x7ffd725d8cd0) at kernel/qsocketnotifier.cpp:302
#37 0x00007f7e7436469f in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x55a91cf5cb70, e=0x7ffd725d8cd0) at kernel/qapplication.cpp:3637
#38 0x00007f7e75639a0a in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x55a91cf5cb70, event=0x7ffd725d8cd0) at kernel/qcoreapplication.cpp:1064
#39 0x00007f7e7568e47b in QEventDispatcherUNIXPrivate::activateSocketNotifiers() (this=0x55a91cacd530) at kernel/qeventdispatcher_unix.cpp:304
Comment 4 Zamundaaa 2022-04-21 15:16:58 UTC
I managed to reproduce this while testing hardware rotation. Somehow KWin fails to create a gbm surface, which the code is not properly guarded against. The backend should now be fixed with https://invent.kde.org/plasma/kwin/-/merge_requests/2271, and with a few more checks in the compositor we can make KWin completely handle that properly.
Why creating a surface fails in the first place though is not clear yet
Comment 5 Zamundaaa 2022-04-22 16:19:50 UTC
Git commit 941bae2810a13e3483b217133e475da12b0949f2 by Xaver Hugl.
Committed on 22/04/2022 at 15:17.
Pushed by zamundaaa into branch 'master'.

backends/drm: fail atomic tests gracefully when buffer allocations fail

This should fix the crash. However, it's still unclear to me why allocations
fail in the first place

M  +1    -6    src/backends/drm/drm_layer.h
M  +2    -2    src/backends/drm/drm_lease_egl_gbm_layer.cpp
M  +1    -1    src/backends/drm/drm_lease_egl_gbm_layer.h
M  +1    -1    src/backends/drm/drm_pipeline.cpp
M  +1    -1    src/backends/drm/drm_pipeline_legacy.cpp
M  +4    -4    src/backends/drm/drm_qpainter_layer.cpp
M  +2    -2    src/backends/drm/drm_qpainter_layer.h
M  +8    -23   src/backends/drm/egl_gbm_layer.cpp
M  +1    -5    src/backends/drm/egl_gbm_layer.h
M  +38   -15   src/backends/drm/egl_gbm_layer_surface.cpp
M  +2    -0    src/backends/drm/egl_gbm_layer_surface.h

https://invent.kde.org/plasma/kwin/commit/941bae2810a13e3483b217133e475da12b0949f2
Comment 6 Zamundaaa 2022-04-22 16:19:58 UTC
Git commit 99761901ee074f4c03ac0810a825eff2b2aa07c8 by Xaver Hugl.
Committed on 22/04/2022 at 15:17.
Pushed by zamundaaa into branch 'master'.

backends/drm: don't check the test buffer if we don't need one

M  +1    -1    src/backends/drm/drm_pipeline.cpp

https://invent.kde.org/plasma/kwin/commit/99761901ee074f4c03ac0810a825eff2b2aa07c8