Search Unity

Command Line Argument -RunTests Fails with 'm_LastAlloc == NULL' on Unity 2020.3.1f1

Discussion in 'Testing & Automation' started by kristian_ronday, Sep 29, 2021.

  1. kristian_ronday

    kristian_ronday

    Joined:
    Aug 5, 2021
    Posts:
    1
    I'm starting this thread because our build system is running into issues with building TestRunner executables. We are using Unity 2020.3.1f1. We are able to build TestRunner builds using the editor UI, as well as the command line args on our Windows and Mac development machines. We, however, are unable to get our ubuntu build machine (more details below) to run the same command line arguments.


    Our build machine uses concourse and these are the images we use for the build steps:

    https://hub.docker.com/layers/unity...198b257b10ded0c3678f3f6e6b9bb?context=explore

    https://hub.docker.com/layers/unity...28b3317f7ca44c454eb903bd4e540?context=explore

    Note that the arguments for -buildWindows64Player and -buildOSXUniversalPlayer both work in the same setup and we are currently using that in our continuous deployment pipeline. Only the test runner builds are having this issue.


    Here are the end of the logs where you can see Assertion failed on expression: 'm_LastAlloc == NULL'


    Refreshing native plugins compatible for Editor in 8.52 ms, found 5 plugins.
    Preloading 0 native plugins for Editor in 0.00 ms.
    RefreshInfo: StopAssetImportingV2(NoUpdateAssetOptions) scanfilter:
    RefreshProfiler: Total: 136.959ms
    AcceleratorClientConnectionCallback - disconnected - unity-accelerator-service.unity-accelerator.svc.cluster.local:10080
    Assertion failed on expression: 'm_LastAlloc == NULL'

    Cleanup mono
    Compressing using quality level 191
    Compressing using quality level 255
    Compressing using quality level 255
    Compressing using quality level 255
    Compressing using quality level 204
    ./Editor/Platform/Linux/UsbDevices.cpp:UsbDevicesQuery
    Waiting on threads to park on joinable thread list timed out.
    debugger-agent: Unable to listen on 25
    [Package Manager] Server::Kill -- Server was shutdown
    Checking for leaked weakptr:
    Found no leaked weakptrs.
    ##utp:{"type":"MemoryLeaks","version":2,"phase":"Immediate","time":1632763451313,"processId":53,"allocatedMemory":28908778,"memoryLabels":[{"Default":-1764},{"Thread":151},{"Manager":2144},{"Texture":144},{"Shader":28288},{"Font":16239272},{"FontEngine":4096},{"Physics":1},{"Serialization":388968},{"BaseObject":-28288},{"File":11402844},{"String":230802},{"DynamicArray":257819},{"HashMap":22091},{"Utility":400},{"Curl":1112},{"PoolAlloc":120},{"Sprites":8},{"GI":472},{"WebRequest":39375},{"VR":1696},{"Secure":12180},{"Image":262144},{"Subsystems":96},{"EditorUtility":2064},{"AssetDatabase":5524},{"RestService":72},{"License":8576},{"UnityConnect":25520},{"Collab":827},{"Licensing":2024}]}


    To me, this looks like it may be a regression of this: https://issuetracker.unity3d.com/is...automated-tests-with-runtests-cmd-line-option



    Any help would be greatly appreciated! Let me know if more specific information is needed.
     
  2. sebastianwouters

    sebastianwouters

    Joined:
    Nov 9, 2021
    Posts:
    4
    Same here using Unity 2022.2.12f1 to make a Windows build via github actions.


    Checking for leaked weakptr:
    Found no leaked weakptrs.
    [Package Manager] Server::Kill -- Server was shutdown
    Memory Statistics:
    [ALLOC_TEMP_TLS] TLS Allocator
    StackAllocators :
    [ALLOC_TEMP_CurlRequest]
    Initial Block Size 64.0 KB
    Current Block Size 64.0 KB
    Peak Allocated Bytes 0 B
    Overflow Count 0
    [ALLOC_TEMP_MAIN]
    Initial Block Size ***6.0 MB
    Current Block Size ***25.8 MB
    Peak Allocated Bytes 73.6 MB
    Overflow Count 7
    [ALLOC_TEMP_Background Job.worker 3]
    Initial Block Size 32.0 KB
    Current Block Size 32.0 KB
    Peak Allocated Bytes 54 B
    Overflow Count 0
    [ALLOC_TEMP_Background Job.worker 6]
    Initial Block Size 32.0 KB
    Current Block Size 32.0 KB
    Peak Allocated Bytes 54 B
    Overflow Count 0
    [ALLOC_TEMP_Background Job.worker 2]
    Initial Block Size 32.0 KB
    Current Block Size 32.0 KB
    Peak Allocated Bytes ***.5 KB
    Overflow Count 0
    [ALLOC_TEMP_Background Job.worker 8]
    Initial Block Size 32.0 KB
    Current Block Size 32.0 KB
    Peak Allocated Bytes 54 B
    Overflow Count 0
    [ALLOC_TEMP_Background Job.worker ***5]
    Initial Block Size 32.0 KB
    Current Block Size 32.0 KB
    Peak Allocated Bytes 54 B
    Overflow Count 0
    [ALLOC_TEMP_BakingJobs.worker 0]
    Initial Block Size 256.0 KB
    Current Block Size 256.0 KB
    Peak Allocated Bytes 54 B
    Overflow Count 0
    [ALLOC_TEMP_AssetDatabase.FileHasherReader] x 4
    Initial Block Size 64.0 KB
    Current Block Size 64.0 KB
    Peak Allocated Bytes 0.6 KB
    Overflow Count 0
    [ALLOC_TEMP_Background Job.worker 0]
    Initial Block Size 32.0 KB
    Current Block Size 32.0 KB
    Peak Allocated Bytes 54 B
    Overflow Count 0
    [ALLOC_TEMP_BakingJobs.worker ***]
    Initial Block Size 256.0 KB
    Current Block Size 256.0 KB
    Peak Allocated Bytes 0.7 KB
    Overflow Count 0
    [ALLOC_TEMP_BatchDeleteObjects]
    Initial Block Size 64.0 KB
    Current Block Size 64.0 KB
    Peak Allocated Bytes 54 B
    Overflow Count 0
    [ALLOC_TEMP_CoreBusinessMetricsCache]
    Initial Block Size 64.0 KB
    Current Block Size 64.0 KB
    Peak Allocated Bytes 8.0 KB
    Overflow Count 0
    [ALLOC_TEMP_REST Message Handler]
    Initial Block Size 64.0 KB
    Current Block Size 64.0 KB
    Peak Allocated Bytes 54 B
    Overflow Count 0
    [ALLOC_TEMP_AssetDatabase.FileHasherHasher] x 4
    Initial Block Size 64.0 KB
    Current Block Size 64.0 KB
    Peak Allocated Bytes ***0.8 KB
    Overflow Count 0
    [ALLOC_TEMP_Background Job.worker ***]
    Initial Block Size 32.0 KB
    Current Block Size 256.0 KB
    Peak Allocated Bytes ***27.7 KB
    Overflow Count 437***
    [ALLOC_TEMP_AssetDatabase.IOService]
    Initial Block Size 64.0 KB
    Current Block Size 64.0 KB
    Peak Allocated Bytes 54 B
    Overflow Count 0
    [ALLOC_TEMP_Background Job.worker 5]
    Initial Block Size 32.0 KB
    Current Block Size 32.0 KB
    Peak Allocated Bytes 54 B
    Overflow Count 0
    [ALLOC_TEMP_Loading.PreloadManager]
    Initial Block Size 32.0 MB
    Current Block Size 32.0 MB
    Peak Allocated Bytes 2.*** MB
    Overflow Count 0
    [ALLOC_TEMP_Background Job.worker 4]
    Initial Block Size 32.0 KB
    Current Block Size 32.0 KB
    Peak Allocated Bytes 54 B
    Overflow Count 0
    [ALLOC_TEMP_Background Job.worker 7]
    Initial Block Size 32.0 KB
    Current Block Size 32.0 KB
    Peak Allocated Bytes 54 B
    Overflow Count 0
    [ALLOC_TEMP_CloudJob.worker 0]
    Initial Block Size 32.0 KB
    Current Block Size 32.0 KB
    Peak Allocated Bytes 3.4 KB
    Overflow Count 0
    [ALLOC_TEMP_Background Job.worker ***0]
    Initial Block Size 32.0 KB
    Current Block Size 32.0 KB
    Peak Allocated Bytes 54 B
    Overflow Count 0
    [ALLOC_TEMP_Background Job.worker ***2]
    Initial Block Size 32.0 KB
    Current Block Size 32.0 KB
    Peak Allocated Bytes 54 B
    Overflow Count 0
    [ALLOC_TEMP_Background Job.worker ***]
    Initial Block Size 32.0 KB
    Current Block Size 32.0 KB
    Peak Allocated Bytes 54 B
    Overflow Count 0
    [ALLOC_TEMP_HTTP REST Server]
    Initial Block Size 64.0 KB
    Current Block Size 64.0 KB
    Peak Allocated Bytes 93 B
    Overflow Count 0
    [ALLOC_TEMP_Background Job.worker ***3]
    Initial Block Size 32.0 KB
    Current Block Size 32.0 KB
    Peak Allocated Bytes 54 B
    Overflow Count 0
    [ALLOC_TEMP_AssetGarbageCollectorHelper]
    Initial Block Size 64.0 KB
    Current Block Size 64.0 KB
    Peak Allocated Bytes 0 B
    Overflow Count 0
    [ALLOC_TEMP_CurlRequest]
    Initial Block Size 64.0 KB
    Current Block Size 64.0 KB
    Peak Allocated Bytes 0 B
    Overflow Count 0
    [ALLOC_TEMP_Profiler.Dispatcher]
    Initial Block Size 64.0 KB
    Current Block Size 64.0 KB
    Peak Allocated Bytes 0 B
    Overflow Count 0
    [ALLOC_TEMP_Background Job.worker ***4]
    Initial Block Size 32.0 KB
    Current Block Size 32.0 KB
    Peak Allocated Bytes 54 B
    Overflow Count 0
    [ALLOC_TEMP_Job.worker 0]
    Initial Block Size 256.0 KB
    Current Block Size 276.0 KB
    Peak Allocated Bytes 275.7 KB
    Overflow Count ***
    [ALLOC_TEMP_Background Job.worker 9]
    Initial Block Size 32.0 KB
    Current Block Size 32.0 KB
    Peak Allocated Bytes 54 B
    Overflow Count 0
    [ALLOC_TEMP_EnlightenWorker]
    Initial Block Size 64.0 KB
    Current Block Size 64.0 KB
    Peak Allocated Bytes 54 B
    Overflow Count 0
    [ALLOC_TEMP_DirMonitor]
    Initial Block Size 64.0 KB
    Current Block Size 68.0 KB
    Peak Allocated Bytes 30.9 KB
    Overflow Count 0
    [ALLOC_TEMP_EditorTaskManager]
    Initial Block Size 64.0 KB
    Current Block Size 68.0 KB
    Peak Allocated Bytes 64.0 KB
    Overflow Count 0
    [ALLOC_TEMP_Loading.AsyncRead]
    Initial Block Size 64.0 KB
    Current Block Size 64.0 KB
    Peak Allocated Bytes ***28 B
    Overflow Count 0
    [ALLOC_MEMORYPROFILER]
    Requested Block Size ***.0 MB
    Peak Block count ***
    Peak Allocated memory 0.6 MB
    Peak Large allocation bytes 0 B
    [ALLOC_DEFAULT] Dual Thread Allocator
    Peak main deferred allocation count ***385
    [ALLOC_BUCKET]
    Large Block size 32.0 MB
    Used Block count ***
    Peak Allocated bytes ***4.7 MB
    [ALLOC_DEFAULT_MAIN]
    Requested Block Size ***6.0 MB
    Peak Block count ***0
    Peak Allocated memory 236.6 MB
    Peak Large allocation bytes 82.9 MB
    [ALLOC_DEFAULT_THREAD]
    Requested Block Size ***6.0 MB
    Peak Block count 2
    Peak Allocated memory 2***.8 MB
    Peak Large allocation bytes 0 B
    [ALLOC_TEMP_JOB_***_FRAME]
    Initial Block Size 2.0 MB
    Used Block Count 0
    Overflow Count (too large) 0
    Overflow Count (full) 0
    [ALLOC_TEMP_JOB_2_FRAMES]
    Initial Block Size 2.0 MB
    Used Block Count 0
    Overflow Count (too large) 0
    Overflow Count (full) 0
    [ALLOC_TEMP_JOB_4_FRAMES (JobTemp)]
    Initial Block Size 2.0 MB
    Used Block Count ***
    Overflow Count (too large) 0
    Overflow Count (full) 0
    [ALLOC_TEMP_JOB_ASYNC (Background)]
    Initial Block Size ***.0 MB
    Used Block Count ***
    Overflow Count (too large) 0
    Overflow Count (full) 0
    [ALLOC_GFX] Dual Thread Allocator
    Peak main deferred allocation count 256
    [ALLOC_BUCKET]
    Large Block size 32.0 MB
    Used Block count ***
    Peak Allocated bytes ***4.7 MB
    [ALLOC_GFX_MAIN]
    Requested Block Size ***6.0 MB
    Peak Block count 2
    Peak Allocated memory 34.*** MB
    Peak Large allocation bytes 2***.3 MB
    [ALLOC_GFX_THREAD]
    Requested Block Size ***6.0 MB
    Peak Block count ***
    Peak Allocated memory 0.6 MB
    Peak Large allocation bytes 0 B
    [ALLOC_CACHEOBJECTS] Dual Thread Allocator
    Peak main deferred allocation count 3278
    [ALLOC_BUCKET]
    Large Block size 32.0 MB
    Used Block count ***
    Peak Allocated bytes ***4.7 MB
    [ALLOC_CACHEOBJECTS_MAIN]
    Requested Block Size 4.0 MB
    Peak Block count ***4
    Peak Allocated memory ***3.5 MB
    Peak Large allocation bytes 76.*** MB
    [ALLOC_CACHEOBJECTS_THREAD]
    Requested Block Size 4.0 MB
    Peak Block count ***
    Peak Allocated memory ***.8 MB
    Peak Large allocation bytes 0 B
    [ALLOC_TYPETREE] Dual Thread Allocator
    Peak main deferred allocation count 3476
    [ALLOC_BUCKET]
    Large Block size 32.0 MB
    Used Block count ***
    Peak Allocated bytes ***4.7 MB
    [ALLOC_TYPETREE_MAIN]
    Requested Block Size 2.0 MB
    Peak Block count 8
    Peak Allocated memory ***2.8 MB
    Peak Large allocation bytes 0 B
    [ALLOC_TYPETREE_THREAD]
    Requested Block Size 2.0 MB
    Peak Block count ***
    Peak Allocated memory 36***.7 KB
    Peak Large allocation bytes 0 B
    [ALLOC_PROFILER]
    Requested Block Size ***6.0 MB
    Peak Block count ***
    Peak Allocated memory 0.5 MB
    Peak Large allocation bytes 0 B
    [ALLOC_PROFILER_BUCKET]
    Large Block size 32.0 MB
    Used Block count ***
    Peak Allocated bytes 7.6 KB
    [ALLOC_PROFILER_EDITOR]
    Requested Block Size ***.0 MB
    Peak Block count 0
    Peak Allocated memory 0 B
    Peak Large allocation bytes 0 B
    [ALLOC_PROFILER_BUCKET]
    Large Block size 32.0 MB
    Used Block count ***
    Peak Allocated bytes 7.6 KB
    ##utp:{"type":"MemoryLeaks","version":2,"phase":"Immediate","time":***68***9425***7857,"processId":6932,"allocatedMemory":420***807***,"memoryLabels":[{"Default":***775},{"Permanent":***5559},{"NewDelete":89784},{"Thread":4229292},{"Manager":***857***},{"VertexData":***2},{"Geometry":560},{"Texture":***76},{"Shader":***07238},{"Material":24},{"GfxDevice":57008},{"Animation":296},{"Audio":3928},{"Font":2***80***884},{"FontEngine":272},{"Physics":577},{"Serialization":756},{"Input":***4736},{"JobScheduler":240},{"Mono":40},{"ScriptingNativeRuntime":43784},{"BaseObject":***593***08},{"Resource":***064},{"Renderer":22***6},{"Transform":***6},{"File":***734***26},{"WebCam":96},{"Culling":40},{"Terrain":***37},{"Wind":24},{"STL":48},{"String":24477},{"DynamicArray":7***7***8},{"HashMap":7***232},{"Utility":273658},{"Curl":***424},{"PoolAlloc":***29872},{"AI":40},{"TypeTree":4565},{"ScriptManager":640},{"RuntimeInitializeOnLoadManager":80},{"SpriteAtlas":***28},{"GI":4008},{"Director":7960},{"CloudService":2528},{"WebRequest":688},{"VR":460***7},{"SceneManager":608},{"Video":72},{"LazyScriptCache":40},{"NativeArray":***2},{"Camera":25},{"Secure":***},{"Image":860***6},{"SerializationCache":***584},{"APIUpdating":***872},{"Subsystems":392},{"VirtualTexturing":57896},{"StaticSafetyDebugInfo":327680},{"EditorGui":56},{"EditorUtility":28792},{"VersionControl":4},{"Undo":704},{"AssetDatabase":***0978343},{"RestService":***4***4},{"EditorGi":376},{"License":3632},{"UnityConnect":25248},{"Collab":737},{"Upm":***06***6},{"DrivenProperties":96},{"LocalIPC":3***0},{"ProfilerEditor":***0943},{"CoreBusinessMetrics":3***00},{"AssetReference":40},{"IPCStream":40}]}
    ~StackAllocator(ALLOC_TEMP_MAIN) m_LastAlloc not NULL. Did you forget to call FreeAllStackAllocations()?
    Error: The operation was canceled.​
     
    Last edited: May 5, 2023