https://bugs.kde.org/show_bug.cgi?id=528849

            Bug ID: 528849
           Summary: KWin 6.8.2 crash-loops at startup on Intel 82G33 (i915
                    gen4): SIGSEGV, null OutputLayer in
                    DrmPipeline::setLayers() during initial CRTC
                    assignment
    Classification: Plasma
           Product: kwin
      Version First 6.8.2
       Reported In:
          Platform: Fedora RPMs
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: core
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Created attachment 198468
  --> https://bugs.kde.org/attachment.cgi?id=198468&action=edit
Core was generated by /usr/bin/kwin_wayland

On a single-GPU machine with an Intel 82G33/G31 Express iGPU (PCI 8086:29C2,
i915 gen4), logging into a Plasma Wayland session makes kwin_wayland crash
deterministically ~1 s after start (100% reproducible). KWin then crash-loops
(10+ restarts in seconds) until systemd’s start limit kills the session,
leaving the user at the SDDM login screen. DrKonqi cannot start either (no live
Wayland compositor to attach to).

The crash is a null pointer dereference: KWin::OutputLayer::setOutput() is
invoked with this == 0x0 — i.e. a null OutputLayer is present in the layer list
passed to DrmPipeline::setLayers().

Reproduced on:

    Fedora 45: kwin 6.8.2-3.fc45, Plasma 6.8.2, Qt 6.11.2, kernel
7.3.3-300.fc45, mesa 26.2.6
    Fedora 44 (updates): kwin 6.8.2-3.fc44, same stack otherwise

Upgrading F44 → F45 does not change anything (byte-identical backtrace, same
this=0x0).
#
STEPS TO REPRODUCE

    Single-GPU machine with Intel 82G33 (i915 gen4) — here: Dell Inspiron 530
(Core 2 Duo E4500), one VGA output (card0-VGA-1, connected)
    Log into a Plasma (Wayland) session via SDDM
    Watch kwin_wayland segfault ~1 s after start; systemd restarts it; it
segfaults again; repeats until the start limit stops the unit and the session
dies

#
OBSERVED RESULT

Crash loop, no desktop, SIGSEGV core each restart. Key frames (full searchable
backtrace attached):

#4  qt_ptr_swap<QtSharedPointer::ExternalRefCountData> (lhs=<error reading
variable: Cannot access memory at address 0xf0>, rhs=...) at
/usr/include/qt6/QtCore/qswap.h:30
#5  QWeakPointer<QObject>::swap (this=0xf0, other=...) at
/usr/include/qt6/QtCore/qsharedpointer_impl.h:668
#6  QWeakPointer<QObject>::operator= (this=0xf0, other=...) at
/usr/include/qt6/QtCore/qsharedpointer_impl.h:632
#7  QWeakPointer<QObject>::assign<QObject> (this=0xf0, ptr=0x5617e5a38830) at
/usr/include/qt6/QtCore/qsharedpointer_impl.h:770
#8  QPointer<KWin::BackendOutput>::operator= (this=0xf0, p=0x5617e5a38830) at
/usr/include/qt6/QtCore/qpointer.h:73
#9  KWin::OutputLayer::setOutput (this=0x0, output=0x5617e5a38830) at
src/core/outputlayer.cpp:47
#10 KWin::DrmPipeline::setLayers (this=0x5617e388e660, layers=...) at
src/backends/drm/drm_pipeline.cpp:676
#11 KWin::DrmGpu::assignOutputLayers (this=0x5617e5a7a420) at
src/backends/drm/drm_gpu.cpp:950
#12 KWin::DrmGpu::testPipelines (this=0x5617e5a7a420) at
src/backends/drm/drm_gpu.cpp:519
#13 KWin::DrmGpu::checkCrtcAssignment (this=0x5617e5a7a420, connectors=...,
crtcs=..., deadline=...) at src/backends/drm/drm_gpu.cpp:379
#14 KWin::DrmGpu::checkCrtcAssignment (this=0x5617e5a7a420, ...) at
src/backends/drm/drm_gpu.cpp:427
#15 KWin::DrmGpu::testPendingConfiguration (this=0x5617e5a7a420) at
src/backends/drm/drm_gpu.cpp:471
#16 KWin::DrmBackend::applyOutputChanges (this=0x5617e374a970, config=...)
#17 KWin::Workspace::applyOutputConfiguration (this=0x5617e5a75440, config=...)
at src/workspace.cpp:564
#18 KWin::Workspace::updateOutputConfiguration ()
#19 KWin::Workspace::slotOutputBackendOutputsQueried ()
#20 KWin::Workspace::init ()
#21 KWin::Application::createWorkspace ()
#22 KWin::ApplicationWayland::performStartup () at src/main_wayland.cpp:157
#23 main () at src/main_wayland.cpp:711


So DrmGpu::assignOutputLayers() (drm_gpu.cpp:950) produces a pipeline layer
list containing a null OutputLayer, and DrmPipeline::setLayers()
(drm_pipeline.cpp:676) calls setOutput() on it without a null check.
#
EXPECTED RESULT

KWin starts and the session comes up — or, at minimum, a clean error/fallback
instead of a null deref.
#
SOFTWARE/OS VERSIONS

    OS: Fedora 45 (also Fedora 44 with updates)
    KDE Plasma Version: 6.8.2
    KDE Frameworks Version: 6.31.0
    Qt Version: 6.11.2
    Kernel: 7.3.3-300.fc45
    Mesa: 26.2.6
    kwin: 6.8.2-3.fc45

#
ADDITIONAL INFORMATION

    Single GPU, single connected output (VGA). No external monitor, no
multi-GPU, nothing exotic.
    No i915 errors or GPU hangs in dmesg — pure userspace null deref.
    G33 predates Vulkan; the core shows lavapipe/zink software Vulkan drivers
loaded.
    100% reproducible on every login, on both F44 and F45, identical backtrace
(this=0x0 at outputlayer.cpp:47).

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to