Bug 13492 - 965GM wine Messa crash when using DRI. Google-earth is also dying with error related to the mesa package
Summary: 965GM wine Messa crash when using DRI. Google-earth is also dying with error ...
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium critical
Assignee: Eric Anholt
QA Contact:
URL:
Whiteboard:
Keywords:
: 13947 14551 14574 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-12-02 14:07 UTC by vaLentin
Modified: 2009-08-24 12:28 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Simple testcase to crash i965_dri.so (925 bytes, text/plain)
2007-12-27 17:58 UTC, Anton Ekblad
Details

Description vaLentin 2007-12-02 14:07:16 UTC
I am using i965GM video.

When I try to run Need for speed with wine I am receiving the following error message:

rusinante@sunshine:~$ wine .wine/drive_c/Program\ Files/nsf/speed.exe 
wine: Unhandled page fault on read access to 0x00000010 at address 0x7dd6f339 (thread 0009), starting debugger...
Unhandled exception: page fault on read access to 0x00000010 in 32-bit code (0x7dd6f339).
Register dump:
 CS:0073 SS:007b DS:007b ES:007b FS:0033 GS:003b
 EIP:7dd6f339 ESP:0033f714 EBP:0033f72c EFLAGS:00210206(   - 00      - RIP1)
 EAX:00000000 EBX:7df32ff4 ECX:79d00008 EDX:7c1a7e10
 ESI:79d00008 EDI:7c1a7e10
Stack dump:
0x0033f714:  7c090040 00000001 7c091040 7df32ff4
0x0033f724:  7df32ff4 7df32ff4 0033f75c 7de28d4f
0x0033f734:  79d00008 00008620 7c1a7e10 00000072
0x0033f744:  7c1a7e10 00000000 7c091060 7ec93ff4
0x0033f754:  7ec954bc 0033f908 0033f91c 7ebf73ce
0x0033f764:  00008620 00008875 00000072 7ec79fb8
Backtrace:
=>1 0x7dd6f339 in i965_dri.so (+0x53339) (0x0033f72c)
  2 0x7de28d4f _mesa_ProgramStringARB+0x11a() in i965_dri.so (0x0033f75c)
  3 0x7ebf73ce IWineD3DImpl_FillGLCaps+0x49d1() in wined3d (0x0033f91c)
  4 0x7ebfdca5 InitAdapters+0x1ec7() in wined3d (0x0033fd3c)
  5 0x7ec6b6e1 WineDirect3DCreate+0x1c() in wined3d (0x0033fd6c)
  6 0x7ecabd83 Direct3DCreate9+0x71() in d3d9 (0x0033fd9c)
  7 0x006e6a45 in speed (+0x2e6a45) (0x00000001)
  8 0x00000000 (0x00000000)
0x7dd6f339: movl        0x10(%eax),%eax

Modules:
Module  Address                 Debug info      Name (97 modules)
PE        400000-  a78e4e       Export          speed
PE        a80000-  cca000       Deferred        d3dx9_26
ELF     7bf00000-7bf04000       Deferred        <wine-loader>
ELF     7bf50000-7c000000       Deferred        libasound.so.2
ELF     7c24a000-7c260000       Deferred        midimap<elf>
  \-PE  7c250000-7c260000       \               midimap
ELF     7c260000-7c288000       Deferred        msacm32<elf>
  \-PE  7c270000-7c288000       \               msacm32
ELF     7c288000-7c2a1000       Deferred        msacm32<elf>
  \-PE  7c290000-7c2a1000       \               msacm32
ELF     7c2a1000-7c2d8000       Deferred        winealsa<elf>
  \-PE  7c2b0000-7c2d8000       \               winealsa
ELF     7c2fc000-7c32f000       Deferred        uxtheme<elf>
  \-PE  7c300000-7c32f000       \               uxtheme
ELF     7c3b9000-7c3c3000       Deferred        libxcursor.so.1
ELF     7c3c3000-7c3e1000       Deferred        imm32<elf>
  \-PE  7c3d0000-7c3e1000       \               imm32
ELF     7c3e1000-7c3e5000       Deferred        libxcomposite.so.1
ELF     7c3e5000-7c3ee000       Deferred        libxrender.so.1
ELF     7dcfe000-7dd1c000       Deferred        libexpat.so.1
ELF     7dd1c000-7df4e000       Export          i965_dri.so
ELF     7df4e000-7df58000       Deferred        libdrm.so.2
ELF     7df58000-7df5e000       Deferred        libxfixes.so.3
ELF     7df5e000-7df62000       Deferred        libxdamage.so.1
ELF     7df62000-7dfc0000       Deferred        libgl.so.1
ELF     7dfc0000-7dfc6000       Deferred        libxdmcp.so.6
ELF     7dfc6000-7dfde000       Deferred        libxcb.so.1
ELF     7dfde000-7dfe1000       Deferred        libxcb-xlib.so.0
ELF     7dfe1000-7e0c6000       Deferred        libx11.so.6
ELF     7e0c6000-7e0d4000       Deferred        libxext.so.6
ELF     7e0d4000-7e0eb000       Deferred        libice.so.6
ELF     7e0eb000-7e0f4000       Deferred        libsm.so.6
ELF     7e0f4000-7e185000       Deferred        winex11<elf>
  \-PE  7e100000-7e185000       \               winex11
ELF     7e263000-7e375000       Deferred        libxml2.so.2
ELF     7e375000-7e39e000       Deferred        libfontconfig.so.1
ELF     7e39e000-7e3b0000       Deferred        libz.so.1
ELF     7e3b0000-7e42b000       Deferred        libfreetype.so.6
ELF     7e42b000-7e458000       Deferred        ws2_32<elf>
  \-PE  7e430000-7e458000       \               ws2_32
ELF     7e458000-7e47e000       Deferred        netapi32<elf>
  \-PE  7e460000-7e47e000       \               netapi32
ELF     7e47e000-7e49d000       Deferred        tapi32<elf>
  \-PE  7e490000-7e49d000       \               tapi32
ELF     7e49d000-7e52b000       Deferred        winmm<elf>
  \-PE  7e4b0000-7e52b000       \               winmm
ELF     7e52b000-7e575000       Deferred        dsound<elf>
  \-PE  7e530000-7e575000       \               dsound
ELF     7e575000-7e631000       Deferred        comctl32<elf>
  \-PE  7e580000-7e631000       \               comctl32
ELF     7e631000-7e689000       Deferred        shlwapi<elf>
  \-PE  7e640000-7e689000       \               shlwapi
ELF     7e689000-7e78a000       Deferred        shell32<elf>
  \-PE  7e6a0000-7e78a000       \               shell32
ELF     7e78a000-7e79f000       Deferred        shfolder<elf>
  \-PE  7e790000-7e79f000       \               shfolder
ELF     7e79f000-7e7b1000       Deferred        libresolv.so.2
ELF     7e7b4000-7e7bb000       Deferred        libxrandr.so.2
ELF     7e7bb000-7e7bf000       Deferred        libxinerama.so.1
ELF     7e7c1000-7e7e0000       Deferred        iphlpapi<elf>
  \-PE  7e7d0000-7e7e0000       \               iphlpapi
ELF     7e7e0000-7e83b000       Deferred        rpcrt4<elf>
  \-PE  7e7f0000-7e83b000       \               rpcrt4
ELF     7e83b000-7e8d9000       Deferred        ole32<elf>
  \-PE  7e850000-7e8d9000       \               ole32
ELF     7e8d9000-7e90f000       Deferred        dinput<elf>
  \-PE  7e8e0000-7e90f000       \               dinput
ELF     7e90f000-7e929000       Deferred        dinput8<elf>
  \-PE  7e920000-7e929000       \               dinput8
ELF     7e929000-7e990000       Deferred        msvcrt<elf>
  \-PE  7e940000-7e990000       \               msvcrt
ELF     7e990000-7e9dc000       Deferred        advapi32<elf>
  \-PE  7e9a0000-7e9dc000       \               advapi32
ELF     7e9dc000-7ea71000       Deferred        gdi32<elf>
  \-PE  7e9f0000-7ea71000       \               gdi32
ELF     7ea71000-7eba8000       Deferred        user32<elf>
  \-PE  7ea90000-7eba8000       \               user32
ELF     7eba8000-7ec96000       Export          wined3d<elf>
  \-PE  7ebc0000-7ec96000       \               wined3d
ELF     7ec96000-7ecc4000       Export          d3d9<elf>
  \-PE  7eca0000-7ecc4000       \               d3d9
ELF     7ede2000-7ef07000       Deferred        kernel32<elf>
  \-PE  7ee00000-7ef07000       \               kernel32
