NVIDIA / egl-wayland

The EGLStream-based Wayland external platform
MIT License
275 stars 43 forks source link

Qt apps freeze on master egl-wayland #111

Open roccodev opened 3 weeks ago

roccodev commented 3 weeks ago

A system update pulled @negativo17's snapshot of egl-wayland, which is based on 067e43d. With the snapshot, Plasma 6.0.5 and other Qt (6.7.1) apps would frequently hang on ioctl("/dev/dri/card1", DRM_IOCTL_SYNCOBJ_TIMELINE_WAIT). I'm not sure whether this is expected given that explicit sync support only ships with Plasma 6.1.

In Plasma's case, changing the Plasma theme from the system settings would make it work again momentarily.

The issue occurs on both 555.42.02 and 555.52.04 (and possibly older versions as well). Downgrading egl-wayland to 1.1.13-3.fc40 (which is based on the stable release) fixed the issue.

Here is a backtrace from a hung Plasma session:

0x00007ffff4726d2d in ioctl () from /lib64/libc.so.6
(gdb) bt
#0  0x00007ffff4726d2d in ioctl () at /lib64/libc.so.6
#1  0x00007fffe202af90 in drmIoctl () at /lib64/libdrm.so.2
#2  0x00007fffe202f68a in drmSyncobjTimelineWait () at /lib64/libdrm.so.2
#3  0x00007fffefd3037f in wlEglSwapBuffersWithDamageHook () at /lib64/libnvidia-egl-wayland.so.1
#4  0x00007fffe04a991e in ??? () at /lib64/libEGL_nvidia.so.0
#5  0x00007fffe0448270 in ??? () at /lib64/libEGL_nvidia.so.0
#6  0x00007fffefe5c213 in QtWaylandClient::QWaylandGLContext::swapBuffers(QPlatformSurface*) ()
    at /lib64/libQt6WaylandEglClientHwIntegration.so.6
#7  0x00007ffff59ba70d in QRhiGles2::endFrame(QRhiSwapChain*, QFlags<QRhi::EndFrameFlag>) () at /lib64/libQt6Gui.so.6
#8  0x00007ffff583385e in QRhi::endFrame(QRhiSwapChain*, QFlags<QRhi::EndFrameFlag>) () at /lib64/libQt6Gui.so.6
#9  0x00007ffff6b5b094 in QSGGuiThreadRenderLoop::renderWindow(QQuickWindow*) () at /lib64/libQt6Quick.so.6
#10 0x00007ffff6ab8eba in QQuickWindow::event(QEvent*) () at /lib64/libQt6Quick.so.6
#11 0x00007ffff718b168 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib64/libQt6Widgets.so.6
#12 0x00007ffff4d95b18 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib64/libQt6Core.so.6
#13 0x00007ffff5628dfa in QPlatformWindow::deliverUpdateRequest() () at /lib64/libQt6Gui.so.6
#14 0x00007ffff4debdeb in QObject::event(QEvent*) () at /lib64/libQt6Core.so.6
#15 0x00007ffff718b168 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib64/libQt6Widgets.so.6
#16 0x00007ffff4d95b18 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib64/libQt6Core.so.6
#17 0x00007ffff4d998c1 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /lib64/libQt6Core.so.6
#18 0x00007ffff507d39f in postEventSourceDispatch(_GSource*, int (*)(void*), void*) () at /lib64/libQt6Core.so.6
#19 0x00007ffff3abc6ac in g_main_context_dispatch_unlocked.lto_priv () at /lib64/libglib-2.0.so.0
#20 0x00007ffff3b1d708 in g_main_context_iterate_unlocked.isra () at /lib64/libglib-2.0.so.0
#21 0x00007ffff3abdb23 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#22 0x00007ffff507cb53 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /lib64/libQt6Core.so.6
#23 0x00007ffff4da2713 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt6Core.so.6
#24 0x00007ffff4d9e69c in QCoreApplication::exec() () at /lib64/libQt6Core.so.6
#25 0x0000555555582ea5 in main ()
amshafer commented 3 weeks ago

What kernel version is this with? ekurzinger fixed some issues with DRM_IOCTL_SYNCOBJ_TIMELINE_WAIT that iirc could cause some hangs like this.

roccodev commented 3 weeks ago

It occurred on both 6.8.7 and 6.8.11.

amshafer commented 3 weeks ago

Then you should have Erik's patches. Sounds like this is most likely related to https://bugs.kde.org/show_bug.cgi?id=487728 which we have a fix for on the way.