Crashes in UbaAgent (UnrealBuildAccelerator)

Hi - we’re encountering sporadic crashes in UnrealBuildAccelerator, but only when compiling Shipping builds.

I’ve confirmed we’re using the recommended toolchain for the engine version (MSVC 14.38.33130). The crash occurs mostly on our build machines, but that’s largely due to the fact that most of our Shipping builds on performed on those machines.

The crash occurs UbaAgent. This information is from a dmp file, so I don’t have full details available. Can you please confirm if there are known stability issues with UnrealBuildAccelerator in 5.5.4, in these areas of the code, and any fixes that may be available? I’ll check //UE5/Main to see if anything jumps out.

WARNING: Unable to enumerate some of the managed modules from this dump. Only part of a ReadProcessMemory or WriteProcessMemory request was completed.

Unhandled exception at 0x00007FFE346ED071 (UbaHost.dll) in dotnet.exe.700.dmp: 0xC0000005: Access violation reading location 0x000002DFABDA43E0.

UbaHost.dll!memcpy() Line 305 Unknown

> UbaHost.dll!uba::MapMemoryCopy(void * dest, const void * source, unsigned __int64 size) Line 305 C++

UbaHost.dll!uba::Session::WriteFilesToDisk::__l2::<lambda_1>::operator()(uba::WrittenFile & file) Line 2243 C++

UbaHost.dll!uba::Session::WriteFilesToDisk(uba::ProcessImpl & process, uba::WrittenFile * * files, unsigned int fileCount) Line 2314 C++

UbaHost.dll!uba::ProcessImpl::WriteFilesToDisk() Line 1371 C++

UbaHost.dll!uba::ProcessImpl::HandleExit(uba::BinaryReader & reader, uba::BinaryWriter & writer) Line 1178 C++

UbaHost.dll!uba::ProcessImpl::HandleMessage(uba::BinaryReader & reader, uba::BinaryWriter & writer) Line 674 C++

UbaHost.dll!uba::ProcessImpl::ThreadRun(bool runningRemote, void * environment) Line 477 C++

[External Code]

[Attachment Removed]

Steps to Reproduce
* Build Shipping configuration for any platform

Occurs sporadically.

[Attachment Removed]

In //UE5/Main it looks there have been a few rewrites to this logic, so there’s no obvious bugfix to cherry-pick. I’ll keep investigating, but any info or fixes are appreciated.

In the meantime I’m running some tests with useFileMapForWrite disabled.

[Attachment Removed]

Hi,

We usually recommend getting the binaries from UE5/Main and replace the ones from the release you are using. We constantly fix issues in UBA, so I don’t know if you keep picking up all changes and rebuilding, but picking up the latest binaries would be the first thing to try. If that doesn’t fix the issue, then we will investigate.

Regards,

Patrick

[Attachment Removed]

Hi,

They are few tools that are backward compatible and will operate across versions. I use the latest UGS for all my UE versions, I usually use the latest UnrealInsights.exe with my older engine traces. For UBA, UGS and UnrealInsights, I’m sure they work because I use them. We surely have others that I use less frequently and we have a couple of standalone ‘Programs’ that should work too.

Let me know if the latest UBA binaries works in your case.

Regards,

Patrick

[Attachment Removed]

Hi,

That’s good to hear! Let us know if you encounter further problems.

Regards,

Patrick

[Attachment Removed]

Interesting, that’s good to know. In general, we treat the codebase as relatively monolithic and (potentially) version-tied to itself. I wouldn’t normally assume to mix new binaries w/ arbitrary versions of the engine, so this is helpful.

Are there any other core tools in the ecosystem you’d suggest treating the same way? i.e. not building from code snapshot, but rather pulling latest prebuilt binaries directly from source control?

[Attachment Removed]

Thanks for the info. I just pulled UBA binaries directly from //UE5/Main (perforce). Will test and report back.

[Attachment Removed]

Building uba binaries from 5.5.4 source still encountered some instability but pulling binaries straight form //UE5/Main has been stable so far, thanks!

[Attachment Removed]