X crashes when simultaneous rendering is triggered

Bug #118798 reported by Sébastien Valette
2
Affects Status Importance Assigned to Milestone
X.Org X server
Fix Released
Medium
xserver-xorg-video-ati (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: xserver-xorg-video-ati

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 programm creates 3 rendering windows. In the begining of the programm, 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)

Revision history for this message
Sébastien Valette (sebastien-valette) wrote :

Here is the code to reproduce the crash

Revision history for this message
In , Bryce Harrington (bryce) wrote :

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)
"

Revision history for this message
In , Bryce Harrington (bryce) wrote :

Created an attachment (id=10213)
Script to reproduce the crash

This also requires installing python-vtk.

Revision history for this message
Bryce Harrington (bryce) wrote :

Thanks for the bug report, and especially the test case!

I was able to reproduce a crash on an M24 Radon Mobility X600. On a Radeon Mobility M7 running Gutsy and the ati driver it worked fine though. I also tried on an RV280 running Feisty in Xinerama mode, but the window did not render anything in it.

Changed in xserver-xorg-video-ati:
importance: Undecided → Medium
status: Unconfirmed → Confirmed
Revision history for this message
In , Michel-tungstengraphics (michel-tungstengraphics) wrote :

Looks similar to bug 10995. Does this also happen with direct rendering or accelerated indirect rendering?

Revision history for this message
Bryce Harrington (bryce) wrote :

Sébastien, upstream is asking - Does this also happen with direct rendering or accelerated indirect rendering?

Changed in xserver-xorg-video-ati:
status: Confirmed → Needs Info
Changed in xorg-server:
status: Unknown → Confirmed
Revision history for this message
In , Sébastien Valette (sebastien-valette) wrote :

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.

Revision history for this message
Sébastien Valette (sebastien-valette) wrote :

"Sébastien, upstream is asking - Does this also happen with direct rendering or accelerated indirect rendering?"

Well, I found out that dri was not used. (bad initialization due to bad settings in xorg.conf)

Now that DRI is enabled, the crash no longer occurs.

Revision history for this message
In , Sébastien Valette (sebastien-valette) wrote :

Created an attachment (id=10232)
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

Revision history for this message
In , Michel-tungstengraphics (michel-tungstengraphics) wrote :

(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.

Revision history for this message
In , Sébastien Valette (sebastien-valette) wrote :

>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?

Revision history for this message
In , Michel-tungstengraphics (michel-tungstengraphics) wrote :

(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.

Revision history for this message
In , Sébastien Valette (sebastien-valette) wrote :

Ok, my bad.

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

No problems now...

Revision history for this message
Bryce Harrington (bryce) wrote :

Thanks for following up on this. What changes did you make to xorg.conf to enable DRI?

Revision history for this message
Sébastien Valette (sebastien-valette) wrote :

I removed the fglrx drivers..... it was conflicting with the open source driver

Revision history for this message
Bryce Harrington (bryce) wrote :

Ah, thanks for letting us know.

Changed in xserver-xorg-video-ati:
status: Needs Info → Fix Released
Changed in xorg-server:
status: Confirmed → Fix Released
Changed in xorg-server:
importance: Unknown → Medium
Changed in xorg-server:
importance: Medium → Unknown
Changed in xorg-server:
importance: Unknown → Medium
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.