Skip to contentSkip to conversation

New: r600g: Diablo III Crashes After a few minutes

Bug 74868 [email protected] 1 participant 24 messages Feb 12, 2014 – Oct 29, 2014

lore
Share & tools
lore
#0 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=74868

Priority: medium
Bug ID: 74868
Assignee: [email protected]
Summary: r600g: Diablo III Crashes After a few minutes
Severity: normal
Classification: Unclassified
OS: All
Reporter: [email protected]
Hardware: Other
Status: NEW
Version: git
Component: Drivers/Gallium/r600
Product: Mesa

Created attachment 93894
--> https://bugs.freedesktop.org/attachment.cgi?id=93894&action=edit
Xorg Log

Disclaimer: This is my first bug report, so I apologize if I do not attach enough information.

I tried booting up Diablo III a few days back to see the new geometry shaders in action on my 4890, and alas, I had a few minutes of happy gameplay followed by a startling black screen. I ran it in a terminal window, though wine was not kind enough to allow me to properly pipe the output (only grabbed the launcher window and gave up) it contained ooodles of r600_shader_select issues. There were thousands of the (type=1) -1 lines prior to the the -12 lines right before the crash:

EE r600_state_common.c:750 r600_shader_select - Failed to build shader variant (type=1) -1
EE r600_shader.c:157 r600_pipe_shader_create - translation from TGSI failed ! EE r600_state_common.c:750 r600_shader_select - Failed to build shader variant (type=1) -1
EE r600_shader.c:157 r600_pipe_shader_create - translation from TGSI failed ! EE r600_state_common.c:750 r600_shader_select - Failed to build shader variant (type=1) -1
EE r600_shader.c:157 r600_pipe_shader_create - translation from TGSI failed ! EE r600_state_common.c:750 r600_shader_select - Failed to build shader variant (type=1) -1
EE r600_shader.c:157 r600_pipe_shader_create - translation from TGSI failed ! EE r600_state_common.c:750 r600_shader_select - Failed to build shader variant (type=1) -1
EE r600_shader.c:157 r600_pipe_shader_create - translation from TGSI failed ! EE r600_state_common.c:750 r600_shader_select - Failed to build shader variant (type=1) -1
EE r600_shader.c:157 r600_pipe_shader_create - translation from TGSI failed ! EE r600_state_common.c:750 r600_shader_select - Failed to build shader variant (type=1) -12
EE r600_shader.c:157 r600_pipe_shader_create - translation from TGSI failed ! EE r600_state_common.c:750 r600_shader_select - Failed to build shader variant (type=1) -12
EE r600_shader.c:157 r600_pipe_shader_create - translation from TGSI failed ! EE r600_state_common.c:750 r600_shader_select - Failed to build shader variant (type=1) -12
EE r600_shader.c:157 r600_pipe_shader_create - translation from TGSI failed ! EE r600_state_common.c:750 r600_shader_select - Failed to build shader variant (type=1) -12
EE r600_shader.c:157 r600_pipe_shader_create - translation from TGSI failed ! EE r600_state_common.c:750 r600_shader_select - Failed to build shader variant (type=1) -12
EE r600_shader.c:157 r600_pipe_shader_create - translation from TGSI failed ! EE r600_state_common.c:750 r600_shader_select - Failed to build shader variant (type=1) -12
EE r600_shader.c:157 r600_pipe_shader_create - translation from TGSI failed ! EE r600_state_common.c:750 r600_shader_select - Failed to build shader variant (type=1) -12
EE r600_shader.c:157 r600_pipe_shader_create - translation from TGSI failed ! EE r600_state_common.c:750 r600_shader_select - Failed to build shader variant (type=1) -12
EE r600_shader.c:157 r600_pipe_shader_create - translation from TGSI failed ! EE r600_state_common.c:750 r600_shader_select - Failed to build shader variant (type=1) -12
EE r600_shader.c:157 r600_pipe_shader_create - translation from TGSI failed ! EE r600_state_common.c:750 r600_shader_select - Failed to build shader variant (type=1) -12
EE r600_texture.c:1003 r600_texture_transfer_map - failed to create temporary texture to hold untiled copy
Mesa: User error: GL_OUT_OF_MEMORY in glCompressedTexSubImage2D err:d3d:wined3d_debug_callback 0x1c8178: "GL_OUT_OF_MEMORY in glCompressedTexSubImage2D".
err:d3d_surface:surface_upload_data >>>>>>>>>>>>>>>>> GL_OUT_OF_MEMORY (0x505) from glCompressedTexSubImage2DARB @ ../../../wine-1.7.12/dlls/wined3d/surface.c / 1688
EE r600_texture.c:1003 r600_texture_transfer_map - failed to create temporary texture to hold untiled copy
Mesa: User error: GL_OUT_OF_MEMORY in glCompressedTexSubImage2D err:d3d:wined3d_debug_callback 0x1c8178: "GL_OUT_OF_MEMORY in glCompressedTexSubImage2D".
err:d3d_surface:surface_upload_data >>>>>>>>>>>>>>>>> GL_OUT_OF_MEMORY (0x505) from glCompressedTexSubImage2DARB @ ../../../wine-1.7.12/dlls/wined3d/surface.c / 1688
EE r600_texture.c:1003 r600_texture_transfer_map - failed to create temporary texture to hold untiled copy
Mesa: User error: GL_OUT_OF_MEMORY in glCompressedTexSubImage2D err:d3d:wined3d_debug_callback 0x1c8178: "GL_OUT_OF_MEMORY in glCompressedTexSubImage2D".
err:d3d_surface:surface_upload_data >>>>>>>>>>>>>>>>> GL_OUT_OF_MEMORY (0x505) from glCompressedTexSubImage2DARB @ ../../../wine-1.7.12/dlls/wined3d/surface.c / 1688
EE r600_texture.c:1003 r600_texture_transfer_map - failed to create temporary texture to hold untiled copy
Mesa: User error: GL_OUT_OF_MEMORY in glCompressedTexSubImage2D err:d3d:wined3d_debug_callback 0x1c8178: "GL_OUT_OF_MEMORY in glCompressedTexSubImage2D".
err:d3d_surface:surface_upload_data >>>>>>>>>>>>>>>>> GL_OUT_OF_MEMORY (0x505) from glCompressedTexSubImage2DARB @ ../../../wine-1.7.12/dlls/wined3d/surface.c / 1688
EE r600_texture.c:1003 r600_texture_transfer_map - failed to create temporary texture to hold untiled copy
Mesa: User error: GL_OUT_OF_MEMORY in glCompressedTexSubImage2D err:d3d:wined3d_debug_callback 0x1c8178: "GL_OUT_OF_MEMORY in glCompressedTexSubImage2D".
err:d3d_surface:surface_upload_data >>>>>>>>>>>>>>>>> GL_OUT_OF_MEMORY (0x505) from glCompressedTexSubImage2DARB @ ../../../wine-1.7.12/dlls/wined3d/surface.c / 1688
EE r600_texture.c:1003 r600_texture_transfer_map - failed to create temporary texture to hold untiled copy
Mesa: User error: GL_OUT_OF_MEMORY in glCompressedTexSubImage2D err:d3d:wined3d_debug_callback 0x1c8178: "GL_OUT_OF_MEMORY in glCompressedTexSubImage2D".
err:d3d_surface:surface_upload_data >>>>>>>>>>>>>>>>> GL_OUT_OF_MEMORY (0x505) from glCompressedTexSubImage2DARB @ ../../../wine-1.7.12/dlls/wined3d/surface.c / 1688

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#1 lore raw

