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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Bug Constant Crashes on Ubuntu 22 & 23

Discussion in 'Editor & General Support' started by wiredninja, Aug 22, 2023.

  1. wiredninja

    wiredninja

    Joined:
    Jul 5, 2021
    Posts:
    15
    Recently my Unity Project started crashing on me, typically during compilation / domain reload - especially (but not exclusively) during active Debug-Sessions. I've tried setting up a new project and it turnes out I can't even add all the assets, that my current project uses without this happening (even outside of debug sessions). The Editor.log produces something like...

    Caught fatal signal - signo:6 code:-6 errno:0 addr:0x3e800003179
    Obtained 18 stack frames.
    #0 0x007fc4dfa3c4b0 in __sigaction
    #1 0x007fc4dfa90ffb in pthread_kill
    #2 0x007fc4dfa3c406 in gsignal
    #3 0x007fc4dfa2287c in abort
    #4 0x007fc35685e5c9 in monoeg_assert_abort
    #5 0x007fc356847d06 in mono_dl_fallback_unregister
    #6 0x007fc35685e8e1 in monoeg_g_logv
    #7 0x007fc35685ea1a in monoeg_assertion_message
    #8 0x007fc35685ea4c in mono_assertion_message
    #9 0x007fc35663ba5c in _init
    #10 0x007fc35663d811 in _init
    #11 0x007fc35663e9f6 in _init
    #12 0x007fc3566426a0 in mono_jit_set_domain
    #13 0x007fc3566c02bb in mono_install_ftnptr_eh_callback
    #14 0x007fc3566bfd39 in mono_install_ftnptr_eh_callback
    #15 0x000000405b5396 in (Unknown)
    #16 0x00000040a2d8f0 in UnityEditor.EditorTools.EditorToolCache:InstantiateEditors (UnityEditor.EditorTools.EditorToolContext,System.Collections.Generic.List`1<UnityEditor.EditorTools.ComponentEditor>)
    #17 0x00000040a2d640 in UnityEditor.EditorTools.EditorToolUtility:InstantiateComponentContexts (System.Collections.Generic.List`1<UnityEditor.EditorTools.ComponentEditor>)
    Launching bug reporter
    Attribute Qt::AA_EnableHighDpiScaling must be set before QCoreApplication is created.
    Warning: mdAssembly.Id.Equals(psiAssembly.Id), UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null, 4a72a14547d2421384fff0da0ae0ebd249600, cd7734f3bccf489dbb43e5af2a4ea3d841800
    Warning: mdAssembly.Id.Equals(psiAssembly.Id), UnityEngine.TestRunner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null, e7d17d5241154f3684550580a34a397c28000, 16e9906f44714e48bce59618de4fd92325000
    Warning: mdAssembly.Id.Equals(psiAssembly.Id), UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null, 4a72a14547d2421384fff0da0ae0ebd249600, cd7734f3bccf489dbb43e5af2a4ea3d841800
    Warning: mdAssembly.Id.Equals(psiAssembly.Id), UnityEngine.TestRunner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null, e7d17d5241154f3684550580a34a397c28000, 16e9906f44714e48bce59618de4fd92325000
    * Assertion at mini.c:2259, condition `code' not met​

    ... which then cascades into a series of similar, subsequent errors, while opening an equivalent amount of bug-reporters. This looks to me, like mono gives up, but being primarily a Java Dev, I'm a bit out of my element here and after 3 Days of failed attempts to nail this down, I hope someone could have a look at this.

    If anyone could point me towards the cause or possibly even a fix/workaround I'd be very thankful, since this problem makes working on my project nearly impossible.

    PS I'm currently on Unity 2023.1.0b20 and I tried upgrading to 2023.2.0b5 with the same result.
     

    Attached Files:

  2. wiredninja

    wiredninja

    Joined:
    Jul 5, 2021
    Posts:
    15
    Alright, it seems like I’ve managed to solve the issue...

    Since it seemed to be related to Mono, I've searched and found this https://github.com/mono/mono/issues/21651

    Since I had an upgrade to my system, shortly before the problem began, I theorized, that the issue might be caused by certain version(s) of the Linux Kernel if used with certain AMD CPUs.

    I've decided to downgrade my Kernel from 6.2.0-20.27 to 6.2.0-20.20 - and I could not reproduce a single crash since.

    My CPU is an AMD Ryzen 7 2700X, btw, so if you're facing the same problem and you're using a Ryzen CPU, it might be your Kernel that's causing it.

    Anyway, I hope this ends up being useful to someone.
     
    tjmaul and karliss_coldwild like this.
  3. tjmaul

    tjmaul

    Joined:
    Aug 29, 2018
    Posts:
    464
    I'm also on Ubuntu 22.04, have a Ryzen CPU and facing the same issue.
    I already gave up after an extensive search two days ago but then decided to post my issue on the forum. So thanks @karliss_coldwild to point me here! I'll try downgrading first thing tomorrow and if my machine goes up in flames, I'll be here posting from my phone :D

    @wiredninja after downgrading my kernel, how can I make sure that it doesn't upgrade automatically and how can I get notified when the problem is resolved so I can go back to using the latest kernels?
     
  4. tjmaul

    tjmaul

    Joined:
    Aug 29, 2018
    Posts:
    464
    Forgive my ignorance, but I was not able to install 6.2.0-20.20 because I didn't find it with
    apt install linux-image-...
    . Instead, I installed 6.3.4-060304-generic (because I read in the linked github issue that it was resolved in that version) using "Mainline Kernels", but I am not sure if it's a good idea. I read that drivers might not work anymore and such.

    Do you think that's a bad idea and can you suggest a safer way to change to a kernel version that works with unity?

    I had a good experience so far. Nothing else broke with the aforementioned kernel version and I'm not experiencing any more crashes. Thanks for sharing this information @wiredninja!