X Server hangs in drmWaitVBlank()

Bug #304056 reported by Tim Wright
4
Affects Status Importance Assigned to Milestone
X.Org X server
Fix Released
High
libdrm (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: xorg

I have been able to track down the causes of my X Server hangs, and it looks like a known issue. Since upgrading to Intrepid, I regularly come back to my system to find the X Server locked up. I was able to ssh in, attach gdb and get a backtrace. What I got is:

gdb) bt
#0 0xb80a0430 in __kernel_vsyscall ()
#1 0xb7d6a1a9 in ioctl () from /lib/tls/i686/cmov/libc.so.6
#2 0xb7b6598f in drmWaitVBlank () from /usr/lib/libdrm.so.2
#3 0xad622b7d in ?? () from /usr/lib/dri/r300_dri.so
#4 0xad622e0b in driWaitForVBlank () from /usr/lib/dri/r300_dri.so
#5 0xad629a61 in radeonCopyBuffer () from /usr/lib/dri/r300_dri.so
#6 0xad628ed0 in radeonSwapBuffers () from /usr/lib/dri/r300_dri.so
#7 0xad624127 in ?? () from /usr/lib/dri/r300_dri.so
#8 0xb7bf0ac4 in ?? () from /usr/lib/xorg/modules/extensions//libglx.so
#9 0xb7be32ce in ?? () from /usr/lib/xorg/modules/extensions//libglx.so
#10 0xb7be6c0a in ?? () from /usr/lib/xorg/modules/extensions//libglx.so
#11 0x0808c89f in Dispatch ()
#12 0x08071d1d in main ()

In doing some research, I found the following:http://bugs.freedesktop.org/show_bug.cgi?id=18041
"[945GM(E)] 'xrandr --output LVDS off' hangs Xserver in drmWaitVBlank()". Nothing to do with the Intel chipset - if you read the bug, it's a generic issue. From the bug: "We finally figured out what's the issue is here. Apparently GNOME uses
'xrandr --output LVDS --off' for screen blanking (instead of DPMS) and this hangs the Xserver in drmWaitVBlank() when compiz is running. Disabling vblank fixes/workarounds the issue."

Revision history for this message
Bryce Harrington (bryce) wrote :

[This is an automated message]

Hi timw,

Please attach the output of `lspci -vvnn`, and attach your /var/log/Xorg.0.log file from after reproducing this issue. If you've made any customizations to your /etc/X11/xorg.conf please attach that as well.

Changed in xorg:
status: New → Incomplete
Timo Aaltonen (tjaalton)
Changed in xorg:
status: Incomplete → Confirmed
Changed in xorg-server:
status: Unknown → Confirmed
Revision history for this message
Jelle Foks (jellefoks) wrote :

I probably just saw the same issue. I hadn't touched the laptop for a couple of minutes when it triggered, but it drew my attention because I saw something flicker in the corner of my eye, then I discovered that xorg did not respond anymore.

Nothing additional is printed in the Xorg.0.log. This is on a jaunty kde desktop with libdrm-2.4.1.

This is the gdb backtrace of one occurence (mine apparently has line numbers, which should help):

(gdb) bt
#0 0xb8090430 in __kernel_vsyscall ()
#1 0xb7d18c29 in ioctl () from /lib/tls/i686/cmov/libc.so.6
#2 0xb7b333ef in drmIoctl (fd=14, request=3222299706, arg=0xbfdae4bc) at
#xf86drm.c:183
#3 0xb7b33928 in drmWaitVBlank (fd=14, vbl=0xbfdae4bc) at xf86drm.c:1895
#4 0xa75a19fd in ?? () from /usr/lib/dri/i965_dri.so
#5 0xa75a1c8b in driWaitForVBlank () from /usr/lib/dri/i965_dri.so
#6 0xa75a9f07 in intelSwapBuffers () from /usr/lib/dri/i965_dri.so
#7 0xa75a1e8e in ?? () from /usr/lib/dri/i965_dri.so
#8 0xb7b9cbe4 in ?? () from /usr/lib/xorg/modules/extensions//libglx.so
#9 0xb7b8f4ce in ?? () from /usr/lib/xorg/modules/extensions//libglx.so
#10 0xb7b92e6a in ?? () from /usr/lib/xorg/modules/extensions//libglx.so
#11 0x0808cdbf in Dispatch ()
#12 0x08071aad in main ()
(gdb)

And at least equally interesting is the flood of SIGALRM's in the 'strace -p'.

Process 5904 attached - interrupt to quit
ioctl(14, 0xc010643a, 0xbfdae4bc) = -1 EINTR (Interrupted system call)
--- SIGALRM (Alarm clock) @ 0 (0) ---
sigreturn() = ? (mask now [])
ioctl(14, 0xc010643a, 0xbfdae4bc) = -1 EINTR (Interrupted system call)
--- SIGALRM (Alarm clock) @ 0 (0) ---
sigreturn() = ? (mask now [])
ioctl(14, 0xc010643a, 0xbfdae4bc) = -1 EINTR (Interrupted system call)
--- SIGALRM (Alarm clock) @ 0 (0) ---
sigreturn() = ? (mask now [])
ioctl(14, 0xc010643a, 0xbfdae4bc) = -1 EINTR (Interrupted system call)
--- SIGALRM (Alarm clock) @ 0 (0) ---
sigreturn() = ? (mask now [])

