ValveSoftware / Fossilize

A serialization format for various persistent Vulkan object types.
MIT License
561 stars 46 forks source link

fossilize_replay causing OOM (but only in Deep Rock Galatic) #231

Closed doogie544 closed 1 year ago

doogie544 commented 1 year ago

flatpak Steam on Fedora 38. 32G Ram 8G of swap via zram. amd 6800xt

SystemInfo.txt

Today when launching DRG the shader compilation before game launched caused an OOM. I tried the following

Verified game files

Launched the game in DX11 mode instead of DX12.

Disabled shader pre cache and then deleted the cache folder for DRG then enabling the pre-cahce again: only change there was that instead of an OOM withing 10 seconds it went to 44% then OOM, Subsequent launches then OOM'd in 10 seconds

Tried other games, none had issues

Borderland 3: used about 26% of ram Tiny Tina's Wonderlands: 26-40% of Ram with occasional slow creeps to 70% for a short time then back to 26% Smite 26% Icarus 26%

I also tried Team Fortress 2 as a control (native version not proton) and it used about 20%

I then tried creating a steam_dev.cfg file with the contents unShaderHighPriorityProcessingThreads 12 this slowed down the ram usage but still resulted in OOM. Changing it to 8 further slowed it but still OOM. Setting it to 4 did allow it to complete but the ram usage was ~26% with slow creep to ~80% before dropping down to 26% again.

Before trying any other changes but after disabling the shader cache the start up log for steam showed nothing interesting steamlog.txt

when starting a game during the compilation the log showed exactly the same thing for both BL3 and DRG steamlog_shaders.txt

Other logs/info that might be of intrest: RuntrimeDiagx.txt shader_log.previous.txt shader_log.txt

Shader buckets, there appear to be 3 but here is the one from the main shader cache folder (~/.var/app/com.valvesoftware.Steam/.steam/steam/steamapps/shadercache/548430/fozpipelinesv6/steam_pipeline_cache.foz)

https://ufile.io/p7k74i3a

I have other steam_pipeline_cache.foz files in these subfolders so I can send them if they are helpful but one is 325MB so I will wait until I hear they are needed

image

kisak-valve commented 1 year ago

Hello @doogie544, this is a mesa 23.1.6 specific video driver regression which has already been fixed in mesa 23.1.7.

https://github.com/ValveSoftware/Fossilize/issues/230#issuecomment-1712385366 / https://gitlab.freedesktop.org/mesa/mesa/-/issues/9717.

The correct fix for this is for the Flatpak mesa maintainer(s) to update their runtime with a newer mesa version.

doogie544 commented 1 year ago

Hello @doogie544, this is a mesa 23.1.6 specific video driver regression which has already been fixed in mesa 23.1.7.

#230 (comment) / https://gitlab.freedesktop.org/mesa/mesa/-/issues/9717.

The correct fix for this is for the Flatpak mesa maintainer(s) to update their runtime with a newer mesa version.

I found that report as well thru the issue tracker for DRG, but it looked to me like they were reporting it after the game was running. This is happening before the game even launches. Are you sure it is the same issue?

It very well may be but the issues on both mesa page and the steam drg issue tracker made it seem like the others were reporting it after the game launches not during shader compilation

kisak-valve commented 1 year ago

230 is Fossilize-specific symptoms of the issue, I threw in one of a couple upstream issue reports for additional context.

doogie544 commented 1 year ago

OK thank you for the verification/clarification. I had seen that report as well but since they mentioned it happening when launching steam and I was only having the issue when launching DRG I didn't think they were the same thing.