Search Unity

Linux + Vulkan crash

Discussion in 'Linux' started by AndrewCzarnietzki, Sep 26, 2020.

  1. AndrewCzarnietzki

    AndrewCzarnietzki

    Joined:
    Jul 23, 2013
    Posts:
    189
    Hey,

    So we'd love to add Linux support for our game Curved Space.

    Unfortunately, we use AsynchReadback to get data off the GPU, and its fundemental to the way our game works. This is explicitly unsupported for Metal and OpenGL.

    However, it looks like Linux supports Vulkan! We also just updated to 2020.1F5, so figured its time to try new things.

    Unfortunately, this crashes as soon as the splash screen finishes loading:


    Vulkan API version 1.1.0 (1.1.109 supported by driver, 1.1.0 requested)
    Vulkan vendor=[NVIDIA] id=[10de]
    Vulkan renderer=[GeForce GTX 1080] id=[1b80]
    Vulkan device type 2
    Vulkan driverversion=[0x6cc54000] uint=[1824866304]
    Vulkan PSO: cache data not found [path=/tmp/Only By Midnight/Curved Space/vulkan_pso_cache.bin]
    Begin MonoManager ReloadAssembly
    - Completed reload, in 0.106 seconds
    requesting resize 1920 x 1080
    Using native desktop resolution 1920 x 1080
    requesting fullscreen 1920 x 1080 at 0 Hz
    Desktop is 1920 x 1080 @ 60 Hz
    InitializeOrResetSwapChain 1920x1080 hdr=0 samples=1

    no /proc/self/maps, not on linux?


    Native stacktrace:

    /home/todd/Videos/Linux_Demo/Curved Space_Data/MonoBleedingEdge/x86_64/libmonobdwgc-2.0.so(+0xd7b98) [0x7f5878bb4b98]
    /home/todd/Videos/Linux_Demo/Curved Space_Data/MonoBleedingEdge/x86_64/libmonobdwgc-2.0.so(+0x5bd6f) [0x7f5878b38d6f]
    /lib/x86_64-linux-gnu/libpthread.so.0(+0x128a0) [0x7f58800408a0]

    Debug info from gdb:


    =================================================================
    Got a SIGSEGV while executing native code. This usually indicates
    a fatal error in the mono runtime or one of the native libraries
    used by your application.
    =================================================================

    Caught fatal signal - signo:11 code:1 errno:0 addr:(nil)
    Obtained -4 stack frames.


    Is there any information what that "not on linux" line means? Or is there any other information for why this might not work?

    Thanks!
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
  3. Michieal

    Michieal

    Joined:
    Jul 7, 2013
    Posts:
    92
    Not to necro this, but I have been having similar issues on my linux (Ubuntu) dev machine. From what I can tell, in my attempts to debug this, "no /proc/self/maps, not on linux?" means that the process has crashed, therefore there are no "self/maps" or "smaps" files in the proc folder. Because the process (proc) crashed. I figured that out, trying to find what happened to "smaps" on my own system.

    Unlike the Windows version of Unity, the Linux version is a paper kite in a tornado. By that, I mean that it'll crash if you look at it funny. (And yes, it's that bad.)

    This - "Caught fatal signal - signo:11 code:1 errno:0 addr:(nil)" - seems to mean that there was an error when Unity tried to access the GPU directly, and the user is not running manufacturer drivers, or the manufacturer didn't implement the specific function in their drivers. Personally, I am running an AMD Radeon 5500xt (NAVI 14) video card in my Ubuntu machine. Baking lightmaps fails hardcore, and some shaders crash the editor. This is one of the points that I really wish that Unity Technologies had of done some extra engineering and caught the error. I say this, because it's not an Edge Case scenario... I'm encountering it on a daily basis... and the forum has a bunch of posts about the code that @Tautvydas-Zilys linked from the github page. (Thank you, btw; that is helpful to have.)

    One may wonder why the user is not running native manufacture drivers, well -- in my case, the AMD drivers refuse to boot. I'm having to use Oibaf's graphic drivers and Vulkan (or OpenGL) to use the device.

    But, I get this error set when I try to bake the lighting in a scene and the scene has anything in it except a canvas. (Any object... including objects a non-lightmap static cube, causes a hard crash.)
     
    qliloushq likes this.