Bug 32571 - I830DRI2GetMSC: get vblank counter failed: Invalid argument"
Summary: I830DRI2GetMSC: get vblank counter failed: Invalid argument"
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: high critical
Assignee: Chris Wilson
QA Contact:
: 34322 35891 (view as bug list)
Depends on:
Reported: 2010-12-22 01:19 UTC by fangxun
Modified: 2017-10-06 14:53 UTC (History)
5 users (show)

See Also:
i915 platform:
i915 features:

dmesg with drm.debug=0xf (124.50 KB, text/plain)
2010-12-22 01:19 UTC, fangxun
no flags Details
xorg log (37.68 KB, text/plain)
2010-12-22 01:20 UTC, fangxun
no flags Details
Clarify EINVALs (3.39 KB, patch)
2011-04-11 02:20 UTC, Chris Wilson
no flags Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description fangxun 2010-12-22 01:19:58 UTC
Created attachment 41365 [details]
dmesg with drm.debug=0xf

System Environment:
Arch:           i686
Platform:       pineview
Libdrm:         (master)2.4.23
Mesa:           (7.10)0e50c21e247b6d4246fcc2b583563a8f44bc4249
Xserver:        (server-1.9-branch)xorg-server-
Xf86_video_intel:    (master)2.13.902-1-g71af40a75fbdd1054b1111e8cbe67ad1f97e6613
Kernel: (drm-intel-fixes)63abf3edaf42d0b9f278df90fe41c7ed4796b6b1

Bug detailed description:
On gnome-desktop with compiz enabled, start openarena and change resolution in
"system setup", the game hangs. It's kernel regression. The last known good commit is Kernel:(drm-intel-fixes) 6939a5aca7cfada279a24c307e772f33104fca20. 
#0  0xb780d424 in __kernel_vsyscall ()
#1  0x4aaffe46 in poll () from /lib/libc.so.6
#2  0xb764504b in _xcb_conn_wait (c=0xaf6add8, cond=0xaf6adfc, vector=0x0, count=0x0) at xcb_conn.c:306
#3  0xb76470c7 in xcb_wait_for_event (c=0xaf6add8) at xcb_in.c:437
#4  0xb76abbe7 in _XReadEvents (dpy=0xaf9cc88) at xcb_io.c:342
#5  0xb769969d in XMaskEvent (dpy=0xaf9cc88, mask=131072, event=0xbfa9328c) at MaskEvent.c:75
#6  0x4f94e67d in ?? () from /usr/lib/libSDL-1.2.so.0
#7  0x4f9559ad in ?? () from /usr/lib/libSDL-1.2.so.0
#8  0x4f959c39 in ?? () from /usr/lib/libSDL-1.2.so.0
#9  0x4f959f3d in ?? () from /usr/lib/libSDL-1.2.so.0
#10 0x4f943ec0 in SDL_SetVideoMode () from /usr/lib/libSDL-1.2.so.0
#11 0x081d9b76 in GLimp_StartDriverAndSetMode ()
#12 0x00000000 in ?? ()

Reproduce steps:
1. xinit&
2. start openarena
3. change resolution in game "system setup"
Comment 1 fangxun 2010-12-22 01:20:31 UTC
Created attachment 41366 [details]
xorg log
Comment 2 Chris Wilson 2010-12-24 01:43:58 UTC
"(WW) intel(0): get vblank counter failed: Invalid argument"

Doesn't look to be a kernel regression, but that the driver is not correctly handling an error condition inside a vblank race on client termination that we have seen before.
Comment 3 meng 2011-03-07 04:37:00 UTC
This issue still happens with following commits,e.g. 3D games:openarena,urbanterror.
Libdrm:    (master)2.4.24-6-g3b04c73650b5e9bbcb602fdb8cea0b16ad82d0c0
Mesa:      (master)6538b5824e298eaebede2d9686c7607c44ab446
Xserver:                (master)xorg-server-1.10.0
Xf86_video_intel:       (master)2.14.901
Kernel:    (drm-intel-fixes) 91355834646328e7edc6bd25176ae44bcd7386c7
Comment 4 Chris Wilson 2011-04-02 01:21:10 UTC
*** Bug 35891 has been marked as a duplicate of this bug. ***
Comment 5 Chris Wilson 2011-04-02 01:22:35 UTC
From bug 35891: "I830DRI2GetMSC:1145 get vblank counter failed"
Comment 6 Chris Wilson 2011-04-02 01:23:54 UTC
*** Bug 34322 has been marked as a duplicate of this bug. ***
Comment 7 bo.b.wang 2011-04-11 01:01:16 UTC
There is  same issue in "et" game. "I830DRI2GetMSC:1145 get vblank counter failed"
Comment 8 bo.b.wang 2011-04-11 01:28:11 UTC
There is  same issue in "quake3", "quake4", "ETQW-demo" game
Comment 9 Chris Wilson 2011-04-11 02:20:08 UTC
Created attachment 45467 [details] [review]
Clarify EINVALs

Sounds like you can almost trigger this at will now. Have you discovered a pattern?

The attached patch adds some debug messages to the kernel which should help identify which error we are triggering.
Comment 10 meng 2011-04-13 22:07:44 UTC
It works good when runnig openarena on Pineview with commit c94249d2a.
But ut2004 still hangs when change resolution.
Comment 11 Gordon Jin 2011-04-14 21:57:55 UTC
I'm raising priority as it impacts many games.
Comment 12 Jesse Barnes 2011-06-08 10:34:18 UTC
Does this issue still occur with the recent DDX fixes?
Comment 13 fangxun 2011-06-09 03:32:20 UTC
This issue doesn't occur with recent kernel.
Comment 14 fangxun 2011-06-09 03:35:36 UTC
Verified with drm-intel-next commit da3cc9202697a44057c1bd3ad685689375f1fe0c and drm-intel-fixes commit 2fb4e61d9471867677c97bf11dba8f1e9dfa7f7c.
Comment 15 Elizabeth 2017-10-06 14:53:09 UTC
Closing old verified.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.