[X1650] (Needs radeon-rewrite) freeze on opengl games (bzflag, alienarena)

Bug #348450 reported by Michael Vogt
24
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DRI
Fix Released
Critical
xserver-xorg-video-ati (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Binary package hint: xserver-xorg-video-ati

When launching opengl games like bzflag or alienarena the system freeze after some seconds. No keyboard/mouse anymore. The system is still reachable via the network. No error in /var/log/syslog /var/log/Xorg.0.log or dmesg.

This is jaunty with todays daily build, I will attach lspci and other logs.

Tags: 3d freeze jaunty
Revision history for this message
Michael Vogt (mvo) wrote :

fabian@fabian-desktop:~$ lspci -nn
00:00.0 Host bridge [0600]: VIA Technologies, Inc. K8M800 Host Bridge [1106:0204]
00:00.1 Host bridge [0600]: VIA Technologies, Inc. K8M800 Host Bridge [1106:1204]
00:00.2 Host bridge [0600]: VIA Technologies, Inc. K8M800 Host Bridge [1106:2204]
00:00.3 Host bridge [0600]: VIA Technologies, Inc. K8M800 Host Bridge [1106:3204]
00:00.4 Host bridge [0600]: VIA Technologies, Inc. K8M800 Host Bridge [1106:4204]
00:00.7 Host bridge [0600]: VIA Technologies, Inc. K8M800 Host Bridge [1106:7204]
00:01.0 PCI bridge [0604]: VIA Technologies, Inc. VT8237 PCI bridge [K8T800/K8T890 South] [1106:b188]
00:09.0 Mass storage controller [0180]: Promise Technology, Inc. 20269 [105a:4d69] (rev 02)
00:0f.0 IDE interface [0101]: VIA Technologies, Inc. VIA VT6420 SATA RAID Controller [1106:3149] (rev 80)
00:0f.1 IDE interface [0101]: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE [1106:0571] (rev 06)
00:10.0 USB Controller [0c03]: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller [1106:3038] (rev 81)
00:10.1 USB Controller [0c03]: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller [1106:3038] (rev 81)
00:10.2 USB Controller [0c03]: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller [1106:3038] (rev 81)
00:10.3 USB Controller [0c03]: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller [1106:3038] (rev 81)
00:10.4 USB Controller [0c03]: VIA Technologies, Inc. USB 2.0 [1106:3104] (rev 86)
00:11.0 ISA bridge [0601]: VIA Technologies, Inc. VT8237 ISA bridge [KT600/K8T800/K8T890 South] [1106:3227]
00:11.5 Multimedia audio controller [0401]: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller [1106:3059] (rev 60)
00:12.0 Ethernet controller [0200]: VIA Technologies, Inc. VT6102 [Rhine-II] [1106:3065] (rev 78)
00:18.0 Host bridge [0600]: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration [1022:1100]
00:18.1 Host bridge [0600]: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map [1022:1101]
00:18.2 Host bridge [0600]: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller [1022:1102]
00:18.3 Host bridge [0600]: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control [1022:1103]
01:00.0 VGA compatible controller [0300]: ATI Technologies Inc RV535 [Radeon X1650 Series] [1002:71c7] (rev 9e)
01:00.1 Display controller [0380]: ATI Technologies Inc RV535 [Radeon X1650 Series] [1002:71e7] (rev 9e)

Revision history for this message
Michael Vogt (mvo) wrote :
Revision history for this message
Michael Vogt (mvo) wrote :

$ dpkg -l xserver-xorg-video-ati
ii xserver-xorg-video-ati 1:6.12.1-0ubuntu1 X.Org X server -- ATI display driver wrapper

This happens with a intrepid->jaunty upgraded machine

Revision history for this message
Michael Vogt (mvo) wrote :

Desktop effects work fine, no hangs or crashes here.

Revision history for this message
Pauli (paniemin) wrote :

I noticed same freeze in xmoto after upgrading everything earlier today. System is stuck in drm call from r300 dri driver. This drm call then blocks whole xserver.

Here is backtrace from blocked xserver:
#0 0x00007f3b05c15cd7 in ioctl () from /lib/libc.so.6
#1 0x00007f3b04233343 in drmIoctl () from /usr/lib/libdrm.so.2
#2 0x00007f3b042335cb in drmCommandWrite () from /usr/lib/libdrm.so.2
#3 0x00007f3af9071f20 in ?? () from /usr/lib/dri/r300_dri.so
#4 0x00007f3b0488967f in __glXDisp_Finish (cl=0x1da3650, pc=<value optimized out>) at ../../glx/single2.c:233
#5 0x00007f3b04885de2 in __glXDispatch (client=0x1df8370) at ../../glx/glxext.c:523
#6 0x000000000044e304 in Dispatch () at ../../dix/dispatch.c:437
#7 0x0000000000433d8d in main (argc=10, argv=0x7fff1003a868, envp=<value optimized out>) at ../../dix/main.c:397

yes. btw, I thought that installing libgl1-mesa-dri-dbg would give debug symbols r300 dri driver.

Nothing is printed to dmesg. (thanks to watch not reacting fast enough) Does anyone know easy way to set kernel watchdog to something like 5 seconds? /sys maybe?

So this seems like bug in kernele side that causes for ever loop or some hard lock in mutex. No more idea about it yet as Machine is not main and I only have ssh access currently.

Revision history for this message
Pauli (paniemin) wrote :

More detailed debug info follows.

Compiz was enabled in basic mode. And I forgot to take backtrace from it :( But my guess is that this might be because of multiple applications accessing graphics system simultaneously and driver having somewhere bug.

Revision history for this message
Pauli (paniemin) wrote :
Revision history for this message
Pauli (paniemin) wrote :
Revision history for this message
Pauli (paniemin) wrote :
Revision history for this message
Pauli (paniemin) wrote :
Revision history for this message
Pauli (paniemin) wrote :

Here come list of all the packages that were upgraded when this regression started. Too bad it is very large.

Bryce Harrington (bryce)
Changed in xserver-xorg-video-ati (Ubuntu):
status: New → Confirmed
Revision history for this message
Pauli (paniemin) wrote :

Freeze may not have started after the upgrade that I thought it was related to :(

It started inmidiatly after that upgrade but same time I downloaded all additional levels for xmoto. After testing a bit more it seems like default level set for xmoto doesn't cause the freeze. (btw, r280 based card doesn't have this problem so bug is r300 specific problem)

Revision history for this message
Tomasz Czapiewski (xeros) wrote :

@Pauli,
Could you give us a link to the additional levels for xmoto. I've got R300, too (RV350) and just tried ~30 maps (xmoto and xmoto-data packages from universe repository) and I haven't get the freeze.
Packaged drivers: "xserver-xorg-video-ati 1:6.12.1-0ubuntu1: i386" and just released "xserver-xorg-video-ati 1:6.12.1-0ubuntu1: i386", too.

Revision history for this message
Pauli (paniemin) wrote :

You can download them from in-game button in top left corner of main menu. That will take sometime as default is to download all 1500+ levels.

I don't have access to the laptop with r500 card. I will be testing a bit more after weekend when I have again access to the laptop.

PS. There is possible fix posted to phoronix forums: http://www.phoronix.com/forums/showpost.php?p=68991&postcount=53 .

Revision history for this message
Jos van den Oever (vandenoever) wrote :

This freeze also occurs on KDE 4.2.2 with desktop effects after a bit of use.

The process X has one thread stuck at
#0 0x00007feeeb84dcd7 in ioctl () from /lib/libc.so.6
#1 0x00007feee9e6b343 in drmIoctl () from /usr/lib/libdrm.so.2
#2 0x00007feee9e6b5cb in drmCommandWrite () from /usr/lib/libdrm.so.2
#3 0x00007feed6ca9f40 in ?? () from /usr/lib/dri/r300_dri.so
#4 0x00007feeea4ba805 in ?? () from /usr/lib/xorg/modules/extensions//libglx.so
#5 0x00007feeea4b99d2 in ?? () from /usr/lib/xorg/modules/extensions//libglx.so
#6 0x00007feeea4bdde2 in ?? () from /usr/lib/xorg/modules/extensions//libglx.so
#7 0x000000000044e304 in Dispatch ()
#8 0x0000000000433d8d in main ()

Tail of /var/log/X.org.log says:
(II) RADEON(0): EDID vendor "SAM", prod id 772
(II) RADEON(0): Output: DVI-0, Detected Monitor Type: 0
Dac detection success
Unhandled monitor type 0
exaCopyDirty: Pending damage region empty!

Revision history for this message
Jos van den Oever (vandenoever) wrote :
Revision history for this message
In , Pauli (paniemin) wrote :

There is ubuntu bug reports about the locking issue.

system:
Turion x2
M-Radeon x1400
Linux 2.6.28
mesa 7.4, git master and radeon-rewrite tested
drm 2.4.5, git master and modesetting-gem tested (modesetting not enabled)
compiz disabled

Steps to reproduce:
1. start xmoto 0.5.0
2. download all additional levels using button in top left corner (appears few seconds after starting xmoto)
3. find level named "Beginners journey part three"
4. just play game about 5 seconds and xmoto will crash (It happens near the 3rd tree visible to player after 2nd steep drop)

state of computer after lock:
- ssh is only way to communicate with computer.
- xmoto is locked in drm call
- Xorg is locked in drm call
- I have seen report that drm heavy lock count is 3 so there is one more unknown application locked too but I couldn't guess which one.
- Backtrace from xmoto and xorg uing stock Ubuntu mesa/drm can be found from Ubuntu bug report. I haven't been able to get backtrace drom newer drivers because gdb hangs when I try to attach with newer drivers.

Revision history for this message
In , agd5f (agd5f) wrote :

This is a GPU hang. Please attach your xorg log and config. You might want to try with with the r300 driver from the radeon_rewrite branch of mesa.

Revision history for this message
In , Pauli (paniemin) wrote :

Created an attachment (id=25423)
xorg.conf

Revision history for this message
In , Pauli (paniemin) wrote :

Created an attachment (id=25424)
xorg.log

Revision history for this message
In , Pauli (paniemin) wrote :

Created an attachment (id=25425)
kernel log when I enabled drm debug after freeze

Intresting point is that if I try to reproduce the bug with debug enabled in drm it never locks. So maybe this is some timing problem in driver. (Some locking missing?)

I have tested radeon-rewrite already and same freeze happens there too.

Revision history for this message
In , agd5f (agd5f) wrote :

This looks to be 3D related, but does updating to the latest ddx from git help (git master of xf86-video-ati)?

Revision history for this message
In , Pauli (paniemin) wrote :

I have 5 days old version in /opt/local/lib/xorg/modules :)

It was at commit 7d9f643ae3d07e51e644a5979ca90bc2c102bc89

I can try using updated ddx, radeon-rewrite and modesetting-gem if you think there might be some kind of fix in the last 5 days.

Revision history for this message
In , agd5f (agd5f) wrote :
Revision history for this message
In , Pauli (paniemin) wrote :

Now using the latest radeon-rewrite, libdrm modeseting-gem (including kernel modules but no mode setting because failing to initialise memory manager) and latest ddx everything works.

But when I try to use latest ddx with old mesa it hard locks now already level preview. (Doesn't even respond if trying to probe with nmap scan)

Revision history for this message
In , agd5f (agd5f) wrote :

(In reply to comment #8)
> Now using the latest radeon-rewrite, libdrm modeseting-gem (including kernel
> modules but no mode setting because failing to initialise memory manager) and
> latest ddx everything works.

Is the DRI enabled properly in that case? Just want to make sure it's not falling back to software.

Revision history for this message
In , Pauli (paniemin) wrote :

yes. xmoto would run around 0.5 fps if using software mesa.

btw, I jsut noticed a weird small freeze about a second later that lock used to happen. Now it take about 200-500ms frame hit for no reason that I can see. I can reproduce this every time too. (geometry and texture loads should be far from x1400 card limits unless xmoto is very badly written)

Revision history for this message
In , Pauli (paniemin) wrote :

Some more info:
I found stable combination also for mesa_7_4_branch.
That includes
- mesa_7_4_branch head
- libdrm master head (also has to install kernel modules)
- xf86-video-ati master head

I tried to bisect for the problem in 7_4 branch and ddx separately but nether turned anything up (only in last 10 days). So here is happening some magic now that I don't understand. Problem might be that I only restarted X and not rebooted between testing ddx versions ...
Then I try to test running with stock drm modules from ubuntu jaunty. Not very promising experience as system paniced quite frequently. (3 times in about 10 minutes)

So I didn't find what was causing the bug in first place but now it seems like fixed.

Revision history for this message
Tormod Volden (tormodvolden) wrote : Re: X1650 freeze on opengl games (bzflag, alienarena)

Please try the newest versions of the -ati/-radeon packages in my PPA https://launchpad.net/~tormodvolden/+archive/ppa There have been some fixes recently.

Changed in xserver-xorg-video-ati (Ubuntu):
assignee: nobody → Tormod Volden (tormodvolden)
status: Confirmed → Incomplete
Revision history for this message
In , Pauli (paniemin) wrote :

Now I just looked more to kern.log and output looks very bad to me. Seems like there is buffer overflow or stack overflow that affects debug output. So is it possible for opengl apps to cause that or maybe some kind of buffer overflow in video memory?

I remember seeing a lot of texture artefacts if running two opengl applications same time. Seems like 2nd one overwrites some of memory reserved by first one. Running 2 instances of warzone shows the problem very clearly. but it is enough for minimal random texture corruption to run xmoto and neverput same time. (I guess kernel memory manager will fix this issue but it could still cause some problems)

Revision history for this message
juhuu (swinter-bw-computer) wrote : Re: X1650 freeze on opengl games (bzflag, alienarena)

Hi,

@Tormod Volden:
Just tried new xorg-radeon driver from your PPA.

The new radeon driver doesnt fix my opengl freeze problem when compositing is beeing used, which is / similiar to the following bug reports:

https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-ati/+bug/351990

https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-ati/+bug/348332

https://bugs.launchpad.net/ubuntu/+bug/350766

and Ubuntu Forum (german)

http://forum.ubuntuusers.de/topic/kde-stuerzt-mit-desktop-effekten-staendig-ab/

However it seems to have fixed some sort of memory leak.
With standard Jaunty radeon package xorg process used up to 500MB of memory after excessive use. With the new driver it only goes up to a max of 250MB

greetz

Revision history for this message
Pauli (paniemin) wrote : Re: [Bug 348450] Re: X1650 freeze on opengl games (bzflag, alienarena)

hi!

Stable combination for me is these aditions to default ubuntu instalation:

mesa mesa_7_4_branch commit e9d5569bf3e5d7a78a790c144aed275f1a32f325
pthread-stubs master commit ef2431f5bdef1da9f2f7701232def164910b191b
drm master commit 68103b2758029b3c1fbfcf995baa758bfd2676de
macros master commit 21a957428aa69b03f585378dc6e70ad9f5c513c6
libXxf86vm master commit f2a1073b3027c508e01beca9ca34bbc6c90f5e6b
dri2proto master commit 66c56ab10d917e3f47f93178d7eac6430970d3c4
xf86vidmodeproto master commit 7efd16a110ea4e8a7deab405fba7e1f5ceb4add2
libXmu master commit 88bd2d387fbb068339b65506331136085082def6
xf86-video-ati master commit da58e351b6398fa18b1d9c1a57a6e49b285f610f

I think that mesa,drm and xf86-video-ati should be enough if building
for dri1 only but I have tried to build raden-rewrite + dri2 which
needs more updated packages. I couldn't yet find the commit that fixed
everything but I suspect that new drm is required too to make it all
work stable with r300 cards.

In kernel drm modules from drm git is must to have to make the latest
ddx/mesa stable. I think xorg-edgers PPA is providing new enough
package already.

Pauli

PS. This settup doesn't provide redirected rendering which is required
for opengl apps to work corretly under composite window manager. RDR
is only available when using radeon-rewrite with kernel mode setting.
I couldn't make KMS work correctly in ubuntu jaunty based system so I
don't know how to test that in ubuntu. Probably easiest way to test
new driver is to use fedora rawhide livecd.

Changed in xserver-xorg-video-ati (Ubuntu):
assignee: Tormod Volden (tormodvolden) → nobody
status: Incomplete → Confirmed
Changed in dri:
status: Unknown → Confirmed
Bryce Harrington (bryce)
summary: - X1650 freeze on opengl games (bzflag, alienarena)
+ [X1650] freeze on opengl games (bzflag, alienarena)
Bryce Harrington (bryce)
tags: added: freeze
tags: added: 3d
Revision history for this message
In , Oibaf (oibaf) wrote :

I am having a similar lockup problem (see https://bugs.freedesktop.org/show_bug.cgi?id=21849). Can you try reverting to original Ubuntu packages and installing kernel 2.6.29.3 from # KernelMainlineBuilds PPA [0] and see if that fixes your lockup as with me?

I am bisecting between 2.6.29 and 2.6.30-rc1 right now.

[0] https://wiki.ubuntu.com/KernelMainlineBuilds

Bryce Harrington (bryce)
tags: added: jaunty
Revision history for this message
Bryce Harrington (bryce) wrote : Re: [X1650] freeze on opengl games (bzflag, alienarena)

Hi Michael, still having this bug on current Karmic?

Changed in xserver-xorg-video-ati (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Pauli (paniemin) wrote :

To fix most of freezes it is enough to use xorg-edgers packages. But there is still sometimes small chance for GPU hang. Now I did compile vanila kernel for jaunty to get KMS where remaining hang problems have disappeared.

So non-kms Karmic: Small chance for hang. Reproducing in xmoto level "Green hill zone act 3". There is a small pit after spring where it hangs most of times.

kms-karmic: None so far found but testing has been too little to rule out completely.

Bryce Harrington (bryce)
summary: - [X1650] freeze on opengl games (bzflag, alienarena)
+ [X1650] (Needs radeon-rewrite) freeze on opengl games (bzflag,
+ alienarena)
Bryce Harrington (bryce)
Changed in xserver-xorg-video-ati (Ubuntu):
importance: Undecided → High
status: Incomplete → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xserver-xorg-video-ati - 1:6.12.99+git20090825.fc74e119-0ubuntu1

---------------
xserver-xorg-video-ati (1:6.12.99+git20090825.fc74e119-0ubuntu1) karmic; urgency=low

  * Checkout from git 20090825 (master branch) up to commit
    fc74e1194c980d978667e02c60a29a761a694bde
    + Adds DRI2 / redirected direct rendering
      (LP: #96991)
    + Fix freeze on opengl games (bzflag, alienarena) (when KMS on)
      (LP: #348450)
    + Fix intermittent short screen blanking behavior
      (LP: #310864)
    + Fix faulty wine screen updates with EXA Compositing
      (LP: #314205)
    + Fix screen corruption issues when switching windows
      (LP: #406731)
    + Fix SIGSEGV crash in drmCommandNone()
      (LP: #352567)
    + Fix smeared/tearing of display on reboot
      (LP: #367741

  [Tormod Volden]
  * 199_add_git_version_to_log.diff: Log git commit id in RadeonPreInit()
  * sed -i s/DRI2BufferPtr/DRI2Buffer2Ptr/ src/radeon_dri2.c
      so it compiles against xserver 1.6.2.+

  [Bryce Harrington]
  * Restore patch system and quilt to build-depends
  * Drop patches already present upstream
    + 107_check_unsupported_composit_ops.patch
    + 108_quirk_agpmode_m6_ali.patch: AGPMode quirk.
    + 109_quirk_agpmode_m7_intel.patch: AGPMode quirk.
    + 110_quirk_agpmode_r420_sis.patch: AGPMode quirk.
    + 111_use_xaa_for_lowmem_or_nodri.patch

 -- Bryce Harrington <email address hidden> Sat, 29 Aug 2009 12:16:53 -0700

Changed in xserver-xorg-video-ati (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
In , Oibaf (oibaf) wrote :

This was fixed in linux 2.6.30 final, the corresponding Ubuntu bug was also fixed some time ago.

Changed in dri:
status: Confirmed → Fix Released
Changed in dri:
importance: Unknown → Critical
Changed in dri:
importance: Critical → Unknown
Changed in dri:
importance: Unknown → Critical
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.