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

Yaroslav <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REPORTED                    |CONFIRMED
     Ever confirmed|0                           |1
                 CC|                            |[email protected]

--- Comment #2 from Yaroslav <[email protected]> ---
I can confirm this on a regular desktop, without containers. The trigger is
Steam, and I captured a backtrace of the freeze.

SOFTWARE/OS VERSIONS
Operating System: Bazzite 44 (ghcr.io/ublue-os/bazzite:stable, 44.20261012.1)
KDE Plasma Version: 6.7.5
KDE Frameworks Version: 6.31.0
Qt Version: 6.11.2
Kernel Version: 7.2.9-ogc3.1.fc44.x86_64 (64-bit)
Graphics Platform: Wayland
Graphics Processor: AMD Radeon RX 9060 XT

WHAT HAPPENS
Steam (an X11 client via XWayland) keeps the hostname it had at startup in
WM_CLIENT_MACHINE and does not update it. In my case NetworkManager changes the
transient hostname about 31 s after boot ("bazzite" -> "DESKTOP", from a
reverse address lookup), so Steam can end up with a name that no longer
resolves locally. Hovering Steam's top menu entries (each opens a short-lived
popup window) then freezes the session for several seconds, and the journal
shows "kwin_wayland: The main thread was hanging temporarily!".

VERIFICATION
    $ xprop WM_CLIENT_MACHINE        (click on the Steam window)
    WM_CLIENT_MACHINE(STRING) = "bazzite-pc"
    $ sudo hostnamectl set-hostname test-pc
    $ xprop WM_CLIENT_MACHINE
    WM_CLIENT_MACHINE(STRING) = "bazzite-pc"      <- still the old name

The lag returns immediately, and `resolvectl monitor` shows repeated A/AAAA
queries for "bazzite-pc" ending in not-found. `time getent hosts <name other
than the current hostname>` takes about 8 s here.

BACKTRACE
I sampled the kwin_wayland main thread with eu-stack roughly every 0.5 s for
~54 s while hovering Steam's tabs (80 samples, file attached). 39 samples show
the stack below; they come in about nine separate freezes of roughly 2.5-3 s
each. The rest of the samples are the idle event loop (ppoll), plus two single
samples in normal rendering waits.

    #0  __syscall_cancel_arch
    #1  __internal_syscall_cancel
    #2  __GI___futex_abstimed_wait_cancelable64
    #3  pthread_cond_wait@@GLIBC_2.3.2
    #4  QWaitCondition::wait(QMutex*, QDeadlineTimer)
    #5  QFutureInterfaceBase::waitForFinished()
    #6  KWin::GetAddrInfo::~GetAddrInfo()
    #7  KWin::GetAddrInfo::~GetAddrInfo()
    #8  QObjectPrivate::deleteChildren()
    #9  QObject::~QObject()
    #10 KWin::ClientMachine::~ClientMachine()
    #11 QObjectPrivate::deleteChildren()
    #12 QObject::~QObject()
    #13 KWin::X11Window::~X11Window()
    #14 KWin::WorkspaceScene::clearStackingOrder()
    #15 KWin::Compositor::composite(KWin::RenderLoop*)
    #16 doActivate<false>(QObject*, int, void**)
    #17 KWin::RenderLoop::frameRequested(KWin::RenderLoop*)
    (frames #18 and up: Qt timer and event loop up to main)

This is the same code path as in the description. So it is not limited to
containers: any X11 client whose WM_CLIENT_MACHINE doesn't resolve locally
triggers it, and Steam can end up in that state with a plain hostname change.

WORKAROUND
Set a static hostname before Steam starts (or restart Steam after the hostname
has settled).

Downstream report: https://github.com/ublue-os/bazzite/issues/4508

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

Reply via email to