Build failing to compile shaders in LTS 2019.4 when trying to build in "services" mode

Hi,

We’re having issues with our automated build process, running with services. Here are the errors we’re getting.

DisplayProgressbar: Compiling shader variants
Failed to get ipc connection from UnityShaderCompiler.exe shader compiler! D:/Dev/Unity/2019.4.25f1/Editor/Data/Tools/UnityShaderCompiler.exe
Failed to get ipc connection from UnityShaderCompiler.exe shader compiler! D:/Dev/Unity/2019.4.25f1/Editor/Data/Tools/UnityShaderCompiler.exe
Failed to get ipc connection from UnityShaderCompiler.exe shader compiler! D:/Dev/Unity/2019.4.25f1/Editor/Data/Tools/UnityShaderCompiler.exe
Failed to get ipc connection from UnityShaderCompiler.exe shader compiler! D:/Dev/Unity/2019.4.25f1/Editor/Data/Tools/UnityShaderCompiler.exe
Failed to get ipc connection from UnityShaderCompiler.exe shader compiler! D:/Dev/Unity/2019.4.25f1/Editor/Data/Tools/UnityShaderCompiler.exe
Failed to get ipc connection from UnityShaderCompiler.exe shader compiler! D:/Dev/Unity/2019.4.25f1/Editor/Data/Tools/UnityShaderCompiler.exe
Failed to get ipc connection from UnityShaderCompiler.exe shader compiler! D:/Dev/Unity/2019.4.25f1/Editor/Data/Tools/UnityShaderCompiler.exe
Failed to get ipc connection from UnityShaderCompiler.exe shader compiler! D:/Dev/Unity/2019.4.25f1/Editor/Data/Tools/UnityShaderCompiler.exe
Failed to get ipc connection from UnityShaderCompiler.exe shader compiler! D:/Dev/Unity/2019.4.25f1/Editor/Data/Tools/UnityShaderCompiler.exe
Failed to get ipc connection from UnityShaderCompiler.exe shader compiler! D:/Dev/Unity/2019.4.25f1/Editor/Data/Tools/UnityShaderCompiler.exe
Shader compiler: failed to launch and initialize compiler executable, even after 10 retries
(Filename: C:\buildslave\unity\build\Tools/UnityShaderCompiler/ShaderCompilerClient.cpp Line: 546)

Shader compiler initialization error: Failed to get ipc connection from UnityShaderCompiler.exe shader compiler! D:/Dev/Unity/2019.4.25f1/Editor/Data/Tools/UnityShaderCompiler.exe
(Filename: C:\buildslave\unity\build\Tools/UnityShaderCompiler/ShaderCompilerClient.cpp Line: 294)

Fatal Error! Shader compiler initialization error: Failed to get ipc connection from UnityShaderCompiler.exe shader compiler! D:/Dev/Unity/2019.4.25f1/Editor/Data/Tools/UnityShaderCompiler.exe

(Filename: C:\buildslave\unity\build\Runtime/Utilities/Argv.cpp Line: 376)


Aborting batchmode due to failure:
Fatal Error! Shader compiler initialization error: Failed to get ipc connection from UnityShaderCompiler.exe shader compiler! D:/Dev/Unity/2019.4.25f1/Editor/Data/Tools/UnityShaderCompiler.exe
  • Removing services would cause a security breach
  • Add the application to the firewall = not working
  • Add the application’s port to the firewall = not working

It used to work. We recently updated to 2019.4.25f1, and we are using URP, even though I don’t think it’s the problem.

I hope someone at Unity can check this out.

Thank you!

1 Like

@marcrem did you find a solution to this problem? I’ve just come accross it and not sure what the issue is, considering everything was working fine yesterday!

These builds are running on EC2 cloud agents. I have just noticed that we changed the instance type from t2.xlarge to c5.9xlarge and that seems to be what breaks it. c5.9xlarge has this problem. t2.xlarge has no problem

Hi there,

Soooo sorry for not posting the working solution. Here’s what I did to solve the issue:
https://www.programmersought.com/article/4092572283/

5 Likes

Brilliant, that’s the solution, thanks for that!

I guess the interesting thing about changing the instance type is that the old instance only had 4 CPUs and the new one has 32. I’m guessing that Unity launches an instance of the shader compiler per CPU, and before we must have just been under the limit but with the more CPUs it pushed it over

Cheers!

HI I want to know how to solve this problem. the URL below can not be open…

This indeed worked, thanks for the solution. That website seems like a scraper from StackOverflow so I’ll summarize the answer here since I don’t think that website will remain online for much longer:

  • open Regedit
  • go to “HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\SubSystems”
  • double-click “Windows”
  • change the 768 number in the “SharedSection=1024,20480,768” part to 2048
  • restart Windows
9 Likes

That is a crazy issue. Thanks for having solved it and for it to show up in the search engine.

I’m getting this problem running my builds in a docker container in github actions. I don’t suppose anyone knows how to apply this fix to the container?

I’m having exactly this issue in a docker instance did you find the solution?

I eventually migrated from docker to virtualbox and I also had this issue… regedit was defenetly the solution. I also did it with a gitlab runner shell executor and it also fixed the issue in that case.

I have the same issue but on macOS heh

If anyone comes across this and is using AWS but their project is too big for smaller runners, I got around this by using memory optimized instance r5.2xlarge