Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

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

Discussion in 'Editor & General Support' started by marcrem, May 5, 2021.

  1. marcrem

    marcrem

    Joined:
    Oct 13, 2016
    Posts:
    336
    Hi,

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

    Code (CSharp):
    1. DisplayProgressbar: Compiling shader variants
    2. Failed to get ipc connection from UnityShaderCompiler.exe shader compiler! D:/Dev/Unity/2019.4.25f1/Editor/Data/Tools/UnityShaderCompiler.exe
    3. Failed to get ipc connection from UnityShaderCompiler.exe shader compiler! D:/Dev/Unity/2019.4.25f1/Editor/Data/Tools/UnityShaderCompiler.exe
    4. Failed to get ipc connection from UnityShaderCompiler.exe shader compiler! D:/Dev/Unity/2019.4.25f1/Editor/Data/Tools/UnityShaderCompiler.exe
    5. Failed to get ipc connection from UnityShaderCompiler.exe shader compiler! D:/Dev/Unity/2019.4.25f1/Editor/Data/Tools/UnityShaderCompiler.exe
    6. Failed to get ipc connection from UnityShaderCompiler.exe shader compiler! D:/Dev/Unity/2019.4.25f1/Editor/Data/Tools/UnityShaderCompiler.exe
    7. Failed to get ipc connection from UnityShaderCompiler.exe shader compiler! D:/Dev/Unity/2019.4.25f1/Editor/Data/Tools/UnityShaderCompiler.exe
    8. Failed to get ipc connection from UnityShaderCompiler.exe shader compiler! D:/Dev/Unity/2019.4.25f1/Editor/Data/Tools/UnityShaderCompiler.exe
    9. Failed to get ipc connection from UnityShaderCompiler.exe shader compiler! D:/Dev/Unity/2019.4.25f1/Editor/Data/Tools/UnityShaderCompiler.exe
    10. Failed to get ipc connection from UnityShaderCompiler.exe shader compiler! D:/Dev/Unity/2019.4.25f1/Editor/Data/Tools/UnityShaderCompiler.exe
    11. Failed to get ipc connection from UnityShaderCompiler.exe shader compiler! D:/Dev/Unity/2019.4.25f1/Editor/Data/Tools/UnityShaderCompiler.exe
    12. Shader compiler: failed to launch and initialize compiler executable, even after 10 retries
    13. (Filename: C:\buildslave\unity\build\Tools/UnityShaderCompiler/ShaderCompilerClient.cpp Line: 546)
    14.  
    15. 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
    16. (Filename: C:\buildslave\unity\build\Tools/UnityShaderCompiler/ShaderCompilerClient.cpp Line: 294)
    17.  
    18. 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
    19.  
    20. (Filename: C:\buildslave\unity\build\Runtime/Utilities/Argv.cpp Line: 376)
    21.  
    22.  
    23. Aborting batchmode due to failure:
    24. 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!
     
    rickypu likes this.
  2. hugeandy

    hugeandy

    Joined:
    Nov 2, 2016
    Posts:
    130
    @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!
     
  3. hugeandy

    hugeandy

    Joined:
    Nov 2, 2016
    Posts:
    130
    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
     
  4. marcrem

    marcrem

    Joined:
    Oct 13, 2016
    Posts:
    336
    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. hugeandy

    hugeandy

    Joined:
    Nov 2, 2016
    Posts:
    130
    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!
     
  6. billy_z

    billy_z

    Joined:
    Aug 23, 2022
    Posts:
    1
    HI I want to know how to solve this problem. the URL below can not be open..
     
  7. bgrz

    bgrz

    Joined:
    Mar 22, 2015
    Posts:
    59
    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
     
  8. Whatever560

    Whatever560

    Joined:
    Jan 5, 2016
    Posts:
    405
    That is a crazy issue. Thanks for having solved it and for it to show up in the search engine.
     
  9. slims

    slims

    Joined:
    Dec 31, 2013
    Posts:
    86
    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?