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

Sebastian Fischer <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #7 from Sebastian Fischer <[email protected]> ---
Created attachment 195147
  --> https://bugs.kde.org/attachment.cgi?id=195147&action=edit
Full backtrace, kwin 6.7.4, crash on multi-output hotplug

Still present in kwin 6.7.4 (Fedora 44, kwin-6.7.4-2.fc44), with a trigger that
differs from the reports so far: this one is not at boot or logon, but
mid-session on multi-output hotplug.

New trigger: powering on two external displays in quick succession

1. Plasma Wayland session running on the internal eDP panel only. Both external
monitors are already connected via USB-C DP alt mode, but powered off.
2. Power on both external monitors roughly a second apart, so kwin processes
two output hotplug events while page flips are in flight.
3. kwin_wayland crashes with SIGSEGV in DrmGpu::pageFlipHandler.

This is consistent with the mechanism described in comment 4 — a
duplicate/stale page-flip event is not specific to startup, it just happens
that startup is when output configuration churns most. Hotplug appears to be
another way to produce the same race.

Backtrace (crashing thread, with debuginfo; full thread apply all bt full
attached as kwin-crash-backtrace.txt)

#4  <signal handler called>
#5  0x00007f3b8c3e50a1 in std::vector<std::unique_ptr<KWin::DrmCommit>,
...>::size (this=<optimized out>)
    at /usr/include/c++/16/bits/stl_vector.h:1109
#6  std::__detail::__erase_if<std::vector<std::unique_ptr<KWin::DrmCommit>>,
...,
    KWin::DrmGpu::pageFlipHandler(int, unsigned int, unsigned int, unsigned
int, unsigned int, void*)::<lambda>>
    at /usr/include/c++/16/bits/erase_if.h:55
#7  std::erase_if<std::unique_ptr<KWin::DrmCommit>, ...> at
/usr/include/c++/16/vector:118
#8  KWin::DrmGpu::pageFlipHandler (fd=31, sequence=12652, sec=226, usec=637561,
crtc_id=95,
    user_data=0x7f3aa4003a30) at
/usr/src/debug/kwin-6.7.4-2.fc44.x86_64/src/backends/drm/drm_gpu.cpp:559
#9  0x00007f3b8a2dd795 in drmHandleEvent (fd=31, evctx=0x7ffc924fd5b0) at
../xf86drmMode.c:1070
#10 0x00007f3b8c3e45ac in KWin::DrmGpu::dispatchEvents (this=<optimized out>)
    at /usr/src/debug/kwin-6.7.4-2.fc44.x86_64/src/backends/drm/drm_gpu.cpp:594
#11 QtPrivate::QSlotObjectBase::call ... (Qt event dispatch, main thread)

Same frames and same source lines as the original report in comment 0
(drm_gpu.cpp:559 and :594, stl_vector.h:1109), despite that one being 6.7.1 and
this one 6.7.4.

Aftermath — why this is hard to recover from

The relaunched kwin_wayland could not bring the outputs back up:

  kwin_wayland[5745]: Atomic modeset commit failed! Invalid argument       
(x45)
  kernel: amdgpu 0000:06:00.0: [drm] Mode Validation Warning: Unknown Status
failed validation.   (x191, over ~30s)

The result was a black screen with a movable cursor. Terminating the session
with loginctl gave a fresh SDDM login but the same black screen; only a reboot
recovered.

Worth noting that the amdgpu log shows no link-training failure, no flip_done
timeout, no DMUB timeout and no GPU reset before the crash — the driver logged
nothing at all. The mode validation warnings start only after the crash, so
they look like a downstream symptom of the compositor restarting into an output
configuration it cannot apply, rather than a driver-side cause. (This differs
from bug 521653, where an amdgpu timeout preceded the crash.)

Environment

  kwin           6.7.4-2.fc44
  Qt             6.11.1-1.fc44
  KF6 (kcrash)   6.28.0-1.fc44
  Kernel         7.1.8-200.fc44.x86_64
  Mesa           26.1.6-1.fc44
  libdrm         2.4.134-1.fc44
  Distro         Fedora Linux 44, Plasma Wayland session
  Hardware       Lenovo ThinkPad T14s Gen 1 AMD (Renoir, DCN 2.1), amdgpu DC
3.2.378
  Displays       eDP internal;
                 Dell U3225QE 4K@120 (DSC) on USB-C port 1;
                 LG 31MU97 4096x2160 on USB-C port 2.
                 Two independent DP alt mode links, no dock, no MST.

Backport request

As far as I can tell, c37f4074 is only on master: it does not appear in the
v6.7.4 tag or on the Plasma/6.7 branch head (checked via the invent.kde.org API
— please correct me if I have got that wrong). Would it be possible to backport
it to Plasma/6.7? Distributions on 6.7.x are still hitting this, and given the
Sentry numbers in comment 2 it seems worth not waiting for 6.8.

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

Reply via email to