I am reporting a probable bug inside glXWaitVideoSyncSGI() that belongs to GLX_SGI_video_sync extension on Linux.
Symptoms: Application freezes. Usually immediately, sometimes after some number of rendered frames, sometimes window resize is needed to trigger it. Sometimes whole X gets frozen.
gdb backtrace of the frozen application:
#0 0x00007f170f1ee3b0 in __poll_nocancel () at …/sysdeps/unix/syscall-template.S:81
#1 0x00007f170fd9090d in ?? () from /usr/lib/nvidia-313-updates/libGL.so.1
#2 0x00007f170baa6e93 in ?? () from /usr/lib/nvidia-313-updates/libnvidia-glcore.so.313.30
#3 0x00007f170fd5e874 in glXWaitVideoSyncSGI () from /usr/lib/nvidia-313-updates/libGL.so.1
#4 0x00007f1711237e82 in QGLContext::swapBuffers (this=) at qgl_x11.cpp:976
#5 0x0000000000404f4a in GLWidget::mouseMoveEvent(QMouseEvent*) ()
#6 0x00007f17106f9abb in QWidget::event (this=this@entry=0x1bc8cb0, event=event@entry=0x7fff2da97bc0) at kernel/qwidget.cpp:8360
#7 0x00007f17111c2c68 in QGLWidget::event (this=0x1bc8cb0, e=0x7fff2da97bc0) at qgl.cpp:4407
#8 0x00007f17106ac8ec in QApplicationPrivate::notify_helper (this=this@entry=0x1b39200, receiver=receiver@entry=0x1bc8cb0, e=e@entry=0x7fff2da97bc0)
Steps to reproduce:
I used Qt’s HelloGL example. Hm, I do not see a way to attach it to post. So, it is available in Qt sourses in the folder examples\opengl\hellogl . I used Qt version 4.8.4 .
Then, I changed the constructor of GLWidget to use v-sync:
f.setSwapInterval(1); // this triggers the problem
: QGLWidget(getMyFormat(), parent)
After running of the application, the application freezes inside glXWaitVideoSyncSGI() in a second. Sometimes, it runs correctly and the problem appears after the window resize. Exactly the same problem appears in our production applications.
Further investigation showed that the problem disappears if I uncheck “Sync to VBlank” in NVIDIA X Server Settings. If I check it once again, the problem appears again, usually with immediate application freezes (after the computer restart, the freezes are sometimes not so quick).
I am using Kubuntu 13.04 64bit with window composition turned on, Qt version 4.8.4, with Quadro K1000M and 313.30 Nvidia drivers. However, the problem is around for a while and is probably not related to Qt version, particular driver version, neither to Quadro/GeForce differences - at least according to my impressions with the problem. I tried to switch composition off and it still freezes. The only workaround is unchecking of “Sync to VBlank” checkbox in NVIDIA X Server Settings.
Let me know if you would need more input from me. Thanks for the support.
nvidia-bug-report.log.gz (52 KB)