Search Unity

Linux builds with Vulkan crashing when resolution/quality is high or when Unity Editor is running

Discussion in 'Linux' started by Dreamback, Nov 4, 2019.

  1. Dreamback

    Dreamback

    Joined:
    Jul 29, 2016
    Posts:
    220
    We are trying to make a build of our app in Linux, using Unity 2019.2.11 and forcing Vulkan (it's an HDRP app). If we set our app resolution too much higher than 1920x1080, it crashes. If we set it to 1920x1080 and higher than lowest quality, it crashes. If we set it to 1920x1080 full screen, it crashes. If the Linux Unity Editor is running when we run our app, the app crashes.

    Looking in the Unity log, there are no errors, the log just ends with a call stack, which (if development build) ends with
    Code (CSharp):
    1. vk::DataBuffer::CreateResource()
    Note, in Unity 2019.1.12 there *is* an error, an "Receiving unhandled NULL exception" right before the same call stack.

    This is on a decently high end system with 128GB RAM, a 1080ti, running the recent nVidia 430 driver, Debian Linux.

    Also, one additional thing: the exact same scene built with Unity 2019.1.12 has a better framerate, both in Linux/Vulkan and Windows/DX11
     
    Last edited: Nov 5, 2019
  2. andrews_unity

    andrews_unity

    Unity Technologies

    Joined:
    Dec 11, 2015
    Posts:
    264
    Can you try with 2019.3 ? We have made a rather large amount of fixes and changes for Vulkan in 2019.3
     
  3. Dreamback

    Dreamback

    Joined:
    Jul 29, 2016
    Posts:
    220
    So, we optimized our code to create fewer large rendertextures, and now it only crashes if we have the Unity Editor opened at the same time we run our app at 4k/Ultra. Which is interesting because it's the same GPU with the same GPU RAM as on Windows, and system RAM is quite large.

    I'll try 2019.3 when I can but it's annoying to test various resolutions/qualities since it no longer has the debugging resolution menu.
     
  4. hurleybird

    hurleybird

    Joined:
    Mar 4, 2013
    Posts:
    258
    Hi there, I've been having this problem with Dominus Galaxia's Linux build for a long time now when using Vulkan. The title scene works fine in Vulkan, but as soon as you try to transition to the main gameplay scene there's a CTD (example log attached. Likely pertinent line: Vulkan - Out of memory!).

    The version on Steam is using 2020.1.2, but this issue goes back at least to 2019.1.something

    After stumbling across this thread and hearing how dreamback was able to get things working with low settings, I was able to get the gameplay scene to load correctly by lowering the resolution and graphics preset. I can raise both back up after the scene has loaded without causing a crash though, so I think the problem is specifically with scene loading. Same behavior from the standalone and editor (and I should also note, editor will crash whether I transition to the scene from the title, or attempt to play the gameplay scene directly).

    Not everyone I've talked to has suffered the CTD on Vulkan-Linux. I'm not sure if AMD GPUs are affected. Intel/Nvidia seem to be with the default proprietary drivers. It might be that those who haven't suffered the bug are just using lower settings, have more video RAM, etc. I can reproduce on a Ubuntu 20.04 LTS + 6700HQ + 2GB GTX 960M + 16GB RAM laptop.

    If you download the KS Edition build linked above on Linux, you'll see a popup where you can chose between OpenGL or Vulkan when you launch the game. Hopefully that's sufficient, since trying to put together an example project would likely be awkward for this scenario (eg. the crash seems to be specific to opening a relatively heavy scene).
     

    Attached Files:

    Last edited: Aug 20, 2020
  5. elbarz

    elbarz

    Joined:
    May 21, 2020
    Posts:
    27
    Let me try, I'm using Centos 7 with propietary Nvidia drivers to check how it works in high and low specs
     
  6. zoooom

    zoooom

    Joined:
    Feb 8, 2012
    Posts:
    50
    +1 we are experiencing this as well. Scenes that run at 4k resolution using DX11 with no problem will crash or produce a black screen using Vulkan (on Windows or Linux) running at anything over 1080p. This is on a high spec machine (i9 / 32Gb / 2080Ti). On lesser machines the crash resolution is much lower.

    The stack trace in the crash log is always:

    (Unity) vk::DataBuffer::CreateResource
    (Unity) vk::DataBuffer::Initialize
    (Unity) GfxDeviceVK::InitializeBufferInternal
    (Unity) GfxDeviceWorker::RunCommand
    (Unity) GfxDeviceWorker::RunExt
    (Unity) GfxDeviceWorker::RunGfxDeviceWorker
    (Unity) Thread::RunThreadWrapper
    (KERNEL32) BaseThreadInitThunk
    (ntdll) RtlUserThreadStart


    We are using Unity 2019.4 and HDRP 7.4.1.
     
  7. zoooom

    zoooom

    Joined:
    Feb 8, 2012
    Posts:
    50
    To anyone reading this thread - updating to the latest HDRP preview package (9.0.0-preview.54 as of writing) fixed this issue for us.
     
    Last edited: Oct 21, 2020
  8. jonfink-arl

    jonfink-arl

    Joined:
    Mar 31, 2020
    Posts:
    4
    We're having exactly this same problem (Unity 2019.4, Linux builds crashing with stack trace like above). Running on high spec machine as well (Xeon, 64GB / 2080Ti). Our (large) environment is split into four scenes:

    * A base scene with terrains
    * Three additional scenes that get loaded additively

    The correlation with resolution of the scene and quality settings really resonates with me -- though it doesn't seem entirely deterministic, sometimes I can get 2/3 of the additional scenes loaded without crash but almost never is it able to load all of the data. I've tried splitting out the scenes even more to determine if there is a particular asset that is causing issues but to no avail.

    We're using the standard render pipeline so, unfortunately the suggestion above to update to latest HDRP preview package won't work. Is there anything else to help track down this issue?