Bug 20567 - [945GM] clutter test-multistage hangs the GPU
Summary: [945GM] clutter test-multistage hangs the GPU
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Eric Anholt
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-09 11:45 UTC by Arjan van de Ven
Modified: 2017-07-24 23:10 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Arjan van de Ven 2009-03-09 11:45:21 UTC
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GME Express Integrated Graphics Controller (rev 03)

xorg-x11-drv-intel-2.6.3-8.1.moblin2.i586
xorg-x11-server-Xorg-1.6.0-16.2.moblin2.i586
mesa-libGL-7.2-7.2.moblin2.i586
kernel-netbook-2.6.29.rc7-55.1.moblin2.i586


Starting a clutter based application causes the X server to stop responding (even the mouse cursor does not move).

The kernel says the X server is stuck in kernel mode (D state) like this:

[  916.098023] Xorg          D 000000c1     0  1316   1266
[  916.098023]  f506be9c 00003046 f2cc53b5 000000c1 00000000 f691e850 f6a48160 c09ffb24
[  916.098023]  c0a02a80 c0a02a80 c0a02a80 00003246 f6a48160 f6a483b4 c1cf7a80 00000000
[  916.098023]  f2cebf56 000000c1 f641fe2c f641fdd0 c07e8fd4 00003046 00000000 00000000
[  916.098023] Call Trace:
[  916.098023]  [<c0579a75>] ? i915_gem_sw_finish_ioctl+0x30/0x7d
[  916.098023]  [<c0783c3c>] mutex_lock_nested+0x14f/0x249
[  916.098023]  [<c0579a75>] ? i915_gem_sw_finish_ioctl+0x30/0x7d
[  916.098023]  [<c0579a75>] i915_gem_sw_finish_ioctl+0x30/0x7d
[  916.098023]  [<c0566dd5>] drm_ioctl+0x1b7/0x22f
[  916.098023]  [<c0579a45>] ? i915_gem_sw_finish_ioctl+0x0/0x7d
[  916.098023]  [<c0486711>] vfs_ioctl+0x50/0x69
[  916.098023]  [<c0486c4e>] do_vfs_ioctl+0x460/0x499
[  916.098023]  [<c049daf1>] ? dnotify_parent+0x1d/0x5e
[  916.098023]  [<c047cd8d>] ? vfs_read+0xed/0x101
[  916.098023]  [<c0486cb3>] sys_ioctl+0x2c/0x45
[  916.098023]  [<c0403152>] syscall_call+0x7/0xb
Comment 1 Arjan van de Ven 2009-03-09 16:07:29 UTC
[  646.646286] Xorg          D 00000064     0  1207   1190
[  646.646286]  f5ec9ea0 00003046 b1130ad6 00000064 00000000 f68c4850 f652eae0 c09ffb24
[  646.646286]  c0a02a80 c0a02a80 c0a02a80 c0a02a80 f652eae0 f652ed34 c1cf7a80 00000000
[  646.646286]  00000000 c046928b f6462e2c f6462dd0 c1cf7a90 00003046 00000000 00000000
[  646.646286] Call Trace:
[  646.646286]  [<c046928b>] ? might_fault+0x43/0x80
[  646.646286]  [<c0579d33>] ? i915_gem_throttle_ioctl+0x17/0x3c
[  646.646286]  [<c0783c3c>] mutex_lock_nested+0x14f/0x249
[  646.646286]  [<c0579d33>] ? i915_gem_throttle_ioctl+0x17/0x3c
[  646.646286]  [<c0579d33>] i915_gem_throttle_ioctl+0x17/0x3c
[  646.646286]  [<c0566dd5>] drm_ioctl+0x1b7/0x22f
[  646.646286]  [<c0579d1c>] ? i915_gem_throttle_ioctl+0x0/0x3c
[  646.646286]  [<c0486711>] vfs_ioctl+0x50/0x69
[  646.646286]  [<c0486c4e>] do_vfs_ioctl+0x460/0x499
[  646.646286]  [<c0402c7c>] ? restore_sigcontext+0x100/0x143
[  646.646286]  [<c0486cb3>] sys_ioctl+0x2c/0x45
[  646.646286]  [<c0403152>] syscall_call+0x7/0xb


another backtrace, this was with the latest git driver+libdrm
Comment 2 Gordon Jin 2009-03-09 19:29:37 UTC
Upstream code (with xf86-video-intel master branch) test result:
most clutter cases (e.g. test-layout) works fine.
some clutter case (test-multistage) gets X crash, i.e. bug#20286.

while the symptom you see seems X hang, but still there. 

Can you try test-layout?

