Bug 91545

Summary: [BONAIRE][ARK: Survival Evolved] Regression: radeonsi: flush if the memory usage for an IB is too high
Product: Mesa Reporter: Shawn Starr <shawn.starr>
Component: Drivers/Gallium/radeonsiAssignee: Default DRI bug account <dri-devel>
Status: RESOLVED NOTOURBUG QA Contact: Default DRI bug account <dri-devel>
Severity: normal    
Priority: medium    
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Shawn Starr 2015-08-04 00:58:04 UTC
While playing ARK: Survival Evolved this patch caused some corruption in rain falling and other textures.

See video: https://www.youtube.com/watch?v=2rbvF2CzwgE

Reverting this patch fixes issue.
Comment 1 Marek Olšák 2015-08-06 14:16:13 UTC
Would you please make an apitrace and send it to us? Thanks.

Marek
Comment 2 Benjamin 2015-08-07 06:05:08 UTC
I had this same issue on ArchLinux, unfortunately(?) gone after an update today:

[2015-08-06 23:25] [ALPM] upgraded bluez (5.32-1 -> 5.33-1)
[2015-08-06 23:25] [ALPM] upgraded bluez-libs (5.32-1 -> 5.33-1)
[2015-08-06 23:25] [ALPM] upgraded e2fsprogs (1.42.12-2 -> 1.42.13-1)
[2015-08-06 23:25] [ALPM] upgraded graphite (1:1.2.4-1 -> 1:1.3.0-1)
[2015-08-06 23:25] [ALPM] upgraded libdrm-git (5535.dfed5e1-1 -> 5632.2978f5c-1)
[2015-08-06 23:25] [ALPM] upgraded llvm-libs-svn (243903-1 -> 244306-1)
[2015-08-06 23:25] [ALPM] upgraded mesa-git (71784.7ac946e-1 -> 71854.42d283a-1)
[2015-08-06 23:25] [ALPM] upgraded mesa-libgl-git (71784.7ac946e-1 -> 71854.42d283a-1)
[2015-08-06 23:25] [ALPM] upgraded chromaprint (1.1-2 -> 1.2-1)
[2015-08-06 23:25] [ALPM] upgraded chromium (44.0.2403.125-1 -> 44.0.2403.130-1)
[2015-08-06 23:25] [ALPM] upgraded llvm-svn (243903-1 -> 244306-1)
[2015-08-06 23:25] [ALPM] upgraded clang-svn (243903-1 -> 244306-1)
[2015-08-06 23:25] [ALPM] upgraded exiv2 (0.25-1 -> 0.25-2)
[2015-08-06 23:25] [ALPM] upgraded firefox (39.0-1 -> 39.0.3-1)
[2015-08-06 23:26] [ALPM] upgraded imagemagick (6.9.1.8-1 -> 6.9.1.10-1)
[2015-08-06 23:26] [ALPM] upgraded iproute2 (4.0.0-2 -> 4.1.1-1)
[2015-08-06 23:26] [ALPM] upgraded jsoncpp (1.6.2-1 -> 1.6.5-1)
[2015-08-06 23:26] [ALPM] upgraded lib32-libdrm-git (5535.dfed5e1-1 -> 5632.2978f5c-1)
[2015-08-06 23:26] [ALPM] upgraded lib32-libnl (3.2.25-1 -> 3.2.26-1)
[2015-08-06 23:26] [ALPM] upgraded lib32-llvm-libs-svn (243911-1 -> 244306-1)
[2015-08-06 23:26] [ALPM] upgraded lib32-mesa-git (71784.7ac946e-1 -> 71854.42d283a-1)
[2015-08-06 23:26] [ALPM] upgraded lib32-mesa-libgl-git (71784.7ac946e-1 -> 71854.42d283a-1)
[2015-08-06 23:26] [ALPM] upgraded mpg123 (1.22.1-1 -> 1.22.3-1)
[2015-08-06 23:26] [ALPM] upgraded lib32-mpg123 (1.22.1-1 -> 1.22.3-1)
[2015-08-06 23:26] [ALPM] upgraded libclc-git (270.201508032240-1 -> 270.201508070415-1)
[2015-08-06 23:26] [ALPM] upgraded opencl-mesa-git (71784.7ac946e-1 -> 71854.42d283a-1)
[2015-08-06 23:26] [ALPM] upgraded openmpi (1.8.7-1 -> 1.8.8-1)
[2015-08-06 23:26] [ALPM] upgraded php (5.6.11-1 -> 5.6.12-1)
[2015-08-06 23:26] [ALPM] upgraded subversion (1.8.13-2 -> 1.9.0-1)
[2015-08-06 23:26] [ALPM] upgraded xf86-video-intel-git (9075.4f0a58c-1 -> 9080.bc063c9-1)
[2015-08-06 23:26] [ALPM] transaction completed

