Bug 11180

Summary: X crashes when simultaneous rendering is triggered
Product: Mesa Reporter: Bryce Harrington <bryce>
Component: Drivers/X11Assignee: mesa-dev
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: sebastien.valette
Version: unspecified   
Hardware: x86 (IA32)   
OS: Linux (All)   
URL: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-ati/+bug/118798
Whiteboard:
i915 platform: i915 features:
Attachments: Script to reproduce the crash
X log after crash

Description Bryce Harrington 2007-06-06 17:27:39 UTC
This is also reported at Launchpad:  https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-ati/+bug/118798

I've reproduced this user's crash on an M24 radeon mobility x600.  I wasn't able to reproduce it on a Mobility M7, nor on an RV280.

"I have a reproducible X crash when using a simple python program. This code uses the VTK library (package python-vtk). I will attach the code in a reply

Procedure :
the program creates 3 rendering windows. In the beginning of the program, all the three windows are stacked on top of each other.
three steps are necessary :
- Move one of the windows besides the two others
- Pick one of the remaining stacked windows and move it so that it covers (at least partially) the other two windows.
- Move again this same window to uncover parts of the other two windows. This will trigger rendering of these windows, and X crashes...

the interesting part of DMESG is :

[ 148.253647] allocation failed: out of vmalloc space - use vmalloc=<size> to increase size.
[ 148.253735] [drm:radeon_cp_init] *ERROR* radeon_cp_init called without lock held
[ 148.253778] [drm:drm_unlock] *ERROR* Process 7329 using kernel context 0

the last lines of /var/log/Xorg.0.log.old are :

(**) RADEON(0): RADEONSaveScreen(2)

Backtrace:
0: /usr/X11R6/bin/X(xf86SigHandler+0x81) [0x80c5d91]
1: [0xffffe420]
2: /usr/lib/xorg/modules/extensions//libGLcore.so(XMesaResizeBuffers+0x29) [0xaf8fad29]
3: /usr/lib/xorg/modules/extensions//libGLcore.so [0xaf8f7900]
4: /usr/lib/xorg/modules/extensions//libglx.so [0xb7b6f94a]
5: /usr/X11R6/bin/X(compPositionWindow+0x59) [0x80f6039]
6: /usr/X11R6/bin/X(ResizeChildrenWinSize+0x14f) [0x807a67f]
7: /usr/X11R6/bin/X(miMoveWindow+0x109) [0x8129b79]
8: /usr/X11R6/bin/X(compMoveWindow+0xad) [0x80f704d]
9: /usr/X11R6/bin/X(ConfigureWindow+0x6b7) [0x8079e17]
10: /usr/X11R6/bin/X(ProcConfigureWindow+0xa1) [0x808bda1]
11: /usr/X11R6/bin/X [0x8142531]
12: /usr/X11R6/bin/X(Dispatch+0x19f) [0x808c61f]
13: /usr/X11R6/bin/X(main+0x495) [0x8074785]
14: /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xdc) [0xb7cfeebc]
15: /usr/X11R6/bin/X(FontFileCompleteXLFD+0x1e1) [0x8073ab1]

Fatal server error:
Caught signal 11. Server aborting

(**) RADEON(0): RADEONLeaveVT
(**) RADEON(0): RADEONRestore
(**) RADEON(0): RADEONRestoreMode()
(**) RADEON(0): RADEONRestoreMode(0x81f6a40)
(**) RADEON(0): RADEONRestoreMemMapRegisters() :
(**) RADEON(0): MC_FB_LOCATION : 0x1fff0000
(**) RADEON(0): MC_AGP_LOCATION : 0x27ff2000
(**) RADEON(0): Map Changed ! Applying ...
(**) RADEON(0): Map applied, resetting engine ...
(**) RADEON(0): Updating display base addresses...
(**) RADEON(0): Memory map updated.
(**) RADEON(0): Programming CRTC1, offset: 0x00000000
(**) RADEON(0): Wrote: 0x001c0007 0x00060065 0x00000000 (0x0000bf00)
(**) RADEON(0): Wrote: rd=7, fd=101, pd=6
(**) RADEON(0): Ok, leaving now...

This does not happen when using fglrx. My graphics card :
01:00.0 VGA compatible controller: ATI Technologies Inc RV370 5B64 [FireGL V3100 (PCIE)] (rev 80)
01:00.1 Display controller: ATI Technologies Inc RV370 5B64 [FireGL V3100 (PCIE)] (Secondary) (rev 80)
"
Comment 1 Bryce Harrington 2007-06-06 17:28:55 UTC
Created attachment 10213 [details]
Script to reproduce the crash

This also requires installing python-vtk.
Comment 2 Michel Dänzer 2007-06-06 23:32:18 UTC
Looks similar to bug 10995. Does this also happen with direct rendering or accelerated indirect rendering?
Comment 3 Sebastien Valette 2007-06-07 09:46:16 UTC
I am the user who reported the bug.

Dri was not used. (bad initialization due to bad settings in xorg.conf)

Now that DRI is enabled, the crash no longer occurs.
Comment 4 Sebastien Valette 2007-06-08 08:28:52 UTC
Created attachment 10232 [details]
X log after crash

Correction : I still am able to reproduce the bug with DRI enabled.

Only, I have to move the front window faster (to trigger a lot of renderings)

here is my /var/log/Xorg.0.log.old
Comment 5 Michel Dänzer 2007-06-08 08:35:32 UTC
(In reply to comment #4)
> Correction : I still am able to reproduce the bug with DRI enabled.

The fact that XMesa functions are called indicates that at least one context is still using indirect rendering.
Comment 6 Sebastien Valette 2007-06-11 05:25:50 UTC
>The fact that XMesa functions are called indicates that at least one context is
>still using indirect rendering.

<Newbie scratches head>

You must be right :), but the attached X crash log shows that AIGLX is disabled. Is there a way to detect what "context" uses Indirect rendering?
Comment 7 Michel Dänzer 2007-06-11 05:54:33 UTC
(In reply to comment #6)
> the attached X crash log shows that AIGLX is disabled. 

Which could be part of the problem - that forces indirect rendering to use software rendering.

> Is there a way to detect what "context" uses Indirect rendering?

Running the 3D app(s) with the environment variable LIBGL_DEBUG=verbose could give a hint.
Comment 8 Sebastien Valette 2007-06-11 08:54:36 UTC
Ok, my bad.

Sorry for the noise. I had fglrx conflicting with the open source driver.

No problems 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.