Bug 82186 - [r600g] BARTS GPU lockup with minecraft shaders
Summary: [r600g] BARTS GPU lockup with minecraft shaders
Status: RESOLVED DUPLICATE of bug 73528
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/r600 (show other bugs)
Version: 10.2
Hardware: Other Linux (All)
: medium major
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-05 11:06 UTC by EoD
Modified: 2015-07-02 10:36 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
glxinfo (57.60 KB, text/plain)
2014-08-05 11:06 UTC, EoD
Details
dmesg with kernel 3.14.16, mesa 10.2.4 and libdrm 2.4.54 (150.80 KB, text/plain)
2014-08-13 10:44 UTC, EoD
Details
syslog with kernel 3.16.0, mesa 10.2.4 and libdrm master (18.40 KB, text/plain)
2014-08-13 15:35 UTC, EoD
Details

Note You need to log in before you can comment on or make changes to this bug.
Description EoD 2014-08-05 11:06:30 UTC
Created attachment 104066 [details]
glxinfo

When I enable the shader modpack in minecraft my computer locks up: keyboard does not react and screen has dark/light gray stripes.

You need to install forge and those two mods in order to reproduce the bug:
http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1286604-shaders-mod-v2-3-18-updated-by-karyonix
http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1280299-sonic-ethers-unbelievable-shaders-v10-1

I tried it without DPM, without HyperZ and without both, but the lockup didn't change.

I am using Gentoo:
- with kernel 3.14.14 and mesa 10.2.4, the screen started flickering (on/off, on+black/on) and locked up eventually.
- with kernel 3.14.15 and mesa 10.2.5 it immediately locks up and leaves me with gray stripes.
Comment 1 EoD 2014-08-08 10:03:23 UTC
I tried it again with current mesa git master (ae95b9dd9be56ad84a8a4ab5955f580c337259cb) together with libdrm git master (07fead4462b2d537d0c3cae69a09272fc426c598) and I am being spammed with the following messages before the computer locks up:

localhost kernel: [ 2991.517056] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.517169] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.517189] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.517249] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.517271] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.517374] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.517394] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.517438] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.517458] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.517537] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.517558] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.517651] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.517677] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.517778] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.517799] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.517844] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.517863] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.517955] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.517976] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.518018] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.518037] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.518153] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.518175] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.518221] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.518253] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.518354] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.518376] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.518420] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.518443] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.518520] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.518541] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.518620] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.518639] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.518718] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.518739] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.518782] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.518801] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.518931] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.518952] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.518995] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.519013] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.519090] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
localhost kernel: [ 2991.519109] radeon_gem_object_create:62 alloc size 341Mb bigger than 256Mb limit
Comment 2 EoD 2014-08-13 10:44:55 UTC
Created attachment 104555 [details]
dmesg with kernel 3.14.16, mesa 10.2.4 and libdrm 2.4.54
Comment 3 EoD 2014-08-13 11:48:23 UTC
Mesa 10.2.4 with kernel 3.16.0 and 3.15.9 give about the same errors as the dmesg file attached.

Unfortunately I cannot test current mesa git (52901ec2615761390f5ef97b11516dae330d27d1) as there are some runtime linking problems on my system.
Comment 4 EoD 2014-08-13 15:35:25 UTC
Created attachment 104572 [details]
syslog with kernel 3.16.0, mesa 10.2.4 and libdrm master

A shorter log during the crash
Comment 5 MWATTT 2014-11-19 02:39:21 UTC
I've got this bug too.
I've bisected and found that most shaders packs starts to hang at commit
7e414b58640aee6e243d337e72cea290c354f632
"glsl: break the gl_FragData array into separate gl_FragData[i] variables"
However, one of them starts to hang with an earlier commit:
edbbfac6cfc634e697d7f981155a5072c52d77ac
"r600g: fast color clears for single-sample buffers"

This only happens on evergreen+ hardware(tested on JUNIPER and THAMES, works fine on RV770).

A workaround is to set the environment variable R600_DEBUG=notiling.

This bug also happens in various Unreal Engine 4 demos. (tested on Reflections Subway Demo, where the hang happens at the beginning). The environment variable also solves the problem.
Comment 6 Michel Dänzer 2014-11-19 06:16:58 UTC
(In reply to MWATTT from comment #5)
> However, one of them starts to hang with an earlier commit:
> edbbfac6cfc634e697d7f981155a5072c52d77ac
> "r600g: fast color clears for single-sample buffers"
> 
> This only happens on evergreen+ hardware(tested on JUNIPER and THAMES, works
> fine on RV770).
> 
> A workaround is to set the environment variable R600_DEBUG=notiling.

Fast clears only work with tiled surfaces, so R600_DEBUG=notiling makes the commit above ineffective. Adding the author of that commit to CC.
Comment 7 Alex Deucher 2014-11-19 16:01:12 UTC
possibly related bug 73528.
Comment 8 EoD 2014-11-20 20:45:28 UTC
Mesa 10.3.1:
I can confirm that minecraft+shaders with R600_DEBUG=notiling does not lock up
my system, although there a plenty of errors like:

EE r600_shader.c:157 r600_pipe_shader_create - translation from TGSI failed !
EE r600_state_common.c:751 r600_shader_select - Failed to build shader variant
(type=1) -1


Without R600_DEBUG=notiling, behaviour hasn't changed.
Comment 9 MirceaKitsune 2015-07-01 17:54:46 UTC
Argh, I wish I could have found this report earlier! I discovered it by doing a Google search on commit edbbfac6cfc634e697d7f981155a5072c52d77ac which introduced the exact same lockup for my video card. I've been maintaining the following report for years now, about the same bug apparently:

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

So from what I understand, setting R600_DEBUG=notiling should prevent fast-clear from freezing the GPU? I will gladly try this for Second Life and other programs that trigger the problem, and see if there are any changes.
Comment 10 MirceaKitsune 2015-07-01 18:36:20 UTC
Alright, I finished testing the 3 problematic games which this bug affected for me, to see how they behave with R600_DEBUG=notiling enabled. I don't use shaders for MineCraft so I can't test them specifically, although we're obviously talking about the same issue so this is still relevant. My results are:

Second Life: No more GPU freeze when Advanced Lighting is enabled! This was one of the most immediate triggers for the issue in my case, and in most scenarios it immediately brought down the X server... now there is not a single hiccup.

Stunt Rally: No more freezes when enabling shaders! In its case however the problem is more probabilistic, so this isn't 100% guaranteed.

One Late Night: The crash still exists, even with notiling. So there are still cases where this variable does not solve the problem, although in most engines it does and I'm happy enough with that for the time being.
Comment 11 Marek Olšák 2015-07-02 10:36:16 UTC

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


bug/show.html.tmpl processed on Feb 28, 2017 at 05:28:30.
(provided by the Example extension).