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

            Bug ID: 504424
           Summary: Program running in xwayland from docker result in
                    kwin_wayland_drm: The main thread was hanging
                    temporarily!
    Classification: Plasma
           Product: kwin
      Version First 6.3.4
       Reported In:
          Platform: Compiled Sources
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: xwayland
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Running a xwayland program (in this situation it is the program is SmartGit)
inside a docker container, results in mini freeze of the ui. The log indicate
the main thread is hanging.

maj 17 17:30:35 xx kwin_wayland_wrapper[1242]: kwin_wayland_drm: The main
thread was hanging temporarily!
maj 17 17:30:35 xx kwin_wayland_wrapper[1242]: kwin_wayland_drm: The main
thread was hanging temporarily!
maj 17 17:30:39 xx kwin_wayland_wrapper[1242]: kwin_wayland_drm: The main
thread was hanging temporarily!
maj 17 17:30:39 xx kwin_wayland_wrapper[1242]: kwin_wayland_drm: The main
thread was hanging temporarily!
maj 17 17:30:55 x kwin_wayland_wrapper[1242]: kwin_wayland_drm: The main thread
was hanging temporarily!
maj 17 17:32:01 xx kwin_wayland_wrapper[1242]: kwin_wayland_drm: The main
thread was hanging temporarily!

Also notice the

kf.windowsystem: static bool KX11Extras::mapViewport() may only be used on X11

It might be related to a combination of amd gpu and also that the system is
connected to VPN using openconnect.

STEPS TO REPRODUCE
Create a docker container with SmartGit based on Ubuntu 24.04.
(apt install -y libswt-gtk-4-java dbus-x11 and install
https://downloads.syntevo.com/downloads/smartgit/smartgit-24_1_2.deb)

Start it up with something like:

 docker container run -t -i --privileged \
   --device /dev/net/tun:/dev/net/tun \
   --device /dev/dri:/dev/dri \
   -h smartgit \
   -v /tmp/.X11-unix:/tmp/.X11-unix \
   -v /run/dbus/system_bus_socket:/run/dbus/system_bus_socket:ro \
   -e DISPLAY=$DISPLAY \
   -e WAYLAND_DISPLAY=$WAYLAND_DISPLAY \
   -e GTK_THEME=Adwaita \

When starting smartgit inside the container it starts minifreeze the system.
Notice it was also described hear
https://forums.docker.com/t/xwayland-applications-mini-freeze/139182/4

I would expect that the SmartGit application run smooth, like if I start it
outside docker directly on plasma.

SOFTWARE/OS VERSIONS
from kinfo:
Operating System: Gentoo Linux 2.17
KDE Plasma Version: 6.3.4
KDE Frameworks Version: 6.13.0
Qt Version: 6.8.3
Kernel Version: 6.14.6-gentoo-FrostEyes (64-bit)
Graphics Platform: Wayland
Processors: 32 × AMD Ryzen 9 5950X 16-Core Processor
Memory: 125.7 GiB of RAM
Graphics Processor: AMD Radeon RX 570 Series

Extra information:

I tried to gdb -p /usr/bin/kwin_wayland $(pidof kwin_wayland) over SSH, and
then break when it hangs. It result it the following stack - don't know if it
relevant.

#0  0x00007f5f641f96a5 in ??? () at /usr/lib64/libc.so.6
#1  0x00007f5f641fc0f2 in pthread_cond_wait () at /usr/lib64/libc.so.6
#2  0x00007f5f6485a71b in QWaitCondition::wait(QMutex*, QDeadlineTimer) () at
/usr/lib64/libQt6Core.so.6
#3  0x00007f5f647c022f in QFutureInterfaceBase::waitForFinished() () at
/usr/lib64/libQt6Core.so.6
#4  0x00007f5f6707f7f2 in ??? () at /usr/lib64/libkwin.so.6
#5  0x00007f5f6707f82d in ??? () at /usr/lib64/libkwin.so.6
#6  0x00007f5f6491ac9d in QObjectPrivate::deleteChildren() () at
/usr/lib64/libQt6Core.so.6
#7  0x00007f5f6493fa39 in QObject::~QObject() () at /usr/lib64/libQt6Core.so.6
#8  0x00007f5f6707e938 in ??? () at /usr/lib64/libkwin.so.6
#9  0x00007f5f6491ac9d in QObjectPrivate::deleteChildren() () at
/usr/lib64/libQt6Core.so.6
#10 0x00007f5f6493fa39 in QObject::~QObject() () at /usr/lib64/libQt6Core.so.6
#11 0x00007f5f6734999d in KWin::X11Window::~X11Window() () at
/usr/lib64/libkwin.so.6
#12 0x00007f5f673270bc in KWin::X11Window::windowEvent(xcb_generic_event_t*) ()
at /usr/lib64/libkwin.so.6
#13 0x00007f5f67327c3f in KWin::Workspace::workspaceEvent(xcb_generic_event_t*)
() at /usr/lib64/libkwin.so.6
#14 0x00007f5f6497909f in
QAbstractEventDispatcher::filterNativeEvent(QByteArray const&, void*, long
long*) () at /usr/lib64/libQt6Core.so.6
#15 0x0000563c1368dffa in ??? ()
#16 0x00007f5f6495ee66 in ??? () at /usr/lib64/libQt6Core.so.6
#17 0x00007f5f64a05441 in QSocketNotifier::activated(QSocketDescriptor,
QSocketNotifier::Type, QSocketNotifier::QPrivateSignal) () at
/usr/lib64/libQt6Core.so.6
#18 0x00007f5f64a05c05 in QSocketNotifier::event(QEvent*) () at
/usr/lib64/libQt6Core.so.6
#19 0x00007f5f65bbf9e5 in QApplicationPrivate::notify_helper(QObject*, QEvent*)
() at /usr/lib64/libQt6Widgets.so.6
#20 0x00007f5f6497a4b0 in QCoreApplication::notifyInternal2(QObject*, QEvent*)
() at /usr/lib64/libQt6Core.so.6
#21 0x00007f5f64885556 in
QEventDispatcherUNIXPrivate::activateSocketNotifiers() () at
/usr/lib64/libQt6Core.so.6
#22 0x00007f5f64885a54 in
QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
at /usr/lib64/libQt6Core.so.6
#23 0x00007f5f652b25d1 in
QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
() at /usr/lib64/libQt6Gui.so.6
#24 0x00007f5f649a1da2 in
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at
/usr/lib64/libQt6Core.so.6
#25 0x00007f5f649a1f38 in QCoreApplication::exec() () at
/usr/lib64/libQt6Core.so.6
#26 0x0000563c136738ec in ??? ()
#27 0x00007f5f641913ee in ??? () at /usr/lib64/libc.so.6
#28 0x00007f5f641914a9 in __libc_start_main () at /usr/lib64/libc.so.6
#29 0x0000563c13675465 in ??? ()

Please let me know how I can debug it further?

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

Reply via email to