[Bug 74868] r600g: Diablo III Crashes After a few minutes

https://bugs.freedesktop.org/show_bug.cgi?id=74868

Nick Tenney <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

           Hardware|Other                       |x86-64 (AMD64)
                 OS|All                         |Linux (All)
                 CC|                            |[email protected]
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw

[Bug 74868] r600g: Diablo III Crashes After a few minutes

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=74868

--- Comment #1 from Nick Tenney <[email protected]> --- Created attachment 93895
--> https://bugs.freedesktop.org/attachment.cgi?id=93895&action=edit
dmesg log

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw

[Bug 74868] r600g: Diablo III Crashes After a few minutes

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=74868

--- Comment #2 from Nick Tenney <[email protected]> --- Created attachment 93896
--> https://bugs.freedesktop.org/attachment.cgi?id=93896&action=edit
Mesa PKGBUILD

Distribution: Archlinux 64-bit
Kernel: 3.14rc2
Mesa: git (PKGBUILD attached with ops)
libdrm: 2.4.52

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw

[Bug 74868] r600g: Diablo III Crashes After a few minutes

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=74868

--- Comment #3 from Michel Dänzer <[email protected]> --- Looks like there's a memory leak somewhere. Does valgrind --leak-check=full give any hints? (Not sure if or how that can be used for Wine though)

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#5 lore raw

[Bug 74868] r600g: Diablo III Crashes After a few minutes

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=74868