Comment 3 Arjan van de Ven 2009-03-09 21:33:33 UTC
did you use a system that has KMS enabled, and is running an opengl using compositing window manager?
Comment 4 Gordon Jin 2009-03-09 23:33:44 UTC
(In reply to comment #3)
> did you use a system that has KMS enabled, and is running an opengl using
> compositing window manager?
> 

Yes, we are running on Fedora 10, with UXA and KMS enabled, and compiz.

Is your driver version the one moblin QA is testing (today or yesterday)? I haven't heard they met so critical issues.
Comment 5 Li Peng 2009-03-09 23:35:37 UTC
(In reply to comment #2)
> Upstream code (with xf86-video-intel master branch) test result:
> most clutter cases (e.g. test-layout) works fine.
> some clutter case (test-multistage) gets X crash, i.e. bug#20286.
> 
> while the symptom you see seems X hang, but still there. 
> 
> Can you try test-layout?
> 

test-multistage will crash X in my test with KMS. test-layout works well.

disable memory tiling will avoid X crash, but get poor performance. 
Comment 6 Eric Anholt 2009-03-10 09:59:08 UTC
On 915GM, KMS, compiz, all the clutter tests I tried worked fine.

Arjan, please attach the information I requested originally:
http://intellinuxgraphics.org/how_to_report_bug.html
(in particular, "Information to provide".)
Comment 7 Gordon Jin 2009-03-10 19:09:56 UTC
>> Starting a clutter based application causes the X server to stop responding
Arjan, do you mean "any" of clutter case can trigger this? If not, please specify one. How about test-layout, as I've asked in comment#2?
Comment 8 Eric Anholt 2009-03-10 21:03:38 UTC
OK, let's call this bug about test-multistage, on the assumption that that's testing what really matters.  What we know:

- Only happens with DRI2.
- Disabling tiling fixes it.
- KMS is not a requirement (I reproduce it without KMS).
- Compositing is not a requirement (I reproduce it with bare server + xlogo running)
- Chris Wilson's tiling fixes don't fix it. (got those applied)
- It does appear to be a normal GPU hang (not kernel oops/lockup/app lockup).
Comment 9 Eric Anholt 2009-03-10 22:42:12 UTC
Fix posted to the mailing list and in my tree on the 945-fence-fix branch until someone else can review it, given that I'm exhausted here.

commit 7637e349061b5220e47b1df94174989f0d195075
Author: Eric Anholt <eric@anholt.net>
Date:   Tue Mar 10 22:34:49 2009 -0700

    drm/i915: fix 945 fence register writes for fence 8 and above.
    
    The last 8 fence registers sit at a different offset, so when we went to set
    fence number 8 in the lower offset, we instead set PGETBL_CTL, and the GPU
    got all sorts of angry at us.
    
    fd.o bug #20567.  Easily reproducible by running glxgears and killing it abo
    6 times.
    
    Signed-off-by: Eric Anholt <eric@anholt.net>
Comment 10 Zheng Kui 2009-03-10 23:45:51 UTC
In latest moblin trunk
xorg-x11-server-1.6.0-1.2.moblin2.src.rpm
xorg-x11-drv-intel-2.6.3-3.1.moblin2.src.rpm
mesa-7.2-6.2.moblin2.src.rpm
libdrm-2.4.5-1.2..moblin2.src.rpm
kernel-2.6.29.rc7-40.1.moblin2.src.rpm

besides test-multistage, following clutter demos crashed too:
test-clutter-cairo-flowers
test-cogl-primitives
test-cogl-tex-foreign
test-multistage
test-perspective
test-scale
test-threads

BTW, when I replaced gfx relateed components of moblin with upstream 
(Xserver: 1.6.99.1, xf86-video-intel: 2.6.99, mesa: 7.5-dev, drm: 2.4.5)
I found that: 1st any of clutter-demos could cause X crash
2nd, the icons of desktop were lost



Comment 11 Li Peng 2009-03-11 02:30:11 UTC
(In reply to comment #9)
> Fix posted to the mailing list and in my tree on the 945-fence-fix branch until
> someone else can review it, given that I'm exhausted here.
> 
> commit 7637e349061b5220e47b1df94174989f0d195075
> Author: Eric Anholt <eric@anholt.net>
> Date:   Tue Mar 10 22:34:49 2009 -0700
> 
>     drm/i915: fix 945 fence register writes for fence 8 and above.
> 
>     The last 8 fence registers sit at a different offset, so when we went to
> set
>     fence number 8 in the lower offset, we instead set PGETBL_CTL, and the GPU
>     got all sorts of angry at us.
> 
>     fd.o bug #20567.  Easily reproducible by running glxgears and killing it
> abo
>     6 times.
> 
>     Signed-off-by: Eric Anholt <eric@anholt.net>
> 

Thanks Eric, I have test your patch and it fixed this issue.
Comment 12 Eric Anholt 2009-03-11 11:33:48 UTC
Thanks for the confirmation!  It's sent off to linus now.


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.