ELF     7ef07000-7ef11000       Deferred        libnss_files.so.2
ELF     7ef11000-7ef1b000       Deferred        libnss_nis.so.2
ELF     7ef1b000-7ef32000       Deferred        libnsl.so.1
ELF     7ef32000-7ef3a000       Deferred        libnss_compat.so.2
ELF     7ef3a000-7ef60000       Deferred        libm.so.6
ELF     7ef60000-7f000000       Deferred        ntdll<elf>
  \-PE  7ef70000-7f000000       \               ntdll
ELF     b7d20000-b7d24000       Deferred        libxau.so.6
ELF     b7d25000-b7d29000       Deferred        libdl.so.2
ELF     b7d29000-b7e5e000       Deferred        libc.so.6
ELF     b7e5e000-b7e76000       Deferred        libpthread.so.0
ELF     b7e76000-b7e7c000       Deferred        libxxf86vm.so.1
ELF     b7e86000-b7f9a000       Deferred        libwine.so.1
ELF     b7f9b000-b7fb7000       Deferred        ld-linux.so.2
Threads:
process  tid      prio (all id:s are in hex)
0000000c 
        0000000d    0
00000008 (D) H:\.wine\drive_c\Program Files\nsf\speed.exe
        0000000b    1
        0000000a    2
        00000009    0 <==
Backtrace:
=>1 0x7dd6f339 in i965_dri.so (+0x53339) (0x0033f72c)
  2 0x7de28d4f _mesa_ProgramStringARB+0x11a() in i965_dri.so (0x0033f75c)
  3 0x7ebf73ce IWineD3DImpl_FillGLCaps+0x49d1() in wined3d (0x0033f91c)
  4 0x7ebfdca5 InitAdapters+0x1ec7() in wined3d (0x0033fd3c)
  5 0x7ec6b6e1 WineDirect3DCreate+0x1c() in wined3d (0x0033fd6c)
  6 0x7ecabd83 Direct3DCreate9+0x71() in d3d9 (0x0033fd9c)
  7 0x006e6a45 in speed (+0x2e6a45) (0x00000001)
  8 0x00000000 (0x00000000)
rusinante@sunshine:~$ 

I am pretty sure that it is not a wine bug. I have made a research and found entries for similar issues reported by another users that are using the i9xx video controller. All of them pointed to mesa patches etc. Unfortunately all patches are for mesa 6.x but I am running 7.0.2 and it seems that there are issues with the video I am using.

Please let me know if you need any additional debugging information and how to collect it if it is required.

vaLentin
Comment 1 vaLentin 2007-12-02 14:12:03 UTC
Here are the compiller flags:

CFLAGS="-march=prescott -O2 -pipe -fno-strict-aliasing"

2.6.22-gentoo-r8-sunshine #18 SMP Sun Dec 2 22:36:49 EET 2007 i686 Intel(R) Core(TM)2 Duo CPU T7100 @ 1.80GHz GenuineIntel GNU/Linux

rusinante@sunshine:~$ glxinfo | grep Yes
direct rendering: Yes
rusinante@sunshine:~$ lsmod 
Module                  Size  Used by
i915                   29312  2 
drm                   115224  3 i915
ipw3945                88608  1 
rusinante@sunshine:~$ 
Comment 2 Jesse Barnes 2007-12-04 17:41:54 UTC
Can you get a backtrace with a debug version of the i965_dri.so driver?  That might help narrow it down.

Even better would be a non-wine test case (the simpler the better) that reproduces this bug.
Comment 3 haihao 2007-12-04 18:01:28 UTC
> entries for similar issues reported by another users that are using the i9xx
> video controller. All of them pointed to mesa patches etc. Unfortunately all
> patches are for mesa 6.x but I am running 7.0.2 and it seems that there are
> issues with the video I am using.

