Bug 21223 - OpenGL screensaver 'lattice' provokes driver crash
Summary: OpenGL screensaver 'lattice' provokes driver crash
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/r300 (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-16 07:49 UTC by Øyvind Stegard
Modified: 2009-11-10 02:36 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Øyvind Stegard 2009-04-16 07:49:02 UTC
When activating screensaver 'lattice', either by previewing in the Gnome screensaver preferences or executing the binary directly (/usr/lib/xscreensaver/lattice), Xorg immediately freezes/crashes every time. Machines needs to be rebooted, SSH does not seem to work after crash (probably hard hang). It does not matter whether Compiz is enabled or not (happens with Metacity as well).


This error message is hard to produce because of the immediate crash, but I managed after some attempts. Here it is:

$ /usr/lib/xscreensaver/lattice
*********************************WARN_ONCE*********************************
File r300_state.c function r500SetupRSUnit line 1907
Don't know how to satisfy InputsRead=0x00000008
***************************************************************************

And then complete freeze.


- Jaunty beta (tracking/current)
- Using radeon Xorg driver (xserver-xorg-video-radeon 6.12.1-0ubuntu2)
- Kernel linux-image-2.6.28-11-generic 2.6.28-11.41
- Mesa 7.4-0ubuntu1
- Xorg 7.4~5ubuntu18
- libdrm2 2.4.5-0ubuntu4

Hardware:
- ATI X1400 Radeon Mobility, 128MB RAM
- Intel Core Duo 2GHz, 2GB RAM

Will attach Xorg.0.log, kernel log and output of lspci. The Xorg config file is uninteresting since it does not contain anything (default).

This bug was originally reported downstream here:
https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-ati/+bug/361649

Kernel log:
http://launchpadlibrarian.net/25488287/dmesg.txt

lspci:
http://launchpadlibrarian.net/25488303/lspci.txt

Xorg log:
http://launchpadlibrarian.net/25488314/Xorg.0.log

Or would you prefer I attached these files directly to this report ?
Comment 1 Maciej Cencora 2009-04-25 04:57:02 UTC
It should be fixed in current master, can you confirm?
Comment 2 Maciej Cencora 2009-04-25 04:57:25 UTC
Current mesa master of course :)
Comment 3 Øyvind Stegard 2009-04-30 00:34:31 UTC
(In reply to comment #1)
> It should be fixed in current master, can you confirm?
> 

Is there any easy way of testing this without screwing up my default Ubuntu Jaunty installation :) ?
Comment 4 Øyvind Stegard 2009-04-30 00:37:52 UTC
(In reply to comment #3)
> (In reply to comment #1)
> > It should be fixed in current master, can you confirm?
> > 
> 
> Is there any easy way of testing this without screwing up my default Ubuntu
> Jaunty installation :) ?
> 

I'm asking because the affected hardware is actually my work/coding laptop, so I cannot afford to mess too much with it timewise. Is it only necessary to install a newer set of radeon.ko/drm.ko or do I need to update libs as well ? 
Comment 5 Michel Dänzer 2009-04-30 01:22:04 UTC
No need to install anything, just set LIBGL_DRIVERS_PATH to the directory containing the self-built r300_dri.so. You can also set LIBGL_DEBUG=verbose to verify the right one is getting picked up.
Comment 6 Øyvind Stegard 2009-04-30 03:11:09 UTC
(In reply to comment #5)
> No need to install anything, just set LIBGL_DRIVERS_PATH to the directory
> containing the self-built r300_dri.so. You can also set LIBGL_DEBUG=verbose to
> verify the right one is getting picked up.
> 

Very nice approach indeed, I'll get this tested.
Comment 7 Øyvind Stegard 2009-05-03 05:31:34 UTC
Didn't really work too well with the r300_dri.so driver from Mesa master:

oyvind@blackelf:~/tmp/build/mesa$ cd src/mesa/drivers/dri/r300/
oyvind@blackelf:~/tmp/build/mesa/src/mesa/drivers/dri/r300$ export DISPLAY=:0
oyvind@blackelf:~/tmp/build/mesa/src/mesa/drivers/dri/r300$ export LIBGL_DRIVERS_PATH=$PWD
oyvind@blackelf:~/tmp/build/mesa/src/mesa/drivers/dri/r300$ export LIBGL_DEBUG=verbose
oyvind@blackelf:~/tmp/build/mesa/src/mesa/drivers/dri/r300$ /usr/lib/xscreensaver/lattice 
libGL: XF86DRIGetClientDriverName: 5.3.0 r300 (screen 0)
libGL: OpenDriver: trying /home/oyvind/tmp/build/mesa/src/mesa/drivers/dri/r300/tls/r300_dri.so
libGL: OpenDriver: trying /home/oyvind/tmp/build/mesa/src/mesa/drivers/dri/r300/r300_dri.so
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 4, (OK)
drmOpenByBusid: Searching for BusID pci:0000:01:00.0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 4, (OK)
drmOpenByBusid: drmOpenMinor returns 4
drmOpenByBusid: drmGetBusid reports pci:0000:01:00.0
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/oyvind/.drirc: No such file or directory.
*********************************WARN_ONCE*********************************
File r300_mem.c function r300_mem_alloc line 225
Ran out of GART memory (for 1048576)!
Please consider adjusting GARTSize option.
***************************************************************************
 
Error: R300 timed out... exiting

Then X freeze.

I don't know how well the code from Mesa master in r300_dri.so is supposed to interact with the Mesa-installation in Ubuntu Jaunty ? Also, I got a build error when building the entire Mesa tree, but still managed to build the r300 DRI driver by itself.
Comment 8 Tormod Volden 2009-05-03 06:41:58 UTC
Øyvind, you can also try the mesa packages from the xorg-edgers PPA https://launchpad.net/~xorg-edgers/+archive/ppa - the packages for Karmic are from current master head, and they will install fine in Jaunty. In addition you can install the Karmic kernel, which is based on 2.6.30-rc4.
Comment 9 Øyvind Stegard 2009-05-03 13:43:30 UTC
(In reply to comment #8)
> Øyvind, you can also try the mesa packages from the xorg-edgers PPA
> https://launchpad.net/~xorg-edgers/+archive/ppa - the packages for Karmic are
> from current master head, and they will install fine in Jaunty. In addition you
> can install the Karmic kernel, which is based on 2.6.30-rc4.
> 

Ok, I did the Ubuntu LiveCD+xorg-edgers-live-test script procedure, the upgrade worked fine. However, the screensaver crashes exactly the same as with a standard Ubuntu installation. I don't know if the upgrade included the supposed fix. I am unfortunately thus not able to confirm at this moment, but will look more into this later. I'll see if I can fix the Mesa build error and try again with the r300_dri.so driver, it did indeed give a different error. My main problem is, again, that the affected hardware is not a testing/play-machine, but my work-laptop which I need to keep in something of a working condition.
Comment 10 Øyvind Stegard 2009-05-03 14:02:52 UTC
(In reply to comment #8)
> Øyvind, you can also try the mesa packages from the xorg-edgers PPA
> https://launchpad.net/~xorg-edgers/+archive/ppa - the packages for Karmic are
> from current master head, and they will install fine in Jaunty. In addition you
> can install the Karmic kernel, which is based on 2.6.30-rc4.
> 

I booted an Ubuntu LiveCD, added the Karmic repo at https://launchpad.net/~xorg-edgers/+archive/ppa and did an apt-get dist upgrade. This updated at least Mesa with versions from xorg-edgers. Did an X restart and tested the lattice screensaver, but it still immediately freezes. 

Tested with the following Mesa-versions:
libgl1-mesa     7.6.0~git20090502.986d4a9e-0ubuntu...
libgl1-mesa-dri 7.6.0~git20090502.986d4a9e-0ubuntu...
libgl1-mesa-glx 7.6.0~git20090502.986d4a9e-0ubuntu...
libglu1-mesa    7.6.0~git20090502.986d4a9e-0ubuntu...

Comment 11 Michel Dänzer 2009-05-05 04:55:45 UTC
(In reply to comment #7)
> *********************************WARN_ONCE*********************************
> File r300_mem.c function r300_mem_alloc line 225
> Ran out of GART memory (for 1048576)!
> Please consider adjusting GARTSize option.
> ***************************************************************************
> 
> Error: R300 timed out... exiting
> 
> Then X freeze.
> 
> I don't know how well the code from Mesa master in r300_dri.so is supposed to
> interact with the Mesa-installation in Ubuntu Jaunty ?

The above isn't related to that, if anything it's the X driver which isn't setting up enough GART memory (hence the suggestion to increase it with Option "GARTSize"). Can you attach the X log file?

Did you already see the above output when you reported this bug? Are you still seeing the r500SetupRSUnit output with the current driver?
Comment 12 Richard Neill 2009-05-10 19:30:49 UTC
A bit more data:

* This also happens on a Radeon Mobility X700 card 
  (system is Ubuntu Jaunty; all updates applied)


* Different behaviour occurs with the various --preset options:

lattice --preset 1   
  => kills the X server, can recover with Alt-SysRQ-K

lattice --preset 2
  => seems to work OK

lattice --preset 3
  => kills system stone dead (need a power-cycle to recover)
     #surely an X-server bug shouldn't kill the kernel?

lattice --preset 4
  => works for a few seconds, then stone dead.


Of the other screensavers in the rss_glx set, most of them work just fine:
hyperspace, helios, euphoria, skyrocket, solarwinds, plasma, fieldlines, flocks. Two of them seem to do abolutely nothing , but just stay black: cyclone and flux.


The RSS set seem to be pretty good at exposing fatal bugs in ATI drivers - I recall my Rage128 mobility being locked solid by one particular invocation of Euphoria about 5 years ago. I would suggest that they might make quite a good
reliability test for new drivers.
Comment 13 Tormod Volden 2009-05-11 10:50:29 UTC
Confirmed on another X700 Mobility, with latest radeon-rewrite mesa and kernel 2.6.30-rc4.
Comment 14 Fabio Pedretti 2009-06-04 00:48:41 UTC
This bug may be related to https://bugs.freedesktop.org/show_bug.cgi?id=21849
Comment 15 Tormod Volden 2009-06-04 01:17:11 UTC
Maybe related, but the "bad" commit 4247ca942a16745da3d09c58996b276d02655a72 in 21849 never made it into the 2.6.28 kernel. I think the lattice issues here are even older. Looking forward to try the new kernel though.
Comment 16 Michel Dänzer 2009-06-04 01:47:48 UTC
It would be nice to get a response to comment #11...
Comment 17 Fabio Pedretti 2009-06-04 01:56:06 UTC
(In reply to comment #15)
> Maybe related, but the "bad" commit 4247ca942a16745da3d09c58996b276d02655a72 in
> 21849 never made it into the 2.6.28 kernel. I think the lattice issues here are
> even older. Looking forward to try the new kernel though.

I am having that issue with the Ubuntu 2.6.28 kernel which includes a backported radeon module.

A way to confirm it would be to try kernel 2.6.29.4 from http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=M;O=D that is the latest kernel without the bad commit.
Comment 18 Fabio Pedretti 2009-11-10 00:07:43 UTC
Is this bug still reproducible with Ubuntu 9.10 (including mesa 7.6 and linux 2.6.31)?
Comment 19 Fabio Pedretti 2009-11-10 02:36:13 UTC
Original reported of Ubuntu bug confirms this is no longer reproducible. Closing.


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.