Fatal signal during CI build (android/ubuntu, asset importer)
Describe the bug
I get a fatal error during CI builds (github actions, using game-ci/unity-builder which just calls Unity via command line) on ubuntu when building for Android. During asset import, a fatal exception is thrown when loading a GLTF. See stack below for more detauls.
Files https://github.com/microsoft/MixedRealityToolkit-Unity/blob/mrtk3/com.microsoft.mrtk.input/Visualizers/ControllerVisualizer/Models/generic-trigger-squeeze-touchpad-thumbstick/left.glb Khronos validation passes.
Desktop (please complete the following information): Unity: 2022.3.0f1 glTFast: 5.0.4 or 4.9.2 Universal render pipeline 14.0.7 Targeting Android (IL2CPP) in -batchmode
Github actions runner:
Current runner version: '2.304.0'
Operating System
Ubuntu
22.04.2
LTS
Runner Image
Image: ubuntu-22.04
Version: 20230517.1
Included Software: https://github.com/actions/runner-images/blob/ubuntu22/20230517.1/images/linux/Ubuntu2204-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu22%2F20230517.1
I'm not familiar with this part of GLTFast - but it looks like a texture is getting uploaded even though TextureCreationFlags.DontUploadOnCreate is set:
https://github.com/atteneder/glTFast/blob/5c36f4405012b13ad14ec871b77ba063c53cbbc3/Runtime/Scripts/GltfImport.cs#LL2646C1-L2650C7
This issue occurs with or without KTXUnity in the project.
Using the compile flag GLTFAST_EDITOR_IMPORT_OFF enables the build to succeed, but then of course, I don't have any GLTF import capability.
Stack trace:
Start importing Packages/com.microsoft.mrtk.input/Visualizers/ControllerVisualizer/Models/generic-trigger-squeeze-touchpad-thumbstick/left.glb using Guid(3571524ae1cc5b5428d87fd85a3a9f4c) Importer(-1,00000000000000000000000000000000) Caught fatal signal - signo:11 code:1 errno:0 addr:0x40
Obtained 62 stack frames.
#0 0x005621667b954c in burst_signal_handler(int, siginfo_t*, void*)
#1 0x007fe16cbd3980 in funlockfile
#2 0x007fe16c95ea13 in __nss_passwd_lookup
#3 0x007fe11a1f3d60 in __driDriverGetExtensions_virtio_gpu
#4 0x007fe11a3b1853 in __driDriverGetExtensions_virtio_gpu
#5 0x007fe11a7e7cc1 in nouveau_drm_screen_create
#6 0x007fe119e51012 in __driDriverGetExtensions_virtio_gpu
#7 0x007fe119fc91b5 in __driDriverGetExtensions_virtio_gpu
#8 0x007fe119fcc230 in __driDriverGetExtensions_virtio_gpu
#9 0x007fe119fd1a08 in __driDriverGetExtensions_virtio_gpu
#10 0x00562166de2b15 in ApiGLES::TextureImage(unsigned int, unsigned int, int, GraphicsFormat, int, int, int, int, int, void const*)
#11 0x00562166dd5f73 in (anonymous namespace)::UploadImages(ApiGLES*, unsigned int, unsigned int, int, GraphicsFormat, unsigned char const*, unsigned long, GraphicsFormat, int, int, int, int, unsigned char*)
#12 0x00562166dc8caa in gles::UploadTexture(ApiGLES*, GLESTexture&, GraphicsFormat, void const*, unsigned long, int, int, int, int, TextureUploadFlags)
#13 0x00562166dc8852 in GfxDeviceGLES::UploadTexture2D(TextureID, TextureDimension, unsigned char const*, unsigned long, int, int, GraphicsFormat, int, TextureUploadFlags)
#14 0x005621666d7677 in UploadTexture2DData(GfxDevice&, UploadTextureDataParams const&)
#15 0x00562166655f6b in Texture2D::UploadTexture(int, bool)
#16 0x0056216665337d in Texture2D::AwakeFromLoad(AwakeFromLoadMode)
#17 0x0056216666df87 in Texture2DScripting::Create(ScriptingObjectOfType<Texture2D>, int, int, int, GraphicsFormat, TextureCreationFlags, void*, core::basic_string<char, core::StringStorageDefault<char> > const&)
#18 0x00562165f9a087 in Texture2D_CUSTOM_Internal_CreateImpl(ScriptingBackendNativeObjectPtrOpaque*, int, int, int, GraphicsFormat, TextureCreationFlags, void*, ScriptingBackendNativeStringPtrOpaque*)
#19 0x000000400afc02 in (wrapper managed-to-native) UnityEngine.Texture2D:Internal_CreateImpl (UnityEngine.Texture2D,int,int,int,UnityEngine.Experimental.Rendering.GraphicsFormat,UnityEngine.Experimental.Rendering.TextureCreationFlags,intptr,string)
#20 0x000000400afad0 in UnityEngine.Texture2D:Internal_Create (UnityEngine.Texture2D,int,int,int,UnityEngine.Experimental.Rendering.GraphicsFormat,UnityEngine.Experimental.Rendering.TextureCreationFlags,intptr,string)
#21 0x0000004033e1d0 in UnityEngine.Texture2D:.ctor (int,int,UnityEngine.Experimental.Rendering.GraphicsFormat,UnityEngine.Experimental.Rendering.TextureCreationFlags,int,intptr,string)
#22 0x0000004033e150 in UnityEngine.Texture2D:.ctor (int,int,UnityEngine.Experimental.Rendering.GraphicsFormat,UnityEngine.Experimental.Rendering.TextureCreationFlags)
#23 0x0000004033e064 in GLTFast.GltfImport:CreateEmptyTexture (GLTFast.Schema.Image,int,bool)
#24 0x0000004033c73c in System.Runtime.CompilerServices.AsyncTaskMethodBuilder:Start<GLTFast.GltfImport/<CreateTexturesFromBuffers>d__126> (GLTFast.GltfImport/<CreateTexturesFromBuffers>d__126&)
#25 0x0000004033c618 in GLTFast.GltfImport:CreateTexturesFromBuffers (GLTFast.Schema.Image[],GLTFast.Schema.BufferView[],System.Collections.Generic.List`1<GLTFast.ImageCreateContext>)
#26 0x00000040337f58 in System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<bool>:Start<GLTFast.GltfImport/<Prepare>d__115> (GLTFast.GltfImport/<Prepare>d__115&)
#27 0x00000040337e80 in GLTFast.GltfImport:Prepare ()
#28 0x0000004032fac0 in System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<bool>:Start<GLTFast.GltfImport/<LoadFromUri>d__95> (GLTFast.GltfImport/<LoadFromUri>d__95&)
#29 0x0000004032f9c4 in GLTFast.GltfImport:LoadFromUri (System.Uri,System.Threading.CancellationToken)
#30 0x0000004032f670 in System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<bool>:Start<GLTFast.GltfImport/<Load>d__55> (GLTFast.GltfImport/<Load>d__55&)
#31 0x0000004032f560 in GLTFast.GltfImport:Load (System.Uri,GLTFast.ImportSettings,System.Threading.CancellationToken)
#32 0x0000004032f200 in System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<bool>:Start<GLTFast.GltfImport/<Load>d__54> (GLTFast.GltfImport/<Load>d__54&)
#33 0x0000004032ece8 in GLTFast.GltfImport:Load (string,GLTFast.ImportSettings,System.Threading.CancellationToken)
#34 0x0000004032e7b4 in System.Runtime.CompilerServices.AsyncVoidMethodBuilder:Start<GLTFast.Utils.AsyncHelpers/<>c__DisplayClass1_0`1/<<RunSync>b__0>d<bool>> (GLTFast.Utils.AsyncHelpers/<>c__DisplayClass1_0`1/<<RunSync>b__0>d<bool>&)
#35 0x0000004032e4a0 in GLTFast.Utils.AsyncHelpers/<>c__DisplayClass1_0`1<bool>:<RunSync>b__0 (object)
#36 0x0000004032d4e8 in GLTFast.Utils.AsyncHelpers:RunSync<bool> (System.Func`1<System.Threading.Tasks.Task`1<bool>>)
#37 0x000000401915a6 in UnityEditor.AssetImporters.ScriptedImporter:GenerateAssetData (UnityEditor.AssetImporters.AssetImportContext)
#38 0x007fe0f0768328 in mono_get_runtime_build_info
#39 0x007fe0f090721e in mono_runtime_invoke
#40 0x007fe0f0907168 in mono_runtime_invoke
#41 0x00562166c1bd23 in scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool)
#42 0x00562166bf9867 in ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool)
#43 0x005621683057e6 in ScriptedImporter::GenerateAssetData(AssetImportContext&)
#44 0x005621681a54d8 in ImportToObjects(core::basic_string<char, core::StringStorageDefault<char> > const&, core::hash_map<AssetDatabase::ImporterID, ImporterInfo, core::hash<AssetDatabase::ImporterID>, std::equal_to<AssetDatabase::ImporterID> > const&, dynamic_array<PostprocessorInfo, 0ul> const&, AssetResolveTracker const&, ImportAssetInputs const&, ImportAssetOutputs&, IImportProgress*)
#45 0x005621681a42ac in ImportAsset(core::hash_map<AssetDatabase::ImporterID, ImporterInfo, core::hash<AssetDatabase::ImporterID>, std::equal_to<AssetDatabase::ImporterID> > const&, dynamic_array<PostprocessorInfo, 0ul> const&, AssetResolveTracker const&, ImportAssetInputs const&, ImportAssetOutputs&, IImportProgress*)
#46 0x005621681d1a9a in AssetImportWorker::Import(AssetResolver&, ImportAssetInputs const&, WorkerImportResponse&, IImportProgress*, bool*)
#47 0x00562168217913 in AssetImportManager::ImportInProcess(AssetResolver&, ArtifactKey const&, AssetImportParameters const&, AssetDatabase::ArtifactID&, IImportProgress*, core::hash_set<core::basic_string<char, core::StringStorageDefault<char> >, core::hash<core::basic_string<char, core::StringStorageDefault<char> > >, std::equal_to<core::basic_string<char, core::StringStorageDefault<char> > > >&, CrashedAssetImportsDatabase&)
#48 0x00562168203552 in AssetImportManager::Import(core::hash_map<AssetDatabase::ImporterID, ImporterInfo, core::hash<AssetDatabase::ImporterID>, std::equal_to<AssetDatabase::ImporterID> > const&, dynamic_array<PostprocessorInfo, 0ul> const&, AssetResolver&, CategorizedAssets&, IImportProgress*, core::hash_set<UnityGUID, core::hash<UnityGUID>, std::equal_to<UnityGUID> > const&, ImportedAssetsReloadList*, core::hash_set<core::basic_string<char, core::StringStorageDefault<char> >, core::hash<core::basic_string<char, core::StringStorageDefault<char> > >, std::equal_to<core::basic_string<char, core::StringStorageDefault<char> > > >&, CrashedAssetImportsDatabase&, OnDemandScheduler&, bool)
#49 0x0056216822ac94 in RefreshInternalV2(AssetDatabase::UpdateAssetOptions, ScanFilter const&, InternalRefreshFlagsV2)
#50 0x00562168206375 in StopAssetImportingV2Internal(AssetDatabase::UpdateAssetOptions, InternalRefreshFlagsV2, ScanFilter const*, char const*)
#51 0x0056216820877e in InitialRefreshV2(bool, bool)
#52 0x005621678c2a0b in Application::InitializeProject()
#53 0x00562167e62dda in InitializeUnity(void*)
#54 0x007fe16db46e23 in g_source_get_time
#55 0x007fe16db463a5 in g_main_context_dispatch
#56 0x007fe16db46770 in g_main_context_dispatch
#57 0x007fe16db46a82 in g_main_loop_run
#58 0x007fe16eb4da25 in gtk_main
#59 0x00562167e62575 in main
#60 0x007fe16c7f1c87 in __libc_start_main
#61 0x00562165f06029 in _start
Segmentation fault (core dumped)
This also occurs for the same project when targeting iOS
@camnewnham Have you found a workaround for this?
@camnewnham Have you found a workaround for this?
No, I ended up switching to a Windows runner to avoid the issue.
Sorry to hear you have troubles with this.
The stack trace leaves me to assume there might be a problem in this machine's OpenGLES drivers or the Unity core itself.
You could try enforcing another graphics backend and see if that helps (OpenGLCore or Vulkan).
Otherwise I'd recommend to prepare reproduction steps (with a sample project) and report an issue via the Unity Bug Reporting tool
Thanks