So it looks like the infinite loop is either triggered by, or causes SIGALRM's in the ioctl. At least it stays in the loop.

Given the information from the reporter, maybe what is going on is that the blank is turned off first (display off), followed by a call to WaitForVBlank, which, of course, never exits if there are no more vblanks...

Revision history for this message
Jelle Foks (jellefoks) wrote :
Download full text (3.3 KiB)

Ah, and there it triggered again. I again hadn't touched the laptop, but I tried to start a 'konsole' and while it was showing the bouncing icon it triggered.

Same backtrace, but I did a more extensive strace, showing that it typically stays in the ioctl for about 0.019 seconds before exiting (>50hz).

$ sudo strace -Ttttip 9029
Process 9029 attached - interrupt to quit
1231209790.265059 [b804a430] ioctl(14, 0xc010643a, 0xbff65e7c) = -1 EINTR (Interrupted system call) <0.008417>
1231209790.273530 [b804a430] --- SIGALRM (Alarm clock) @ 0 (0) ---
1231209790.273594 [b804a408] sigreturn() = ? (mask now []) <0.000008>
1231209790.273660 [b804a430] ioctl(14, 0xc010643a, 0xbff65e7c) = -1 EINTR (Interrupted system call) <0.019822>
1231209790.293506 [b804a430] --- SIGALRM (Alarm clock) @ 0 (0) ---
1231209790.293553 [b804a408] sigreturn() = ? (mask now []) <0.000007>
1231209790.293610 [b804a430] ioctl(14, 0xc010643a, 0xbff65e7c) = -1 EINTR (Interrupted system call) <0.019874>
1231209790.313510 [b804a430] --- SIGALRM (Alarm clock) @ 0 (0) ---
1231209790.313560 [b804a408] sigreturn() = ? (mask now []) <0.000007>
1231209790.313618 [b804a430] ioctl(14, 0xc010643a, 0xbff65e7c) = -1 EINTR (Interrupted system call) <0.019863>
1231209790.333506 [b804a430] --- SIGALRM (Alarm clock) @ 0 (0) ---
1231209790.333553 [b804a408] sigreturn() = ? (mask now []) <0.000007>
1231209790.333612 [b804a430] ioctl(14, 0xc010643a, 0xbff65e7c) = -1 EINTR (Interrupted system call) <0.019870>
1231209790.353506 [b804a430] --- SIGALRM (Alarm clock) @ 0 (0) ---
1231209790.353553 [b804a408] sigreturn() = ? (mask now []) <0.000007>
1231209790.353610 [b804a430] ioctl(14, 0xc010643a, 0xbff65e7c) = -1 EINTR (Interrupted system call) <0.019874>
1231209790.373508 [b804a430] --- SIGALRM (Alarm clock) @ 0 (0) ---
1231209790.373554 [b804a408] sigreturn() = ? (mask now []) <0.000007>
1231209790.373611 [b804a430] ioctl(14, 0xc010643a, 0xbff65e7c) = -1 EINTR (Interrupted system call) <0.019873>
1231209790.393508 [b804a430] --- SIGALRM (Alarm clock) @ 0 (0) ---
1231209790.393554 [b804a408] sigreturn() = ? (mask now []) <0.000007>
1231209790.393611 [b804a430] ioctl(14, 0xc010643a, 0xbff65e7c) = -1 EINTR (Interrupted system call) <0.019873>
1231209790.413508 [b804a430] --- SIGALRM (Alarm clock) @ 0 (0) ---
1231209790.413554 [b804a408] sigreturn() = ? (mask now []) <0.000007>
1231209790.413611 [b804a430] ioctl(14, 0xc010643a, 0xbff65e7c) = -1 EINTR (Interrupted system call) <0.019874>
1231209790.433509 [b804a430] --- SIGALRM (Alarm clock) @ 0 (0) ---
1231209790.433555 [b804a408] sigreturn() = ? (mask now []) <0.000007>
1231209790.433612 [b804a430] ioctl(14, 0xc010643a, 0xbff65e7c) = -1 EINTR (Interrupted system call) <0.019873>
1231209790.453508 [b804a430] --- SIGALRM (Alarm clock) @ 0 (0) ---
1231209790.453554 [b804...

Read more...

Changed in xorg-server:
status: Confirmed → Fix Released
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

libdrm 2.4.4 is now uploaded, should hit the archive later today.

Changed in libdrm:
status: Confirmed → Fix Released
Changed in xorg-server:
importance: Unknown → High
Changed in xorg-server:
importance: High → Unknown
Changed in xorg-server:
importance: Unknown → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.