I did manage to get a trace of the game with rain, but without the bug, if that might still be helpful. Or if Shawn Starr wants to try and make a trace, here's what I did to get mine:

1. Open the game's properties in steam
2. Set Launch Options...
3. Enter the following into the dialog:
apitrace32 trace %command%
(or if you'd like to see apitrace's output, konsole --hold --new-tab --nofork -e apitrace32 trace %command%)
4. Run the game from steam until it starts raining.

Is there any way to trim the trace to the part containing the interesting bits? Mine came out to 2.5GB. I see you can trim to certain frames, but how would I know which frames to trim it to?
Comment 3 Marek Olšák 2015-08-07 10:59:36 UTC
Hi,

We only need a trace that reproduces this bug. Traces without the bug are not useful.

You can run qapitrace, look up the states of a certain frame, and see how the frame looks like. Then you can either trim it there or find a better frame.
Comment 4 Benjamin 2015-08-08 06:43:19 UTC
Hmm, I rolled back my packages to the previous versions, but it's crashing now--looks like an oom fault:

[ 1698.432881] radeon 0000:01:00.0: GPU fault detected: 147 0x0604c402
[ 1698.432883] radeon 0000:01:00.0:   VM_CONTEXT1_PROTECTION_FAULT_ADDR   0x00000000
[ 1698.432884] radeon 0000:01:00.0:   VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x04088002
[ 1698.432886] VM fault (0x02, vmid 2) at page 0, read from TC (136)
[ 1698.432949] radeon 0000:01:00.0: GPU fault detected: 147 0x08248802
[ 1698.432950] radeon 0000:01:00.0:   VM_CONTEXT1_PROTECTION_FAULT_ADDR   0x00000000
[ 1698.432951] radeon 0000:01:00.0:   VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x04084002
[ 1698.432952] VM fault (0x02, vmid 2) at page 0, read from TC (132)
[ 1698.753653] radeon 0000:01:00.0: GPU fault detected: 147 0x05e48402
[ 1698.753657] radeon 0000:01:00.0:   VM_CONTEXT1_PROTECTION_FAULT_ADDR   0x00105F2F
[ 1698.753659] radeon 0000:01:00.0:   VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x04084002
[ 1698.753661] VM fault (0x02, vmid 2) at page 1072943, read from TC (132)

And in the console:

radeon: mmap failed, errno: 12
radeon: mmap failed, errno: 12
Assertion failed: Data != NULL [File:Runtime/OpenGLDrv/Public/OpenGLResources.h] [Line: 231] 

Signal 11 caught.
EngineCrashHandler: Signal=11

This is with 4GB of video ram and with settings on low and res set to 800x600, so I have a hard time believing I'm exhausting my vRAM, but I guess it could happen. I'm certain I've rolled back to the same exact state as before the updates, though...could there be some cached files that I need to delete hanging around somewhere?
Comment 5 Shawn Starr 2015-09-14 01:26:13 UTC
This has been reported outside of Mesa, as such the rain corruption is not a Mesa bug.

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.