--- Comment #4 from Nick Tenney <[email protected]> ---
I took a quick peak at Valgrind, but Diablo III has some workarounds that seem to be messing with it. I'll toy around with it a bit more on the weekend. Thanks!

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#6 lore raw

[Bug 74868] r600g: Diablo III Crashes After a few minutes

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=74868

--- Comment #5 from Nick Tenney <[email protected]> --- I have tried various configurations with valgrind as recommended here:
http://wiki.winehq.org/Wine_and_Valgrind

I have gotten it to begin loading, but before it completes, Diablo crashes with an internal error. Are there any other tools available or more limited valgrind traces I could run to track this down? I know wine stuff is tricky to work with.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#7 lore raw

[Bug 74868] r600g: Diablo III Crashes After a few minutes

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=74868

--- Comment #6 from Ilia Mirkin <[email protected]> --- (In reply to comment #5)

Quoted 3 lines

Are there any other tools available or more limited
valgrind traces I could run to track this down? I know wine stuff is tricky to work with.

apitrace -- records all OpenGL calls. If replaying a trace causes the same leak, then you're all set. (You could also run valgrind on the trace replay.)

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#8 lore raw

[Bug 74868] r600g: Diablo III Crashes After a few minutes

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=74868

--- Comment #7 from Nick Tenney <[email protected]> --- Created attachment 94142
--> https://bugs.freedesktop.org/attachment.cgi?id=94142&action=edit
Diablo III Valgrind output

Thanks Ilia, that did the trick! I just grabbed the first few minutes of game play in Valgrind up until it started encountering the error that was popping previously.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#9 lore raw

[Bug 74868] r600g: Diablo III Crashes After a few minutes

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=74868

--- Comment #8 from Ilia Mirkin <[email protected]> --- (In reply to comment #7)

Quoted 6 lines

Created attachment 94142 [details]
Diablo III Valgrind output

Thanks Ilia, that did the trick! I just grabbed the first few minutes of game play in Valgrind up until it started encountering the error that was popping previously.

I'm not a radeon guy, just a drive-by commenter, but I'm going to go ahead and guess that this output is going to be of little use to anyone debugging :(

A trace with symbols in r600_dri would be much more useful. With what you provided, we just know that the memory is allocated with malloc and calloc... which is of little surprise.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#10 lore raw

[Bug 74868] r600g: Diablo III Crashes After a few minutes

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=74868

--- Comment #9 from Nick Tenney <[email protected]> --- Thanks for the help so far! I am happy to keep on debugging with more specificity, but will need some help as I'm still pretty new with this stuff. Let me know if there is anything I can provide to help shine light on this.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#11 lore raw

[Bug 74868] r600g: Diablo III Crashes After a few minutes

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=74868

--- Comment #10 from Michel Dänzer <[email protected]> --- Make sure your /usr/lib/xorg/modules/dri/r600_dri.so has debugging symbols.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#12 lore raw

[Bug 74868] r600g: Diablo III Crashes After a few minutes

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=74868

Nick Tenney <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

  Attachment #94142|0                           |1

is obsolete| |

--- Comment #11 from Nick Tenney <[email protected]> --- Created attachment 94468
--> https://bugs.freedesktop.org/attachment.cgi?id=94468&action=edit
D3 Valgrind output with debugging symbols

Recompiled and ran Valgrind again. The resulting Valgrind looks more informative than previous attempts. Let me know if anything else would be helpful.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#13 lore raw

[Bug 74868] r600g: Diablo III Crashes After a few minutes

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=74868

--- Comment #12 from Nick Tenney <[email protected]> --- Commands used:

$ apitrace32 wine Diablo\ III.exe
$ valgrind --leak-check=full --trace-children=yes
--vex-iropt-register-updates=allregs-at-mem-access --workaround-gcc296-bugs=yes
--log-file=d3-valgrind-debug_v2 --suppressions=$HOME/valgrind-suppressions
apitrace replay d3debug_v2.trace

Realized I didn't have an apitrace on here, so I grabbed a new one for posting. Dropbox link is as follows:

https://www.dropbox.com/s/1zlzceaho5ym5pa/d3-trace.tar.bz2
sha256sum: f60ded613d5a9dd71629ec75ad2cc3b1f7c93ed80b22f92aeadd0f94f97ade19

My valgrind output was a bit above the limit too:
https://www.dropbox.com/s/uyqzxsf1ma5sqds/d3-valgrind-debug_v2
sha256sum: ffb4a35cfd714c78b228bfa0219445648190430324020924c8d04d3ce217a5dc

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#14 lore raw

[Bug 74868] r600g: Diablo III Crashes After a few minutes

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=74868

--- Comment #13 from Nick Tenney <[email protected]> ---
I decided to try running with R600_DEBUG=hyperz,nosb to see what happened and I got another line in the shader failure output about the shader requiring 227 registers:

EE r600_state_common.c:750 r600_shader_select - Failed to build shader variant (type=1) -12
EE r600_shader.c:2183 r600_shader_from_tgsi - GPR limit exceeded - shader requires 227 registers
EE r600_shader.c:157 r600_pipe_shader_create - translation from TGSI failed !

Any tips on further debugging to find which shader is failing?

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#15 lore raw

[Bug 74868] r600g: Diablo III Crashes After a few minutes

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=74868

--- Comment #14 from Michel Dänzer <[email protected]> --- Created attachment 95909
--> https://bugs.freedesktop.org/attachment.cgi?id=95909&action=edit
r600g: Don't leak bytecode on shader compile failure

Does this patch help?

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#16 lore raw

[Bug 74868] r600g: Diablo III Crashes After a few minutes

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=74868

--- Comment #15 from Reiner Herrmann <[email protected]> --- (In reply to comment #14)

Quoted 4 lines

Created attachment 95909 [details] [review]
r600g: Don't leak bytecode on shader compile failure

Does this patch help?

Yes, this patch is helping, thank you! :)
I applied it to current Mesa 10.1 and was able to play Diablo 3 for several hours without crashing due to being out of memory.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#17 lore raw

