Bug 67120

Summary: Dota 2 crashes sporadically on Intel/Mesa git (full backtrace with mesa symbols included)
Product: Mesa Reporter: Vedran Rodic <vrodic>
Component: Drivers/DRI/i965Assignee: Ian Romanick <idr>
Status: RESOLVED NOTOURBUG QA Contact:
Severity: normal    
Priority: medium CC: kam1kaz3, mesa-dev
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 67224    
Attachments: backtrace
debug info showing intelImage->mt data
debug info showing intelObj->Image[0][0]

Description Vedran Rodic 2013-07-20 13:30:40 UTC
Created attachment 82727 [details]
backtrace

Hi I'm using Mesa git (xorg edgers ppa) version:

2b5b436615f66adf0f49391c5b0dfd1c0c6e0ad4

Dota 2 periodically crashes (some game code probably triggers it, but it's rare enough that it can be hard to reproduce). Luckily I've been able to capture a full back trace of the crash (attached).
Comment 1 Vedran Rodic 2013-07-20 13:36:02 UTC
This bug is also being tracked at Dota 2 github: https://github.com/ValveSoftware/Dota-2/issues/432
Comment 2 Vedran Rodic 2013-07-20 13:39:47 UTC
Adding to mesa-dev for visibility. Feel free to curse at me if you don't like it :)
Comment 3 Vedran Rodic 2013-07-20 16:54:54 UTC
I ran the game with LIBGL_DEBUG=1 and this is the stdout log of the crash:

 ##### CMaterialReference::Init got error material for models\heroes\tiny_01\tiny_02_color.vmt in tex group Other textures
 ##### CMaterialReference::Init got error material for models\heroes\tiny_01\tiny_02_color.vmt in tex group Other textures
 ##### CMaterialReference::Init got error material for  in tex group Other textures
 ##### CMaterialReference::Init got error material for  in tex group Other textures
dota_linux: ../../../../../src/mesa/main/formats.c:1774: _mesa_get_format_info: Assertion `info->Name == format' failed.
 ##### CMaterialReference::Init got error material for editor\bullseye.vmt in tex group Other texturesUploading dump (out-of-process) [proxy '']
/tmp/dumps/crash_20130720185055_1.dmp
/home/vedran/Steam/SteamApps/common/dota 2 beta/dota.sh: line 67: 10049 Aborted                 (core dumped) ${GAME_DEBUGGER} "${GAMEROOT}"/${GAMEEXE} "$@"
Game removed: AppID 570 "Dota 2", ProcID 10049
Comment 4 Vedran Rodic 2013-07-20 18:28:45 UTC
Just confirmed with 9f07ca11c1797ac12de1e1c6aef13cf58824b5f5 (as it came to ubuntu ppa)
Comment 5 Micael Dias 2013-07-21 04:28:12 UTC
I confirm this.

As far as I could debug it, it appears to me that the bug first appears on function intel_finalize_mipmap_tree, when it calls intel_miptree_copy_teximage() with the argument "intelImage" that has invalid (appears uninitialized) data, even though "intelObj->base.Image[face][i]" has valid data.

I will attach easy to see debug info.
Comment 6 Micael Dias 2013-07-21 04:29:29 UTC
Created attachment 82760 [details]
debug info showing intelImage->mt data

If you're wondering, intelImage->base looks OK.
Comment 7 Micael Dias 2013-07-21 04:30:15 UTC
Created attachment 82761 [details]
debug info showing intelObj->Image[0][0]
Comment 8 Vedran Rodic 2013-07-21 04:36:49 UTC
I've uploaded a short replay where it's easy to reproduce the issue. Just put it into player perspective mode and pick Warlock before time 3:30 and wait some seconds.

http://mjesec.ffzg.hr/~vrodic/dota/248227521.dem
Comment 9 Vedran Rodic 2013-07-21 05:18:47 UTC
Just some detailed repro instructions for Dota 2/Steam uninitiated:

Upload the replay in your Steam/SteamApps/common/dota 2 beta/dota/replays directory.

Before running dota 2, add -console to launch options of Dota 2 steam properties.

When the game loads: 
playdemo replays/248227521.dem


There's a slider in upper right where you can jump to 3:20 mark. 
Then right of the slider, choose player perspective instead of "Directed camera"
On the top-center, there are hero portraits. Pick the 3rd guy from the left (Warlock). 

If you did it right, at arround 3:48 in replay, Dota 2 should dissapear, failing with the assert and trace above.
Comment 10 Vedran Rodic 2013-07-21 14:44:40 UTC
First I'll paste comment from Chris Forbes on the github issue:
"
Turns out this is the Jakiro crash as well. Warlock is a red herring; Jakiro does his Ice Path a little after 3:30 and the game crashes."
...
"I've done a little bit of digging around -- it looks like the driver is behaving fine, and then when Ice Path is cast, something goes horribly wrong in shaderapidx9.so and it memcpy's junk over a bunch of internal mesa structures.

Backtrace:
http://sprunge.us/eeeH
"
I've put a minimal .dem Dota 2 replay file here: 
http://mjesec.ffzg.hr/~vrodic/dota/jakiro-bug/

If you put it in your "Steam/SteamApps/common/dota 2 beta/dota/replays" directory
and then put the autoexec.cfg in directory in the url above to your "Steam/SteamApps/common/dota 2 beta/dota/cfg" directory, just starting Dota 2 and scrolling immediately to bottom left on minimap (so you can see Jakiro)  when the game loads should trigger the crash. 

I've also recorded a trace of this using nouveau on my 9800 GT and though nouveau has problems displaying the game correctly at all, the trace file itself renders just fine on Intel/Mesa (latest version mentioned here), with everything shown as it should be, without triggering asserts. 

The trace of the replay (115MB bz2) will be uploaded to the same url above.
Comment 11 Vedran Rodic 2013-07-24 09:11:49 UTC
Updated Dota 2 Test client seems to fix the issue. It seems it's not related to Mesa. Sorry for the spam.

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.