Could you point out which patch for mesa 6.x fix this issue?
Comment 4 vaLentin 2007-12-05 08:05:53 UTC
(In reply to comment #2)
> Can you get a backtrace with a debug version of the i965_dri.so driver?  That
> might help narrow it down.
> 
> Even better would be a non-wine test case (the simpler the better) that
> reproduces this bug.
> 

I am afraid that I could not find another way to reproduce this issue outside the wine.

Unfortunately whenever I try to start a game that relies on the MESA DRI feature it gets crashed. If I disable the DRI in the xorg.conf the game starts without errors but without acceleration. 

Another user reported the same issue here:

http://appdb.winehq.org/objectManager.php?sClass=version&iId=9429&iTestingId=17697 "wow wont start since 0.9.49"

Unfortunately I am not too good in the debugging and I am not sure how to produce the output you are looking for.

I have re-compiled xf86-video-i810 and mesa-7.0.2 with debug support.

Despite my efforts I was unable to find any docs how to collect the debugging output produced by MESA. I found only one reference to set my MESA environment variable to:

export MESA=DEBUG

You can download the complete X log here:

http://r0x.lamzo.com/Xorg.0.log

It was produced after I restarted the X with the debug version of the intel driver.

Ok. Here is how I tried to collect information you are looking for (as per instructions available on the following addresses https://wiki.ubuntu.com/Backtrace and  http://live.gnome.org/GettingTraces/Details#gdb-not-yet-running)

rusinante@sunshine:~$ gdb wine 2>&1 | tee nsf.txt
GNU gdb 6.7.1
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
(no debugging symbols found)
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) handle SIG33 pass nostop noprint
Signal        Stop      Print   Pass to program Description
SIG33         No        No      Yes             Real-time event 33
(gdb) set pagination 0
(gdb) run /home/rusinante/games/nsf/speed.exe
Starting program: /usr/bin/wine /home/rusinante/games/nsf/speed.exe
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[New LWP 31365]

Program received signal SIGSEGV, Segmentation fault.
0x7dd84339 in ?? ()
(gdb) backtrace full
#0  0x7dd84339 in ?? ()
No symbol table info available.
#1  0x7c1fd5f8 in ?? ()
No symbol table info available.
#2  0x00000001 in ?? ()
No symbol table info available.
#3  0x7c1fe5f8 in ?? ()
No symbol table info available.
#4  0x7df47ff4 in ?? ()
No symbol table info available.
#5  0x7df47ff4 in ?? ()
No symbol table info available.
#6  0x7df47ff4 in ?? ()
No symbol table info available.
#7  0x0033f75c in ?? ()
No symbol table info available.
#8  0x7de3dd4f in ?? ()
No symbol table info available.
#9  0x7c1e7b58 in ?? ()
No symbol table info available.
#10 0x00008620 in ?? ()
No symbol table info available.
#11 0x7c1a5b50 in ?? ()
No symbol table info available.
#12 0x00000072 in ?? ()
No symbol table info available.
#13 0x7c1a5b50 in ?? ()
No symbol table info available.
#14 0x00000000 in ?? ()
No symbol table info available.
(gdb) info registers
eax            0x0      0
ecx            0x7c1e7b58       2082372440
edx            0x7c1a5b50       2082102096
ebx            0x7df47ff4       2113175540
esp            0x33f714 0x33f714
ebp            0x33f72c 0x33f72c
esi            0x7c1e7b58       2082372440
edi            0x7c1a5b50       2082102096
eip            0x7dd84339       0x7dd84339
eflags         0x210206 [ PF IF RF ID ]
cs             0x73     115
ss             0x7b     123
ds             0x7b     123
es             0x7b     123
fs             0x33     51
gs             0x3b     59
(gdb) thread apply all backtrace

Thread 1 (LWP 31365):
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7e9060b in ?? () from /usr/bin/../lib/libwine.so.1
#2  0x7efe3ff4 in ?? ()
#3  0x00000000 in ?? ()
#0  0x7dd84339 in ?? ()
(gdb) quit

I am not really sure if this is the information you are looking for.

I will greatly appreciate any links to tutorials that will help me out to provide you with the correct information how I can produce "backtrace with a debug version of the i965_dri.so driver?" while running NFS (or any other game that requires DRI) with wine.

>> Could you point out which patch for mesa 6.x fix this issue?

Unfortunately I have not tested none of the mesa 6.x series. I could not find the exact address with the information but one of the references point that mesa should be compiled with GCC 3.4 (is it true since I am 4.1.2?) with   -fno-strict-aliasing. I have already added -fno-strict-aliasing to my make.conf but this did not help.

I am really sorry if I am missing something but that's all the information I was able to collect.

To reproduce:

1. Install wine 0.9.50 and mesa 7.0.2
2. Install Colin Mcrea Rally with wine. (mount -o loop crm.iso /mnt/cdrom, wine /mnt/cdrom/Launcher.exe and finish the installation)
3. Try to start the game with wine and direct rendering enabled in your xorg.conf.
Comment 5 vaLentin 2007-12-07 05:52:31 UTC
(In reply to comment #2)
> Can you get a backtrace with a debug version of the i965_dri.so driver?  That
> might help narrow it down.
> 

Just as an update. You can find the output from the complete stack trace produced by:

strace -o speed.txt wine games/nsf/speed.exe

on the following web address:

http://r0x.lamzo.com/speed.txt

I think that it will help you to easily identify and fix this issue. Thank you in advance once again.

vaLentin

Comment 6 vaLentin 2007-12-11 16:56:37 UTC
Here is an easier way to reproduce:

Download Need For Speed pro street demo from here:

http://www.gamershell.com/download_21822.shtml#Europe

Install the demo:

wine nfsps_pcdemo.exe

Run it:

wine nfsdemo.exe 

Results:

wine: Unhandled page fault on read access to 0x00000010 at address 0x7dda5339 (thread 000a), starting debugger...
Unhandled exception: page fault on read access to 0x00000010 in 32-bit code (0x7dda5339).
Register dump:
 CS:0073 SS:007b DS:007b ES:007b FS:0033 GS:003b
 EIP:7dda5339 ESP:7c76524c EBP:7c765264 EFLAGS:00210206(   - 00      - RIP1)
 EAX:00000000 EBX:7df68ff4 ECX:7c0dcbb8 EDX:7c336a18
 ESI:7c0dcbb8 EDI:7c336a18
Stack dump:
0x7c76524c:  7dff2ff4 00000000 7c765264 7dfddbe7
0x7c76525c:  7df68ff4 7df68ff4 7c765294 7de5ed4f
0x7c76526c:  7c0dcbb8 00008620 7c336a18 00000072
0x7c76527c:  7c336a18 00000000 7c091d40 7ec93ff4
0x7c76528c:  7ec954bc 7c765440 7c765454 7ebf73ce
0x7c76529c:  00008620 00008875 00000072 7ec79fb8
Backtrace:
=>1 0x7dda5339 in i965_dri.so (+0x53339) (0x7c765264)
  2 0x7de5ed4f _mesa_ProgramStringARB+0x11a() in i965_dri.so (0x7c765294)
  3 0x7ebf73ce IWineD3DImpl_FillGLCaps+0x49d1() in wined3d (0x7c765454)
  4 0x7ebfdca5 InitAdapters+0x1ec7() in wined3d (0x7c765874)
  5 0x7ec6b6e1 WineDirect3DCreate+0x1c() in wined3d (0x7c7658a4)
  6 0x7ecabd83 Direct3DCreate9+0x71() in d3d9 (0x7c7658d4)
  7 0x006f119f in nfsdemo (+0x2f119f) (0x00000000)
0x7dda5339: movl        0x10(%eax),%eax
Modules:
Module  Address                 Debug info      Name (92 modules)
PE        400000- 10f3000       Export          nfsdemo
PE       1100000- 146f000       Deferred        d3dx9_34
PE      78130000-781cb000       Deferred        msvcr80
ELF     7bf00000-7bf04000       Deferred        <wine-loader>
PE      7c420000-7c4a7000       Deferred        msvcp80
ELF     7c767000-7c77d000       Deferred        midimap<elf>
  \-PE  7c770000-7c77d000       \               midimap
ELF     7c77d000-7c7a5000       Deferred        msacm32<elf>
  \-PE  7c790000-7c7a5000       \               msacm32
ELF     7c7a5000-7c7be000       Deferred        msacm32<elf>
  \-PE  7c7b0000-7c7be000       \               msacm32
ELF     7c7e2000-7c815000       Deferred        uxtheme<elf>
  \-PE  7c7f0000-7c815000       \               uxtheme
ELF     7c89f000-7c8a9000       Deferred        libxcursor.so.1
ELF     7c8a9000-7c8c7000       Deferred        imm32<elf>
  \-PE  7c8b0000-7c8c7000       \               imm32
ELF     7c8c7000-7c8cb000       Deferred        libxcomposite.so.1
ELF     7c8cb000-7c8d4000       Deferred        libxrender.so.1
ELF     7dd34000-7dd52000       Deferred        libexpat.so.1
ELF     7dd52000-7df84000       Export          i965_dri.so
ELF     7df84000-7df8e000       Deferred        libdrm.so.2
ELF     7df8e000-7df94000       Deferred        libxfixes.so.3
ELF     7df94000-7df98000       Deferred        libxdamage.so.1
ELF     7df98000-7dff6000       Deferred        libgl.so.1
ELF     7dff6000-7dffc000       Deferred        libxdmcp.so.6
ELF     7dffc000-7e0e5000       Deferred        libx11.so.6
ELF     7e0e5000-7e0f3000       Deferred        libxext.so.6
ELF     7e0f3000-7e10a000       Deferred        libice.so.6
ELF     7e10a000-7e113000       Deferred        libsm.so.6
ELF     7e113000-7e1a4000       Deferred        winex11<elf>
  \-PE  7e120000-7e1a4000       \               winex11
ELF     7e282000-7e394000       Deferred        libxml2.so.2
ELF     7e394000-7e3bd000       Deferred        libfontconfig.so.1
ELF     7e3bd000-7e3cf000       Deferred        libz.so.1
ELF     7e3cf000-7e44a000       Deferred        libfreetype.so.6
ELF     7e44a000-7e470000       Deferred        netapi32<elf>
  \-PE  7e450000-7e470000       \               netapi32
ELF     7e470000-7e4fe000       Deferred        winmm<elf>
  \-PE  7e480000-7e4fe000       \               winmm
ELF     7e4fe000-7e548000       Deferred        dsound<elf>
  \-PE  7e510000-7e548000       \               dsound
ELF     7e548000-7e575000       Deferred        ws2_32<elf>
  \-PE  7e550000-7e575000       \               ws2_32
ELF     7e575000-7e631000       Deferred        comctl32<elf>
  \-PE  7e580000-7e631000       \               comctl32
ELF     7e631000-7e689000       Deferred        shlwapi<elf>
  \-PE  7e640000-7e689000       \               shlwapi
ELF     7e689000-7e78a000       Deferred        shell32<elf>
  \-PE  7e6a0000-7e78a000       \               shell32
ELF     7e78a000-7e79f000       Deferred        shfolder<elf>
  \-PE  7e790000-7e79f000       \               shfolder
ELF     7e79f000-7e7b1000       Deferred        libresolv.so.2
ELF     7e7b4000-7e7bb000       Deferred        libxrandr.so.2
ELF     7e7bb000-7e7bf000       Deferred        libxinerama.so.1
ELF     7e7c1000-7e7e0000       Deferred        iphlpapi<elf>
  \-PE  7e7d0000-7e7e0000       \               iphlpapi
ELF     7e7e0000-7e83b000       Deferred        rpcrt4<elf>
  \-PE  7e7f0000-7e83b000       \               rpcrt4
ELF     7e83b000-7e8d9000       Deferred        ole32<elf>
  \-PE  7e850000-7e8d9000       \               ole32
ELF     7e8d9000-7e90f000       Deferred        dinput<elf>
  \-PE  7e8e0000-7e90f000       \               dinput
ELF     7e90f000-7e929000       Deferred        dinput8<elf>
  \-PE  7e920000-7e929000       \               dinput8
ELF     7e929000-7e990000       Deferred        msvcrt<elf>
  \-PE  7e940000-7e990000       \               msvcrt
ELF     7e990000-7e9dc000       Deferred        advapi32<elf>
  \-PE  7e9a0000-7e9dc000       \               advapi32
ELF     7e9dc000-7ea71000       Deferred        gdi32<elf>
  \-PE  7e9f0000-7ea71000       \               gdi32
ELF     7ea71000-7eba8000       Deferred        user32<elf>
  \-PE  7ea90000-7eba8000       \               user32
ELF     7eba8000-7ec96000       Export          wined3d<elf>
  \-PE  7ebc0000-7ec96000       \               wined3d
ELF     7ec96000-7ecc4000       Export          d3d9<elf>
  \-PE  7eca0000-7ecc4000       \               d3d9
ELF     7ede2000-7ef07000       Deferred        kernel32<elf>
  \-PE  7ee00000-7ef07000       \               kernel32
ELF     7ef07000-7ef11000       Deferred        libnss_files.so.2
ELF     7ef11000-7ef1b000       Deferred        libnss_nis.so.2
ELF     7ef1b000-7ef32000       Deferred        libnsl.so.1
ELF     7ef32000-7ef3a000       Deferred        libnss_compat.so.2
ELF     7ef3a000-7ef60000       Deferred        libm.so.6
ELF     7ef60000-7f000000       Deferred        ntdll<elf>
  \-PE  7ef70000-7f000000       \               ntdll
ELF     b7d50000-b7d54000       Deferred        libxau.so.6
ELF     b7d55000-b7d59000       Deferred        libdl.so.2
ELF     b7d59000-b7e8e000       Deferred        libc.so.6
ELF     b7e8e000-b7ea6000       Deferred        libpthread.so.0
ELF     b7ea6000-b7eac000       Deferred        libxxf86vm.so.1
ELF     b7eb6000-b7fca000       Deferred        libwine.so.1
ELF     b7fcb000-b7fe7000       Deferred        ld-linux.so.2
Threads:
process  tid      prio (all id:s are in hex)
00000011 
        00000012    0
00000008 (D) C:\Program Files\demo\nfsdemo.exe
        00000010    2
        0000000f    2
        0000000e    2
        0000000d    0
        0000000c    1
        0000000b    2
        0000000a    0 <==
        00000009    0
Backtrace:
=>1 0x7dda5339 in i965_dri.so (+0x53339) (0x7c765264)
  2 0x7de5ed4f _mesa_ProgramStringARB+0x11a() in i965_dri.so (0x7c765294)
  3 0x7ebf73ce IWineD3DImpl_FillGLCaps+0x49d1() in wined3d (0x7c765454)
  4 0x7ebfdca5 InitAdapters+0x1ec7() in wined3d (0x7c765874)
  5 0x7ec6b6e1 WineDirect3DCreate+0x1c() in wined3d (0x7c7658a4)
  6 0x7ecabd83 Direct3DCreate9+0x71() in d3d9 (0x7c7658d4)
  7 0x006f119f in nfsdemo (+0x2f119f) (0x00000000)
Comment 7 vaLentin 2007-12-12 15:54:17 UTC
I am not really sure if this is related to the above mentioned bug, but MESA is also crashing whenever I try to start google-earth.

The back trace google-earth is producing points to the intel_regions.c file which is part of the MESA package.

rusinante@sunshine:~$ googleearth 
do_wait: drmWaitVBlank returned -1, IRQs don't seem to be working correctly.
Try running with LIBGL_THROTTLE_REFRESH and LIBL_SYNC_REFRESH unset.
googleearth-bin: intel_regions.c:231: intel_region_data: Assertion `dst_offset + dstx + width + (dsty + height - 1) * dst->pitch * dst->cpp <= dst->pitch * dst->cpp * dst->height' failed.
Google Earth has caught signal 6.

Stacktrace from glibc:
  ./googleearth-bin(__gxx_personality_v0+0x1e8) [0x8057fb4]
  ./googleearth-bin [0x8058399]
  [0xffffe420]
  [0xffffe410]
  /lib/libc.so.6(gsignal+0x51) [0xb60cf7f1]
  /lib/libc.so.6(abort+0x108) [0xb60d0fd8]
  /lib/libc.so.6(__assert_fail+0xf5) [0xb60c8cc5]
  /usr/lib/dri/i965_dri.so [0xb02c9749]
  /usr/lib/dri/i965_dri.so(intel_miptree_image_data+0xe5) [0xb02c8b6c]
  /usr/lib/dri/i965_dri.so(intel_finalize_mipmap_tree+0x1d9) [0xb02d0747]
  /usr/lib/dri/i965_dri.so [0xb0302f2b]
  /usr/lib/dri/i965_dri.so(brw_validate_state+0x144) [0xb02ec21c]
  /usr/lib/dri/i965_dri.so [0xb02e0f28]
  /usr/lib/dri/i965_dri.so [0xb02e1227]
  /usr/lib/dri/i965_dri.so(brw_draw_prims+0x93) [0xb02e1709]
  /usr/lib/dri/i965_dri.so [0xb0378e0b]
  ./libIGGfx.so(_ZN3Gap3Gfx18igOglVisualContext11genericDrawEiiiii+0x597) [0xb6828107]
  ./libIGGfx.so(_ZN3Gap3Gfx18igOglVisualContext12internalDrawENS0_11IG_GFX_DRAWEiiii+0xd7) [0xb6844b57]
  ./libIGGfx.so(_ZN3Gap3Gfx18igOglVisualContext4drawENS0_11IG_GFX_DRAWEii+0x3e) [0xb6844bee]
  ./libIGGfx.so(_ZN3Gap3Gfx15igVisualContext14drawNonIndexedENS0_11IG_GFX_DRAWEii+0x4d) [0xb68072cd]
  /opt/googleearth/libevll.so(_ZN5earth4evll20ScreenOverlayTexture4drawEPN3Gap3Gfx15igVisualContextE+0x12c) [0xb38b87da]
  /opt/googleearth/libevll.so(_ZN5earth4evll20ScreenOverlayManager4drawEb+0x265) [0xb38b9379]
  /opt/googleearth/libevll.so(_ZN5earth4evll13VisualContext6renderEb+0xb99) [0xb38f1785]
  /opt/googleearth/libevll.so(_ZN5earth4evll13VisualContext4drawEbb+0xa1) [0xb38f19e7]
  /opt/googleearth/libevll.so(_ZN5earth4evll17RenderContextImpl4drawEv+0xa1) [0xb38abb51]
  ./librender.so(_ZN12RenderWidget10paintEventEP11QPaintEvent+0x24) [0xb62f97d0]
  ./librender.so(_ZN5earth6render11RenderTimer4fireEv+0x14) [0xb62e660c]
  ./libbase.so(_ZN5earth5Timer10timerEventEP11QTimerEvent+0x31) [0xb7f609bb]
  ./libqt-mt.so.3(_ZN7QObject5eventEP6QEvent+0x82) [0xb6dd5fc2]
  ./libqt-mt.so.3(_ZN12QApplication14internalNotifyEP7QObjectP6QEvent+0xa1) [0xb6d6a9a1]
  ./libqt-mt.so.3(_ZN12QApplication6notifyEP7QObjectP6QEvent+0xef) [0xb6d6b4af]
  ./libqt-mt.so.3(_ZN10QEventLoop14activateTimersEv+0x1ed) [0xb6d5e43d]
  ./libqt-mt.so.3(_ZN10QEventLoop13processEventsEj+0x57b) [0xb6d1024b]
  ./libqt-mt.so.3(_ZN10QEventLoop13processEventsEji+0x5a) [0xb6d845ea]
  ./libqt-mt.so.3(_ZN12QApplication13processEventsEi+0x2c) [0xb6d6a33c]
  ./libqt-mt.so.3(_ZN12QApplication13processEventsEv+0x26) [0xb6d6a376]
  /opt/googleearth/liblayer.so(_ZN5earth5layer11LayerWindow5startEv+0x15d) [0xb0a67f03]
  /opt/googleearth/liblayer.so(_ZN5earth5layer11LayerWindow12onFirstEarthERKNS_4evll11UpdateEventE+0x40) [0xb0a6819c]
  /opt/googleearth/libevll.so(_ZN5earth7EmitterINS_4evll14UpdateObserverENS1_11UpdateEventENS_19EmitterDefaultTraitIS2_S3_EEE8doNotifyEMS2_FvRKS3_ES8_+0xa7) [0xb38b4ed3]
  /opt/googleearth/libevll.so(_ZN5earth7EmitterINS_4evll14UpdateObserverENS1_11UpdateEventENS_19EmitterDefaultTraitIS2_S3_EEE6notifyEMS2_FvRKS3_ES8_b+0x3e) [0xb38b4f58]
  /opt/googleearth/libevll.so [0xb38ae31a]
  ./libbase.so(_ZN5earth5Timer10timerEventEP11QTimerEvent+0x31) [0xb7f609bb]
  ./libqt-mt.so.3(_ZN7QObject5eventEP6QEvent+0x82) [0xb6dd5fc2]
  ./libqt-mt.so.3(_ZN12QApplication14internalNotifyEP7QObjectP6QEvent+0xa1) [0xb6d6a9a1]
  ./libqt-mt.so.3(_ZN12QApplication6notifyEP7QObjectP6QEvent+0xef) [0xb6d6b4af]
  ./libqt-mt.so.3(_ZN10QEventLoop14activateTimersEv+0x1ed) [0xb6d5e43d]
  ./libqt-mt.so.3(_ZN10QEventLoop13processEventsEj+0x57b) [0xb6d1024b]
  ./libqt-mt.so.3(_ZN10QEventLoop9enterLoopEv+0xa9) [0xb6d844e9]
  ./libqt-mt.so.3(_ZN10QEventLoop4execEv+0x26) [0xb6d843e6]
  ./libqt-mt.so.3(_ZN12QApplication4execEv+0x1f) [0xb6d6a39f]
  ./libgoogleearth.so(_ZN5earth6client11Application3runEv+0x24f) [0xb7709821]
  ./googleearth-bin(main+0x11f) [0x8058817]
  /lib/libc.so.6(__libc_start_main+0xdc) [0xb60bc3dc]
  ./googleearth-bin(__gxx_personality_v0+0x75) [0x8057e41]

Here is the output from the Google-earth crash log:

rusinante@sunshine:~$ cat /home/rusinante/.googleearth/crashlogs/crashlog-5D5E7A9C.txt
CRASHLOGVER 1
CRASHLOGID 0x5D5E7A9C
APPVERMAJOR 4
APPVERMINOR 2
APPVERBUILD 205
APPBUILDDATE Nov 13 2007
APPBUILDTIME 17:52:07
OSTYPE 11
OSVERMAJOR 2
OSVERMINOR 6
OSVERBUILD 22
OSVERPATCH 0
PID 31460
CRASHSIGNAL 6
CRASHTIME 1197502886
PROGRAMUPTIME 60

STACK 0x8057fb4
STACK 0x8058399
STACK 0xffffe420
STACK 0xffffe410
STACK 0xb60cf7f1
STACK 0xb60d0fd8
STACK 0xb60c8cc5
STACK 0xb02c9749
STACK 0xb02c8b6c
STACK 0xb02d0747
STACK 0xb0302f2b
STACK 0xb02ec21c
STACK 0xb02e0f28
STACK 0xb02e1227
STACK 0xb02e1709
STACK 0xb0378e0b
STACK 0xb6828107
STACK 0xb6844b57
STACK 0xb6844bee
STACK 0xb68072cd
STACK 0xb38b87da
STACK 0xb38b9379
STACK 0xb38f1785
STACK 0xb38f19e7
STACK 0xb38abb51
STACK 0xb62f97d0
STACK 0xb62e660c
STACK 0xb7f609bb
STACK 0xb6dd5fc2
STACK 0xb6d6a9a1
STACK 0xb6d6b4af
STACK 0xb6d5e43d
STACK 0xb6d1024b
STACK 0xb6d845ea
STACK 0xb6d6a33c
STACK 0xb6d6a376
STACK 0xb0a67f03
STACK 0xb0a6819c
STACK 0xb38b4ed3
STACK 0xb38b4f58
STACK 0xb38ae31a
STACK 0xb7f609bb
STACK 0xb6dd5fc2
STACK 0xb6d6a9a1
STACK 0xb6d6b4af
STACK 0xb6d5e43d
STACK 0xb6d1024b
STACK 0xb6d844e9
STACK 0xb6d843e6
STACK 0xb6d6a39f
STACK 0xb7709821
STACK 0x8058817
STACK 0xb60bc3dc
STACK 0x8057e41

DSO googleearth-bin/0x8048000/111416
DSO linux-gate.so.1/0xffffe000/1580
DSO libbase.so/0xb7f1e000/669696
DSO libcomponent.so/0xb7f07000/86805
DSO libfusion.so/0xb7f02000/13124
DSO libgeobase.so/0xb7b9c000/3443270
DSO libmath.so/0xb7b81000/103833
DSO libwmsbase.so/0xb7b1b000/395459
DSO libnet.so/0xb7ad1000/287819
DSO libalchemyext.so/0xb7acc000/15216
DSO libcollada.so/0xb7773000/3388384
DSO libgoogleearth.so/0xb7606000/1439454
DSO libGLU.so.1/0xb7587000/507779
DSO libcrypto.so.0.9.8/0xb7461000/1103016
DSO libcurl.so.3/0xb7438000/159800
DSO libfreeimage.so.3/0xb7375000/770245
DSO libgcc_s.so.1/0xb736a000/39096
DSO libjpeg.so.62/0xb7345000/139688
DSO libmng.so.1/0xb72e8000/364312
DSO libpng12.so.0/0xb72c0000/156964
DSO libqt-mt.so.3/0xb6b8a000/7313347
DSO libqui.so.1/0xb6aee000/621811
DSO libssl.so.0.9.8/0xb6ab2000/221460
DSO libstdc++.so.6/0xb69d8000/849472
DSO libtiff.so.3/0xb697c000/364328
DSO libz.so.1/0xb6965000/86972
DSO libIGCore.so/0xb686e000/952308
DSO libIGGfx.so/0xb67b5000/704928
DSO libIGAttrs.so/0xb6753000/365780
DSO libIGDisplay.so/0xb673f000/70352
DSO libIGGui.so/0xb66fd000/246068
DSO libIGSg.so/0xb65ef000/1036804
DSO libIGCollision.so/0xb65df000/55044
DSO libIGMath.so/0xb6596000/277228
DSO libIGUtils.so/0xb656f000/146568
DSO libIGOpt.so/0xb6494000/841480
DSO libIGExportCommon.so/0xb640c000/517352
DSO libcommon.so/0xb630e000/997730
DSO librender.so/0xb62b4000/349174
DSO libauth.so/0xb6229000/548318
DSO libframework.so/0xb6212000/86398
DSO libm.so.6/0xb61dc000/144196
DSO libc.so.6/0xb60a6000/1240904
DSO libpthread.so.0/0xb608e000/79336
DSO libdl.so.2/0xb608a000/7116
DSO libXrender.so.1/0xb6081000/27848
DSO libXcursor.so.1/0xb6076000/30180
DSO libXft.so.2/0xb6063000/68020
DSO libfreetype.so.6/0xb5fe8000/483684
DSO libfontconfig.so.1/0xb5fbf000/159264
DSO libXext.so.6/0xb5fb1000/48704
DSO libX11.so.6/0xb5ec8000/935544
DSO libSM.so.6/0xb5ebe000/26368
DSO libICE.so.6/0xb5ea7000/75992
DSO libGL.so.1/0xb5e49000/351148
DSO ld-linux.so.2/0xb7fca000/106452
DSO libXfixes.so.3/0xb5e42000/12580
DSO libxml2.so.2/0xb5d30000/1096972
DSO libXau.so.6/0xb5d2c000/5508
DSO libXdmcp.so.6/0xb5d26000/14532
DSO libXxf86vm.so.1/0xb5d20000/13992
DSO libXdamage.so.1/0xb5d1b000/4524
DSO libdrm.so.2/0xb5d11000/29508
DSO libnss_compat.so.2/0xb52ee000/23952
DSO libnsl.so.1/0xb52d7000/74592
DSO libnss_nis.so.2/0xb52cd000/31692
DSO libnss_files.so.2/0xb52c3000/32576
DSO libnss_dns.so.2/0xb52fe000/13016
DSO libresolv.so.2/0xb3a9e000/57212
DSO libevll.so/0xb3493000/6108992
DSO libnavigate.so/0xb0b00000/1336238
DSO liblayer.so/0xb08af000/2359150
DSO libmeasure.so/0xb07ff000/696250
DSO libbasicIngest.so/0xb0714000/915434
DSO libgooglesearch.so/0xb0659000/741326
DSO libinput_plugin.so/0xb061e000/232214
DSO libflightsim.so/0xb0519000/1022678
DSO i965_dri.so/0xb0295000/2167124
DSO libexpat.so.1/0xb0277000/114028

To reproduce this issue:

Install mesa 7.0.2, xorg-x11 7.3, xorg-server 1.4-r2, xf86-video-i810 2.2.0, libdrm 2.3.0 and x11-base/x11-drm 20071019 which are the latest versions in the current Gentoo portage tree. Once installed please use the xorg.conf configuration file available here:

http://r0x.lamzo.com/xorg.conf

Install Google-earth from the Gentoo portage and try to start the application. It is loading fine and you can see the startup  screen as well as the tip of the day message. After a second Google earth gets crashed with the above mentioned errors reported at the console.
Comment 8 vaLentin 2007-12-17 09:44:44 UTC
I have managed to obtain the following errors when I tried with DRM and MESA from the GIT:

Backtrace:
=>1 0x7dd6e9a4 brwProgramStringNotify+0x8e(ctx=0x7c07e5f0, target=0x8620, prog=0x7c20c8f0) [/usr/local/src/mesa/src/mesa/drivers/dri/i965/brw_program.c:128] in i965_dri.so (0x0033f72c)
  2 0x7de32662 _mesa_ProgramStringARB+0x100(target=0x8620, format=0x8875, len=0x72, string=0x7ec79fb8) [/usr/local/src/mesa/src/mesa/shader/arbprogram.c:233] in i965_dri.so (0x0033f75c)

Here is the complete back trace produced by wine:

rusinante@sunshine:~$ wine games/nsf/speed.exe 
Failed to initialize TTM buffer manager.  Falling back to classic.
Failed to initialize TTM buffer manager.  Falling back to classic.
Failed to initialize TTM buffer manager.  Falling back to classic.
wine: Unhandled page fault on read access to 0x00000010 at address 0x7dd6e9a4 (thread 0009), starting debugger...
Unhandled exception: page fault on read access to 0x00000010 in 32-bit code (0x7dd6e9a4).
Register dump:
 CS:0073 SS:007b DS:007b ES:007b FS:0033 GS:003b
 EIP:7dd6e9a4 ESP:0033f714 EBP:0033f72c EFLAGS:00210206(   - 00      - RIP1)
 EAX:00000000 EBX:7df3fff4 ECX:7c07e5f0 EDX:7c20c8f0
 ESI:7c20c8f0 EDI:7c07e5f0
Stack dump:
0x0033f714:  7c0fa218 00000001 7c0fb218 7df3fff4
0x0033f724:  7c07e5f0 7c20c8f0 0033f75c 7de32662
0x0033f734:  7c07e5f0 00008620 7c20c8f0 00000072
0x0033f744:  7c20c8f0 00000001 7c0fb238 7ec93ff4
0x0033f754:  7ec954bc 0033f908 0033f91c 7ebf73ce
0x0033f764:  00008620 00008875 00000072 7ec79fb8
Backtrace:
=>1 0x7dd6e9a4 brwProgramStringNotify+0x8e(ctx=0x7c07e5f0, target=0x8620, prog=0x7c20c8f0) [/usr/local/src/mesa/src/mesa/drivers/dri/i965/brw_program.c:128] in i965_dri.so (0x0033f72c)
  2 0x7de32662 _mesa_ProgramStringARB+0x100(target=0x8620, format=0x8875, len=0x72, string=0x7ec79fb8) [/usr/local/src/mesa/src/mesa/shader/arbprogram.c:233] in i965_dri.so (0x0033f75c)
  3 0x7ebf73ce IWineD3DImpl_FillGLCaps+0x49d1() in wined3d (0x0033f91c)
  4 0x7ebfdca5 InitAdapters+0x1ec7() in wined3d (0x0033fd3c)
  5 0x7ec6b6e1 WineDirect3DCreate+0x1c() in wined3d (0x0033fd6c)
  6 0x7ecabd83 Direct3DCreate9+0x71() in d3d9 (0x0033fd9c)
  7 0x006e6a45 in speed (+0x2e6a45) (0x00000001)
  8 0x00000000 (0x00000000)
0x7dd6e9a4 brwProgramStringNotify+0x8e [/usr/local/src/mesa/src/mesa/drivers/dri/i965/brw_program.c:128] in i965_dri.so: movl   0x10(%eax),%eax
Unable to open file '/usr/local/src/mesa/src/mesa/drivers/dri/i965/brw_program.c'
Modules:
Module  Address                 Debug info      Name (92 modules)
PE        400000-  a78e4e       Export          speed
PE        a80000-  cca000       Deferred        d3dx9_26
ELF     7bf00000-7bf04000       Deferred        <wine-loader>
ELF     7c281000-7c297000       Deferred        midimap<elf>
  \-PE  7c290000-7c297000       \               midimap
ELF     7c297000-7c2bf000       Deferred        msacm32<elf>
  \-PE  7c2a0000-7c2bf000       \               msacm32
ELF     7c2bf000-7c2d8000       Deferred        msacm32<elf>
  \-PE  7c2d0000-7c2d8000       \               msacm32
ELF     7c2fc000-7c32f000       Deferred        uxtheme<elf>
  \-PE  7c300000-7c32f000       \               uxtheme
ELF     7c3b9000-7c3c3000       Deferred        libxcursor.so.1
ELF     7c3c3000-7c3e1000       Deferred        imm32<elf>
  \-PE  7c3d0000-7c3e1000       \               imm32
ELF     7c3e1000-7c3e8000       Deferred        libxrandr.so.2
ELF     7c3e8000-7c3ec000       Deferred        libxinerama.so.1
ELF     7dcfc000-7dd1a000       Deferred        libexpat.so.1
ELF     7dd1a000-7df5a000       Dwarf           i965_dri.so
ELF     7df5a000-7df64000       Deferred        libdrm.so.2
ELF     7df64000-7df6a000       Deferred        libxfixes.so.3
ELF     7df6a000-7dfc9000       Deferred        libgl.so.1
ELF     7dfc9000-7dfcf000       Deferred        libxdmcp.so.6
ELF     7dfcf000-7e0b8000       Deferred        libx11.so.6
ELF     7e0b8000-7e0c6000       Deferred        libxext.so.6
ELF     7e0c6000-7e0cc000       Deferred        libxxf86vm.so.1
ELF     7e0cc000-7e0e3000       Deferred        libice.so.6
ELF     7e0e3000-7e0ec000       Deferred        libsm.so.6
ELF     7e0ed000-7e0f1000       Deferred        libxcomposite.so.1
ELF     7e0f1000-7e0fa000       Deferred        libxrender.so.1
ELF     7e0fc000-7e18d000       Deferred        winex11<elf>
  \-PE  7e110000-7e18d000       \               winex11
ELF     7e263000-7e375000       Deferred        libxml2.so.2
ELF     7e375000-7e39e000       Deferred        libfontconfig.so.1
ELF     7e39e000-7e3b0000       Deferred        libz.so.1
ELF     7e3b0000-7e42b000       Deferred        libfreetype.so.6
ELF     7e42b000-7e458000       Deferred        ws2_32<elf>
  \-PE  7e430000-7e458000       \               ws2_32
ELF     7e458000-7e47e000       Deferred        netapi32<elf>
  \-PE  7e460000-7e47e000       \               netapi32
ELF     7e47e000-7e49d000       Deferred        tapi32<elf>
  \-PE  7e490000-7e49d000       \               tapi32
ELF     7e49d000-7e52b000       Deferred        winmm<elf>
  \-PE  7e4b0000-7e52b000       \               winmm
ELF     7e52b000-7e575000       Deferred        dsound<elf>
  \-PE  7e530000-7e575000       \               dsound
ELF     7e575000-7e631000       Deferred        comctl32<elf>
  \-PE  7e580000-7e631000       \               comctl32
ELF     7e631000-7e689000       Deferred        shlwapi<elf>
  \-PE  7e640000-7e689000       \               shlwapi
ELF     7e689000-7e78a000       Deferred        shell32<elf>
  \-PE  7e6a0000-7e78a000       \               shell32
ELF     7e78a000-7e79f000       Deferred        shfolder<elf>
  \-PE  7e790000-7e79f000       \               shfolder
ELF     7e79f000-7e7b1000       Deferred        libresolv.so.2
ELF     7e7b2000-7e7b6000       Deferred        libxdamage.so.1
ELF     7e7c1000-7e7e0000       Deferred        iphlpapi<elf>
  \-PE  7e7d0000-7e7e0000       \               iphlpapi
ELF     7e7e0000-7e83b000       Deferred        rpcrt4<elf>
  \-PE  7e7f0000-7e83b000       \               rpcrt4
ELF     7e83b000-7e8d9000       Deferred        ole32<elf>
  \-PE  7e850000-7e8d9000       \               ole32
ELF     7e8d9000-7e90f000       Deferred        dinput<elf>
  \-PE  7e8e0000-7e90f000       \               dinput
ELF     7e90f000-7e929000       Deferred        dinput8<elf>
  \-PE  7e920000-7e929000       \               dinput8
ELF     7e929000-7e990000       Deferred        msvcrt<elf>
  \-PE  7e940000-7e990000       \               msvcrt
ELF     7e990000-7e9dc000       Deferred        advapi32<elf>
  \-PE  7e9a0000-7e9dc000       \               advapi32
ELF     7e9dc000-7ea71000       Deferred        gdi32<elf>
  \-PE  7e9f0000-7ea71000       \               gdi32
ELF     7ea71000-7eba8000       Deferred        user32<elf>
  \-PE  7ea90000-7eba8000       \               user32
ELF     7eba8000-7ec96000       Export          wined3d<elf>
  \-PE  7ebc0000-7ec96000       \               wined3d
ELF     7ec96000-7ecc4000       Export          d3d9<elf>
  \-PE  7eca0000-7ecc4000       \               d3d9
ELF     7ede2000-7ef07000       Deferred        kernel32<elf>
  \-PE  7ee00000-7ef07000       \               kernel32
ELF     7ef07000-7ef11000       Deferred        libnss_files.so.2
ELF     7ef11000-7ef1b000       Deferred        libnss_nis.so.2
ELF     7ef1b000-7ef32000       Deferred        libnsl.so.1
ELF     7ef32000-7ef3a000       Deferred        libnss_compat.so.2
ELF     7ef3a000-7ef60000       Deferred        libm.so.6
ELF     7ef60000-7f000000       Deferred        ntdll<elf>
  \-PE  7ef70000-7f000000       \               ntdll
ELF     b7cc0000-b7cc4000       Deferred        libxau.so.6
ELF     b7cc7000-b7ccb000       Deferred        libdl.so.2
ELF     b7ccb000-b7e00000       Deferred        libc.so.6
ELF     b7e00000-b7e18000       Deferred        libpthread.so.0
ELF     b7e28000-b7f3c000       Deferred        libwine.so.1
ELF     b7f3d000-b7f59000       Deferred        ld-linux.so.2
Threads:
process  tid      prio (all id:s are in hex)
0000000c 
        0000000d    0
00000008 (D) H:\games\nsf\speed.exe
        0000000b    1
        0000000a    2
        00000009    0 <==
Backtrace:
=>1 0x7dd6e9a4 brwProgramStringNotify+0x8e(ctx=0x7c07e5f0, target=0x8620, prog=0x7c20c8f0) [/usr/local/src/mesa/src/mesa/drivers/dri/i965/brw_program.c:128] in i965_dri.so (0x0033f72c)
  2 0x7de32662 _mesa_ProgramStringARB+0x100(target=0x8620, format=0x8875, len=0x72, string=0x7ec79fb8) [/usr/local/src/mesa/src/mesa/shader/arbprogram.c:233] in i965_dri.so (0x0033f75c)
  3 0x7ebf73ce IWineD3DImpl_FillGLCaps+0x49d1() in wined3d (0x0033f91c)
  4 0x7ebfdca5 InitAdapters+0x1ec7() in wined3d (0x0033fd3c)
  5 0x7ec6b6e1 WineDirect3DCreate+0x1c() in wined3d (0x0033fd6c)
  6 0x7ecabd83 Direct3DCreate9+0x71() in d3d9 (0x0033fd9c)
  7 0x006e6a45 in speed (+0x2e6a45) (0x00000001)
  8 0x00000000 (0x00000000)

and here is the backtrace produced by gdb:

rusinante@sunshine:~/games/nsf$ gdb wine
GNU gdb 6.7.1
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
(no debugging symbols found)
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) handle SIG33 pass nostop noprint
Signal        Stop      Print   Pass to program Description
SIG33         No        No      Yes             Real-time event 33
(gdb) set pagination 0
(gdb) run speed.exe
Starting program: /usr/bin/wine speed.exe
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
(no debugging symbols found)
(no debugging symbols found)
[New Thread 0xb7d27a10 (LWP 12905)]
[New Thread 0xb7d26b90 (LWP 12908)]
[Thread 0xb7d26b90 (LWP 12908) exited]
[New process 12905]
[New process 12905]
libGL: XF86DRIGetClientDriverName: 1.9.0 i965 (screen 0)
libGL: OpenDriver: trying /usr/X11R6/lib/modules/dri/i965_dri.so
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 13, (OK)
drmOpenByBusid: Searching for BusID pci:0000:00:02.0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 13, (OK)
drmOpenByBusid: drmOpenMinor returns 13
drmOpenByBusid: drmGetBusid reports pci:0000:00:02.0
Failed to initialize TTM buffer manager.  Falling back to classic.
[New LWP 12911]
libGL: XF86DRIGetClientDriverName: 1.9.0 i965 (screen 0)
libGL: OpenDriver: trying /usr/X11R6/lib/modules/dri/i965_dri.so
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 12, (OK)
drmOpenByBusid: Searching for BusID pci:0000:00:02.0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 12, (OK)
drmOpenByBusid: drmOpenMinor returns 12
drmOpenByBusid: drmGetBusid reports pci:0000:00:02.0
Failed to initialize TTM buffer manager.  Falling back to classic.
Failed to initialize TTM buffer manager.  Falling back to classic.

Program received signal SIGSEGV, Segmentation fault.
0x7dd649a4 in ?? ()
(gdb) backtrace full
#0  0x7dd649a4 in ?? ()
No symbol table info available.
#1  0x7c0fa238 in ?? ()
No symbol table info available.
#2  0x00000001 in ?? ()
No symbol table info available.
#3  0x7c0fb238 in ?? ()
No symbol table info available.
#4  0x7df35ff4 in ?? ()
No symbol table info available.
#5  0x7c082ca0 in ?? ()
No symbol table info available.
#6  0x7c1e9458 in ?? ()
No symbol table info available.
#7  0x0033f75c in ?? ()
No symbol table info available.
#8  0x7de28662 in ?? ()
No symbol table info available.
#9  0x7c082ca0 in ?? ()
No symbol table info available.
#10 0x00008620 in ?? ()
No symbol table info available.
#11 0x7c1e9458 in ?? ()
No symbol table info available.
#12 0x00000072 in ?? ()
No symbol table info available.
#13 0x7c1e9458 in ?? ()
No symbol table info available.
#14 0x00000001 in ?? ()
No symbol table info available.
#15 0x7c0fb258 in ?? ()
No symbol table info available.
#16 0x7ec8bff4 in ?? ()
No symbol table info available.
#17 0x7ec8d4bc in ?? ()
No symbol table info available.
#18 0x0033f908 in ?? ()
No symbol table info available.
#19 0x0033f91c in ?? ()
No symbol table info available.
#20 0x7ebef3ce in ?? ()
No symbol table info available.
#21 0x00008620 in ?? ()
No symbol table info available.
#22 0x00008875 in ?? ()
No symbol table info available.
#23 0x00000072 in ?? ()
No symbol table info available.
#24 0x7ec71fb8 in ?? ()
No symbol table info available.
#25 0x7ec8cc28 in ?? ()
No symbol table info available.
#26 0x7c03a9c0 in ?? ()
No symbol table info available.
#27 0x7c06cf48 in ?? ()
No symbol table info available.
#28 0x7df35ff4 in ?? ()
No symbol table info available.
#29 0x7c082ca0 in ?? ()
No symbol table info available.
#30 0x79d76260 in ?? ()
No symbol table info available.
#31 0xb7e5f40e in ?? () from /lib/libc.so.6
No symbol table info available.
#32 0x7dd3da18 in ?? ()
No symbol table info available.
#33 0x7c082ca0 in ?? ()
No symbol table info available.
#34 0x7ec87e90 in ?? ()
No symbol table info available.
#35 0x7ec87b24 in ?? ()
No symbol table info available.
#36 0x0033f90c in ?? ()
No symbol table info available.
#37 0x0033f908 in ?? ()
No symbol table info available.
#38 0x7ec87e90 in ?? ()
No symbol table info available.
#39 0x0033f800 in ?? ()
No symbol table info available.
#40 0xb7e6086c in ?? ()
No symbol table info available.
#41 0x7c082bb0 in ?? ()
No symbol table info available.
#42 0x7dfc01a0 in ?? ()
No symbol table info available.
#43 0x0033f7dc in ?? ()
No symbol table info available.
#44 0x00000001 in ?? ()
No symbol table info available.
#45 0x00000002 in ?? ()
No symbol table info available.
#46 0x7dfbfff4 in ?? ()
No symbol table info available.
#47 0x7c082bb0 in ?? ()
No symbol table info available.
#48 0x7dfc01a0 in ?? ()
No symbol table info available.
#49 0x7ec8c9b0 in ?? ()
No symbol table info available.
#50 0x7ec72a45 in ?? ()
No symbol table info available.
#51 0x7ec6f8ec in ?? ()
No symbol table info available.
#52 0x7ec8cc40 in ?? ()
No symbol table info available.
#53 0x7defe151 in ?? ()
No symbol table info available.
#54 0x00000007 in ?? ()
No symbol table info available.
#55 0x00000049 in ?? ()
No symbol table info available.
#56 0x00000000 in ?? ()
No symbol table info available.
(gdb) info registers
eax            0x0      0
ecx            0x7c082ca0       2080910496
edx            0x7c1e9458       2082378840
ebx            0x7df35ff4       2113101812
esp            0x33f714 0x33f714
ebp            0x33f72c 0x33f72c
esi            0x7c1e9458       2082378840
edi            0x7c082ca0       2080910496
eip            0x7dd649a4       0x7dd649a4
eflags         0x210206 [ PF IF RF ID ]
cs             0x73     115
ss             0x7b     123
ds             0x7b     123
es             0x7b     123
fs             0x33     51
gs             0x3b     59
(gdb) thread apply all backtrace\


Thread 5 (LWP 12911):
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7e6460b in ?? () from /lib/libpthread.so.0
#2  0x7efe3ff4 in ?? ()
#3  0x00000000 in ?? ()

Thread 4 (LWP 12905):
#0  0x7dd649a4 in ?? ()
#1  0x7c0fa238 in ?? ()
#2  0x00000001 in ?? ()
#3  0x7c0fb238 in ?? ()
#4  0x7df35ff4 in ?? ()
#5  0x7c082ca0 in ?? ()
#6  0x7c1e9458 in ?? ()
#7  0x0033f75c in ?? ()
#8  0x7de28662 in ?? ()
#9  0x7c082ca0 in ?? ()
#10 0x00008620 in ?? ()
#11 0x7c1e9458 in ?? ()
#12 0x00000072 in ?? ()
#13 0x7c1e9458 in ?? ()
#14 0x00000001 in ?? ()
#15 0x7c0fb258 in ?? ()
#16 0x7ec8bff4 in ?? ()
#17 0x7ec8d4bc in ?? ()
#18 0x0033f908 in ?? ()
#19 0x0033f91c in ?? ()
#20 0x7ebef3ce in ?? ()
#21 0x00008620 in ?? ()
#22 0x00008875 in ?? ()
#23 0x00000072 in ?? ()
#24 0x7ec71fb8 in ?? ()
#25 0x7ec8cc28 in ?? ()
#26 0x7c03a9c0 in ?? ()
#27 0x7c06cf48 in ?? ()
#28 0x7df35ff4 in ?? ()
#29 0x7c082ca0 in ?? ()
#30 0x79d76260 in ?? ()
#31 0xb7e5f40e in ?? () from /lib/libc.so.6
#32 0x7dd3da18 in ?? ()
#33 0x7c082ca0 in ?? ()
#34 0x7ec87e90 in ?? ()
#35 0x7ec87b24 in ?? ()
#36 0x0033f90c in ?? ()
#37 0x0033f908 in ?? ()
#38 0x7ec87e90 in ?? ()
#39 0x0033f800 in ?? ()
#40 0xb7e6086c in ?? ()
#41 0x7c082bb0 in ?? ()
#42 0x7dfc01a0 in ?? ()
#43 0x0033f7dc in ?? ()
#44 0x00000001 in ?? ()
#45 0x00000002 in ?? ()
#46 0x7dfbfff4 in ?? ()
#47 0x7c082bb0 in ?? ()
#48 0x7dfc01a0 in ?? ()
#49 0x7ec8c9b0 in ?? ()
#50 0x7ec72a45 in ?? ()
#51 0x7ec6f8ec in ?? ()
#52 0x7ec8cc40 in ?? ()
#53 0x7defe151 in ?? ()
#54 0x00000007 in ?? ()
#55 0x00000049 in ?? ()
#56 0x00000000 in ?? ()
linux-nat.c:2422: internal-error: linux_nat_thread_alive: Assertion `is_lwp (ptid)' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) y
linux-nat.c:2422: internal-error: linux_nat_thread_alive: Assertion `is_lwp (ptid)' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) n
Comment 9 Anton Ekblad 2007-12-27 17:58:26 UTC
Created attachment 13389 [details]
Simple testcase to crash i965_dri.so
Comment 10 Anton Ekblad 2007-12-27 18:00:15 UTC
I am also experiencing this problem, on a Lenovo ThinkPad X61s. It seems to get triggered by any Windows application using DirectX through Wine (tested with Age of Empires II, Warcraft II BNE, Morrowind and several other, with several different versions of Wine.)

After digging around a bit in the offending Wine libraries, I managed to isolate a simple testcase (attached) which totals about 35 lines and still manages to crash Mesa in the exact same way the Wine DirectX implementation does on my system. Judging from the code in question, something seems to be not quite right with i965's implementation of GL_ARB_vertex_program.
To compile the test case, aside from OpenGL development libraries, the SDL development libraries are needed, as I used SDL to minimize the amount of startup code needed. However, the driver should crash all the same no matter which method is used to set up OpenGL.

The code that actually causes the driver crash can be found in its original context here (dlls/wined3d/directx.c, lines 420~450 in wine's git repository, tag 0.9.51):
http://source.winehq.org/git/wine.git/?a=blob;f=dlls/wined3d/directx.c;h=9536b7165729f1b99746c8245dc8796f3cf3aaf6;hb=0b0c75ed19b13cea00d763b2ea0fb7bbbc1a0828#l420

If there is something else I can do to help track this bug down, please let me know.
Comment 11 vaLentin 2007-12-28 12:32:07 UTC
(In reply to comment #10)
> I am also experiencing this problem, on a Lenovo ThinkPad X61s. It seems to get
> triggered by any Windows application using DirectX through Wine (tested with
> Age of Empires II, Warcraft II BNE, Morrowind and several other, with several
> different versions of Wine.)
> After digging around a bit in the offending Wine libraries, I managed to
> isolate a simple testcase (attached) which totals about 35 lines and still
> manages to crash Mesa in the exact same way the Wine DirectX implementation
> does on my system.

Could you please let me know how I can compile the code attached so I can also test it on my machine and confirm the case. Thank you in advance.

vaLentin
Comment 12 Anton Ekblad 2007-12-30 03:14:41 UTC
(In reply to comment #11)
> (In reply to comment #10)
> > I am also experiencing this problem, on a Lenovo ThinkPad X61s. It seems to get
> > triggered by any Windows application using DirectX through Wine (tested with
> > Age of Empires II, Warcraft II BNE, Morrowind and several other, with several
> > different versions of Wine.)
> > After digging around a bit in the offending Wine libraries, I managed to
> > isolate a simple testcase (attached) which totals about 35 lines and still
> > manages to crash Mesa in the exact same way the Wine DirectX implementation
> > does on my system.
> 
> Could you please let me know how I can compile the code attached so I can also
> test it on my machine and confirm the case. Thank you in advance.
> 
> vaLentin
> 

I compiled the test case with gcc -g -odricrash dricrash.c -lGL -lSDL. It needs the SDL development libraries installed since I used SDL for setup to keep the code short, but I could modify it to use pure glX instead if that would be more useful to you.
Comment 13 Eric Anholt 2008-01-15 14:23:09 UTC
The test program doesn't appear to submit a string in the vertex program language.  The crash seen is a side effect of failure to parse the string.

    const char *testcode =
		"!!ARBvp1.0\n"
		"PARAM C[66] = { program.env[0..65] };\n"
		"ADDRESS A0;"
		"ARL A0.x, 0.0;\n" <-- failing to parse this line
		"MOV result.position, C[A0.x + 65];\n"
		"END\n";

From the ARB_vertex_program spec:
    <ARL_instruction>      ::= "ARL" <maskedAddrReg> "," <scalarSrcReg>
    <scalarSrcReg>         ::= <optionalSign> <srcReg> <scalarSuffix>
    <srcReg>               ::= <vertexAttribReg>
                             | <temporaryReg>
                             | <progParamReg>
    <scalarSuffix>         ::= "." <component>

Note the use of a srcReg and non-optional scalarSuffix.  I'll have to take a look at wine and see if the bad program is internal to wine.
Comment 14 Eric Anholt 2008-01-15 15:33:58 UTC
OK, fixed.  Mesa was calling ProgramStringNotify on the unparsed results of the intentionally invalid program that wine submitted (also, submitted #11210 to wine for an unintended invalid part of their program), and the driver wasn't prepared for the results.  Mesa should probably be extended at some point to allow the particular invalid program that wine tests, since we should be able to handle that behavior.  But for now, the crash is fixed.
Comment 15 vaLentin 2008-01-16 10:17:06 UTC
(In reply to comment #14)
> OK, fixed.  Mesa was calling ProgramStringNotify on the unparsed results of the
> intentionally invalid program that wine submitted (also, submitted #11210 to
> wine for an unintended invalid part of their program), and the driver wasn't
> prepared for the results.  Mesa should probably be extended at some point to
> allow the particular invalid program that wine tests, since we should be able
> to handle that behavior.  But for now, the crash is fixed.
> 

In order to test this I downloaded/recompiled mesa and dri from the git and stuck with another problem. I filled a bug report here:

https://bugs.freedesktop.org/show_bug.cgi?id=14094
Comment 16 Eric Anholt 2008-02-28 15:57:41 UTC
*** Bug 14551 has been marked as a duplicate of this bug. ***
Comment 17 Eric Anholt 2008-02-28 15:58:01 UTC
*** Bug 14574 has been marked as a duplicate of this bug. ***
Comment 18 Eric Anholt 2008-02-28 16:21:45 UTC
*** Bug 13947 has been marked as a duplicate of this bug. ***
Comment 19 Michal Schmidt 2008-03-11 15:11:24 UTC
I see this bug was fixed in the master branch by git commit 185320ae. Is 7.0.3 going to have this fix too? I don't see it in mesa_7_0_branch. There are quite a lot of users on web forums hitting the bug.
Comment 20 jgf 2008-03-14 12:28:52 UTC
What version of mesa is this fix in? I believe I have this problem when I try to run World of Warcraft via wine. I would love to actually be able to ditch windows a bit more often.
Comment 21 Adam Jackson 2009-08-24 12:28:30 UTC
Mass version move, cvs -> git


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.