[Bug 74868] r600g: Diablo III Crashes After a few minutes

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=74868

--- Comment #16 from [email protected] ---
(In reply to comment #14)

Quoted 4 lines

Created attachment 95909 [details] [review]
r600g: Don't leak bytecode on shader compile failure

Does this patch help?

I can also confirm, that the game doesnt crash anymore.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#18 lore raw

[Bug 74868] r600g: Diablo III Crashes After a few minutes

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=74868

--- Comment #17 from Nick Tenney <[email protected]> --- (In reply to comment #14)

Quoted 4 lines

Created attachment 95909 [details] [review]
r600g: Don't leak bytecode on shader compile failure

Does this patch help?

Finally had a chance to test the patch. I compiled this morning with and without the patch and GALLIUM_HUD=fps,requested-VRAM,requested-GTT. It clearly leaked away without and the flow was stemmed with the proper error handling patch. Awesome!

I see that the patch properly destroys the shader on error now, which is definitely an improvement. The error spamming to stdout is still occurring, so I'm not sure whether that should be another bug report/left open in this one with a new name or anything.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#19 lore raw

[Bug 74868] r600g: Diablo III Crashes After a few minutes

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=74868

--- Comment #18 from John Lenz <[email protected]> ---
Just to confirm, I had this exact problem with mesa 10.1 and diablo 3, and the attached patch fixes the problem. I played for ~1.5 hours with no crash, when before it would crash within 2-3 minutes.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#20 lore raw

[Bug 74868] r600g: Diablo III Crashes After a few minutes

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=74868

--- Comment #19 from Mike Mestnik <[email protected]> --- The patch worked for me, binary download based on Oibaf package.

https://launchpad.net/~cheako/+archive/buildingrounds/+build/5883102/+files/libgl1-mesa-dri_10.2~git1404021931.0f641b~mmestnik~gd~s_i386.deb

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#21 lore raw

[Bug 74868] r600g: Diablo III Crashes After a few minutes

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=74868

--- Comment #20 from Michel Dänzer <[email protected]> --- (In reply to comment #17)

Quoted 2 lines

The error spamming to stdout is still occurring, so I'm not sure whether that should be another bug report/left open in this one with a new name or anything.

Please file separate bugs for the shader compile failures.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#22 lore raw

[Bug 74868] r600g: Diablo III Crashes After a few minutes

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=74868

Michel Dänzer <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #21 from Michel Dänzer <[email protected]> ---
Module: Mesa
Branch: master
Commit: ee2bcf38a4c8930d8f9cecfac580030a45c41dae URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ee2bcf38a4c8930d8f9cecfac580030a45c41dae

Author: Michel Dänzer <[email protected]>
Date:   Wed Apr  9 15:38:21 2014 +0900

r600g: Don't leak bytecode on shader compile failure

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#23 lore raw

[Bug 74868] r600g: Diablo III Crashes After a few minutes

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=74868

Lauri Kasanen <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Blocks|                            |85596
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel