Comment 19 for bug 401067

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

Forwarding this bug from Ubuntu reporter Sandro Mani:
http://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/401067

[Problem]
Occasionally X crashes while using 3d apps in wine, using the Xorg edgers PPA. It does not crash with stock Karmic.

[Original Description]
Running an up-to-date Ubuntu Karmic x86_64, hardware details attached.

For some background, wine is failing on any attempt to run a non-native 3D application, with the following scenarios (in order of probability):
1) Immediate GLXBadDrawable, wine exits
2) The usual sequence of "WINED3DFMT_A8R8G8B8" and similar error messages (see below) followed by a GLXBadDrawable + exit.
3) The usual "WINED3DFMT_A8R8G8B8" plus wine displaying an empty window frame, the should-be 3D content missing, manual CTRL+C to exit.

The above can happen both with xorg-edgers and stock Karmic. But with xorg-edgers (only), it also can result in a crash of the X server. The X crash is what this bug report will focus on.

The wine output reads:

fixme:d3d_caps:IWineD3DImpl_FillGLCaps Received unrecognized GL_VENDOR Tungsten Graphics, Inc. Setting VENDOR_WINE.
fixme:d3d:check_fbo_compat Format WINED3DFMT_R8G8B8 with rendertarget flag is not supported as FBO color attachment, and no fallback specified.
fixme:d3d:check_fbo_compat Format WINED3DFMT_A8R8G8B8 with rendertarget flag is not supported as FBO color attachment, and no fallback specified.
fixme:d3d:check_fbo_compat Format WINED3DFMT_X8R8G8B8 with rendertarget flag is not supported as FBO color attachment, and no fallback specified.
fixme:d3d:check_fbo_compat Format WINED3DFMT_R5G6B5 rtInternal format is not supported as FBO color attachment.
fixme:d3d:check_fbo_compat Format WINED3DFMT_R16G16_UNORM rtInternal format is not supported as FBO color attachment.
fixme:d3d:check_fbo_compat Format WINED3DFMT_R16G16B16A16_UNORM with rendertarget flag is not supported as FBO color attachment, and no fallback specified.
fixme:win:EnumDisplayDevicesW ((null),0,0x32f7e0,0x00000000), stub!

It does not make any difference whether I run compiz or metacity.

Xorg.0.log is attached. Additionally I did some other testing, and I forgot to mention that the attempts often end with messages like

X Error of failed request: GLXBadDrawable
  Major opcode of failed request: 153 (GLX)
  Minor opcode of failed request: 5 (X_GLXMakeCurrent)
  Serial number of failed request: 505
  Current serial number in output stream: 505

Also here, if I try repeatedly, occasionally one attempt wont end with GLXBadDrawable but will either crash X or terminate on it's own/hang shortly after the

fixme:d3d_caps:IWineD3DImpl_FillGLCaps Received unrecognized GL_VENDOR Tungsten Graphics, Inc. Setting VENDOR_WINE.
fixme:d3d:check_fbo_compat Format WINED3DFMT_R8G8B8 with rendertarget flag is not supported as FBO color attachment, and no fallback specified.
fixme:d3d:check_fbo_compat Format WINED3DFMT_A8R8G8B8 with rendertarget flag is not supported as FBO color attachment, and no fallback specified.
fixme:d3d:check_fbo_compat Format WINED3DFMT_X8R8G8B8 with rendertarget flag is not supported as FBO color attachment, and no fallback specified.
fixme:d3d:check_fbo_compat Format WINED3DFMT_R5G6B5 rtInternal format is not supported as FBO color attachment.
fixme:d3d:check_fbo_compat Format WINED3DFMT_R16G16_UNORM rtInternal format is not supported as FBO color attachment.
fixme:d3d:check_fbo_compat Format WINED3DFMT_R16G16B16A16_UNORM with rendertarget flag is not supported as FBO color attachment, and no fallback specified.

block.
I have never found any (EE) entries after a crash in Xorg.0.log (or in any other log as I mentioned above...)

Also native linux applications seem to have problems: I tried compiling and running vdrift, and X froze as soon as a track finished loading. Sound playback did continue for a while though, which seems to indicate that only X froze and not the whole system... Again, I did not find any helpful information in any logs...

I had a look at different setups and got the following results:
- Both Jaunty and Karmic, GM45 (the Lenovo T400 I am experiencing the problem on): crash as described
- Jaunty, proprietary ATI (HD3400) and proprietary NVIDIA: no problems of this kind (though I know nvidia has it's own driver framework)
- Jaunty, opensource ATI (Lenovo T60, x1400, xserver-xorg-video-ati): Often GlxBadDrawable errors, but once in a while the applications started without any subsequent crashing.
- Jaunty, older intel graphics (Intel GMA900): no problems of this kind

The crashing itself as described in the initial description only appeared using the intel driver on the GM45 chipset, therefore I suspect that the problem lies there. On the other hand the GlxBadDrawable error seems to be a more widespread problem, though I didn't have the chance to test the newest packages on the T60 system as I do not own the laptop.

Anyway, for the X crash, here's the backtrace:

Backtrace:
0: /usr/bin/X(xorg_backtrace+0x26) [0x4eff56]
1: /usr/bin/X(xf86SigHandler+0x41) [0x480761]
2: /lib/libc.so.6 [0x7fdbd57f1cd0]
3: /usr/lib/dri/i965_dri.so(intelDestroyContext+0xeb) [0x7fdbd36c898b]
4: /usr/lib/dri/i965_dri.so [0x7fdbd36be820]
5: /usr/lib/xorg/modules/extensions//libglx.so [0x7fdbd4ada059]
6: /usr/lib/xorg/modules/extensions//libglx.so(__glXFreeContext+0x6c) [0x7fdbd4acf9fc]
7: /usr/lib/xorg/modules/extensions//libglx.so [0x7fdbd4acfa33]
8: /usr/bin/X(FreeResourceByType+0x11f) [0x435e4f]
9: /usr/lib/xorg/modules/extensions//libglx.so [0x7fdbd4acc2ee]
10: /usr/lib/xorg/modules/extensions//libglx.so [0x7fdbd4acfc99]
11: /usr/bin/X(Dispatch+0x384) [0x44dff4]
12: /usr/bin/X(main+0x3b5) [0x433fa5]
13: /lib/libc.so.6(__libc_start_main+0xe6) [0x7fdbd57dd606]
14: /usr/bin/X [0x433429]

(gdb) backtrace full
#0 intelDestroyContext (driContextPriv=0x53599a0) at intel_context.c:851
        driDrawPriv = 0x4a036e0
        intel_fb = 0x300000000
        irbDepth = <value optimized out>
        irbStencil = <value optimized out>
        intel = 0x472e070
        __PRETTY_FUNCTION__ = "intelDestroyContext"
#1 0x00007ff6d83878d0 in driDestroyContext (pcp=0x53599a0)
    at ../common/dri_util.c:545
No locals.
...