Bug 14551

Summary: Many OpenGL Applications cause X to Crash with Mesa Issue
Product: Mesa Reporter: David Tomaschik <ozone>
Component: Drivers/DRI/i965Assignee: Eric Anholt <eric>
Status: RESOLVED DUPLICATE QA Contact:
Severity: major    
Priority: medium    
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
URL: https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/178292
Whiteboard:
i915 platform: i915 features:
Attachments: GDB Backtrace

Description David Tomaschik 2008-02-18 11:43:30 UTC
Created attachment 14393 [details]
GDB Backtrace

Whenever I start (for example) World of Warcraft in WINE, X segfaults and gdm restarts the system.  After a number of adjustments to be able to get a good backtrace from gdb, I was able to narrow it down to a null pointer dereference in i965_dri.so.  Non-3D Apps run fine, as do basic 3d apps (glxgears, etc.).

I would be more than happy to do any debugging necessary to fix this.  I can't find any technical reason why WoW should not work through Wine on an i965 system.

Steps to reproduce:
1. Install WoW via Wine
2. Run 'wine WoW.exe'

Expected behavior:
WoW Runs.

Actual behavior:
X Segfaults.
Comment 1 Gordon Jin 2008-02-18 21:55:02 UTC
When you say "Many OpenGL Applications" in the title, do you have other examples despite "WoW in Wine", especially without Wine involved?

It will be good if you could provide more info according to http://intellinuxgraphics.org/how_to_report_bug.html.
Comment 2 Eric Anholt 2008-02-19 11:31:31 UTC
WoW in wine starts up fine (though it renders terribly) with master of everything for me.  You probably want to figure out what's going wrong with your system such that wine is doing indirect rendering (GL rendered from the server), as that would help a lot with your debugging efforts.
Comment 3 David Tomaschik 2008-02-19 12:10:55 UTC
According to glxinfo, my system is doing direct rendering.  What leads you to believe wine is not using direct rendering?

My "Many OpenGL Applications" is based off of comments on the Launchpad Bug.  I have yet to reproduce with any other application myself.  

Some system information:
2.6.24-7-generic on x86_64, using 7.0.2-4ubuntu2 libraries and DRI drivers with the 2:1.4.1~git20080131-1ubuntu2 X Server.

The hardware is Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller.

I'm going to try some other OpenGL apps and will report if I can reproduce.
Comment 4 Eric Anholt 2008-02-19 12:34:14 UTC
The reason I said wine isn't doing direct rendering is that your backtrace is from the server calling into the driver.  So, unless wine is doing some weird testing where it forces indirect, that suggests that direct rendering is failing in your wine environment.  LIBGL_DEBUG=verbose when starting wine may help.
Comment 5 David Tomaschik 2008-02-20 04:57:48 UTC
It seems the indirect issue was caused by running the 32-bit app on a 64 bit system.  Setting LIBGL_DRIVERS_PATH=/usr/lib32/dri prevented the X crash, though now WoW Crashes under those conditions.
Comment 6 David Tomaschik 2008-02-20 10:56:57 UTC
Ok, some more information regarding the current issue (which I still believe to be a Mesa issue, but if it is wine, let me know and I'll take it there.)

When using the 32-bit i965_dri.so, X doesn't crash (yay) but Wine/WoW does (boo).

I'm not really sure how to debug the issue much, but winedbg does give a somewhat reasonable backtrace:

=>1 0x7df2c620 in i965_dri.so (+0x4d620) (0x0034e91c)
  2 0x7dfe9cf5 _mesa_ProgramStringARB+0x125() in i965_dri.so (0x0034e94c)
  3 0x7e765ac7 IWineD3DImpl_FillGLCaps+0x8157() in wined3d (0x0034ec2c)
  4 0x7e76e006 InitAdapters+0x1f16() in wined3d (0x0034f07c)
  5 0x7e7de612 WineDirect3DCreate+0x22() in wined3d (0x0034f0ac)
  6 0x7e81e0c7 Direct3DCreate9+0x77() in d3d9 (0x0034f0dc)
  7 0x0059e8aa in wow (+0x19e8aa) (0x0034f0f0)
  8 0x00598797 in wow (+0x198797) (0x0034f718)
  9 0x0063aa0a in wow (+0x23aa0a) (0x0034fb4c)
  10 0x00636f9f in wow (+0x236f9f) (0x0034fbfc)
  11 0x004060e8 in wow (+0x60e8) (0x0034fe5c)
  12 0x004061e6 in wow (+0x61e6) (0x0034fe6c)
  13 0x00406238 in wow (+0x6238) (0x0034ff08)
  14 0x7b8708b1 in kernel32 (+0x508b1) (0x0034ffe8)
  15 0xf7eb43d7 wine_switch_to_stack+0x17() in libwine.so.1 (0x00000000)
0x7df2c620: movl	0x10(%eax),%eax

Unfortunately, even installing the -dbg packages don't give me a symbol for the first frame -- not sure if that's normal for this or not.

If there's anything else I can do to help debug this issue, please let me know. 
Comment 7 David Tomaschik 2008-02-20 12:00:03 UTC
This may be a duplicate of, or related to, https://bugs.freedesktop.org/show_bug.cgi?id=13492
Comment 8 Eric Anholt 2008-02-28 15:57:41 UTC
dupe, already fixed in master.

*** This bug has been marked as a duplicate of bug 13492 ***

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.