* Disabled custom signal handler in UbaHost in case this is the reason we get crashes in ubt
* Changed some logging from Info to Detail
[CL 31742437 by henrik karlsson in ue5-main branch]
* Added more description when failing to drop cas db entry
* Added cas entry lock around code that copy or link file out
* Added more fixes for things reported by tsan/asan
[CL 31708309 by henrik karlsson in ue5-main branch]
* Fixed read-after-free bug found by TSAN in StorageServer.cpp
* Fixed write-after-free bug found in UbaProcess.cpp (m_cancelEvent.Set() could be called after memory was freed)
* Lots of minor fixes found using TSAN. Most are harmless but still nice to cleanup
* Disabled mimalloc for linux again.. seems like tsan does not like it so maybe there are bugs in it
[CL 31676014 by henrik karlsson in ue5-main branch]
* Changed so ClientSession struct is allocated using aligned_alloc instead of new.. we can't figure out why this is failing with new on the farm and noone can repro so this is a very nasty workaround until we do understand how it can go wrong.
* Fixed potential race condition in scheduler
* Reduced lock scope in StorageClient to remove chance of deadlock
* Enabled mimalloc on linux
[CL 31660233 by henrik karlsson in ue5-main branch]
* Removed force drop of cas file for remote log file since it caused problems if two log files were the same
[CL 31607371 by henrik karlsson in ue5-main branch]
* Added code to handling uba::ReadFile trying to read file with less bytes than requested. It will try for 3 seconds and then fail with a message saying it read 0 bytes for 3 seconds
* Added more information to error messages
[CL 31461069 by henrik karlsson in ue5-main branch]
* Added support for most features in UbaScheduler. Dependencies, weights etc etc.
* Added support for loading yaml file with processes for UbaScheduler.
* Added so UbaCli interprets yaml file as a file with processes use it to populate a scheduler which is then executed
* Fixed so all threads inside same process spawned by uba ends up in the same thread group.
* Fixed linux crash where process comunication memory was deleted when cancel event was called (added lock around code)
* Fixed deadlock that could happen if flush dead processes were called at the after lock but before processhandle dtor in Session::ProcessExited
* Changed new[]/delete[] to aligned_alloc/free because for some reason new/delete trigger asan on linux and don't know why.
[CL 31372220 by henrik karlsson in ue5-main branch]
* Added support for custom text in trace/visualizer... can be used to report things like horde status etc
[CL 31118070 by henrik karlsson in ue5-main branch]
* Fixed so imagehlp.dll and dbghelp.dll are detoured when loaded. Detour ImageGetDigestStream and SymLoadModuleExW because both of them cause trouble on wine
* Fixed so reuse of processes also honor log files so a new log file is created when reuse happen
* Improved log file naming so host can set name and log files are sent back properly with the right name
[CL 30638193 by henrik karlsson in ue5-main branch]
* Added GetNextProcess as a real message type (not using Custom) to be able to stop fetching work if helper is being terminated by aws or if we want to scale down number of workers
* Did some cleanup in the Tcp backend code and made sure not to call close socket multiple times (since it can cause the code to close a different socket than what is owned)
[CL 30584707 by henrik karlsson in ue5-main branch]
* Added ProcessStartInfo::writeOutputFilesOnFail that can be set to true if we want the output files to be written/sent back even though process exited with errors
* Changed so session client use ProcessStartInfoHolder and moved serialization code to that class
[CL 30576299 by henrik karlsson in ue5-main branch]
* Added RegisterDeleteFile to external api that should be used when file is deleted outside of uba but uba needs to know about it
* Reduced lock scope around FlushDeadProcesses
* Fixed disconnect issue crash in ubaagent that could cause access violation in UbaStorage. Fix was to cleanup when leaving StorageClient::SendAllSegments
* Changed so UbaRequestNextProcess is doing a full environment update (not resetting stats) if no next process is found
* Fixed so Scheduler enableProcessReuse=false works properly
* Improved some assert descriptions
* Fixed so files in m_outputFiles in session client is erased when flushed to server
* Fixed so Rpc_GetFullName cleans up .. in paths
* Fixed so files that existed but has been deleted by external process is seen as not existing by remote detoured process.
[CL 30507663 by henrik karlsson in ue5-main branch]
* Fixed so paths returned from SearchPathForFile are cleaned up (not having .. etc)
* Fixed so UbaAgent handle WSAPoll POLLERR as timeout so it retries when failing (this made the process exit on wine)
* Fixed so returned processes that had been reused returned the reused process to the scheduler
* Fixed so EnsureBinaryFile is using correct fileNameKeys
* Removed assert in detoured GetFullPathNameA since it is always calling GetFullPathNameW
[CL 30465533 by henrik karlsson in ue5-main branch]
* Implemented process reuse logic in UbaScheduler. It is now possible for running processes to fetch more work
* Fixed bugs in custom message path
* Fixed bugs in FlushWrittenFiles message
* Changed So UpdateEnvironment is resetting stats
* Fixed potential race condition related to process reuse
* Added special rule for ShaderCompileWorker.exe which detours ImageGetDigestStream in Imagehlp.dll (because wine implementation does not match windows implementation)
* Renamed "exitedUserData" to just userData since it is used for more than when exiting process
* Added a couple more dlls to "known system dlls"
* Fixed so visualizer can visualize process reuse properly
[CL 30462059 by henrik karlsson in ue5-main branch]
* Added Scheduler class that is a very simple scheduler that handles processes that has no intra dependencies. It handles scheduling remotely and also reschedule processes returned from remote machines.
* Changed so application dependencies are retrieved in parallel by clients
* Added so custom assert handler can be set from the outside
* Added traceEnabled to SessionCreateInfo so trace shared mem can be created without needing to launch visualizer or write to file
* Added so userData can be provided in RemoteProcessAvailable and RemoteProcessReturned callbacks
* Added more files to known system files (based on what exists in wine)
* Improved FindImports code and made it available in export. (it is now automatically filtering out known system files)
* Moved ProcessHandle to its own file
* Added ProcessStartInfoHolder which is a class that can wrap a ProcessStartInfo and make sure all strings are allocated
[CL 30437951 by henrik karlsson in ue5-main branch]
* Fixed a bug where uba failed to download dlls to remote if it was in the system32 folder but did not exist on the remote machine's system32 and was not part of known system modules. (this solves the problem with ShaderCompilerWorker not downloading opengl32.dll to barebone machines)
* Fixed bug where relative path of dll was sent into RetriveCasFile which in turn failed because it couldn't find the file
* Fixed so code could handle loading libraries with circular dependencies
* Removed assert for now related to GetThreadPreferredUILanguages and asking for language name instead of id for remote machines)
[CL 30407004 by henrik karlsson in ue5-main branch]
* Implemented knownInputs support. It is now fully supported to provide known inputs when doing RunProcessRemote. This is optional and can be a nice speedup if latency to helpers is high since it reduce number of messages going back and forth.
* Changed so GetMemoryMapAlignment is checking only file name and no flags. Flags is now handled on the outside. This made it possible to send over map alignment for files without having to send the file names
* Renamed WorkManagerImpl::Wait to WorkManagerImpl::FlushWork
* Renamed willBeUsedUnCompressed to storeUncompressed
* Added ScopedCriticalSection::Enter
[CL 30388720 by henrik karlsson in ue5-main branch]
* Added stub for providing known inputs to RunProcessRemote
* Added stub for RunProcessRacing that can be used to have local machine race against remotely scheduled tasks.
* Added documentation
[CL 30367843 by henrik karlsson in ue5-main branch]
* Reduced stack usage in client session by reusing 256kb stack binary reader
* Changed so update dir table and hash table messages are not sent if client is already enough up to date
* Fixed race condition writing dir table memory size. This has been in here forever and maybe can't happen in practice.. but wrong lock was taken when updating table memory size (different than what GetDirectoryTableSize was using)
[CL 30358736 by henrik karlsson in ue5-main branch]
* Removed usage of "select" in tcp socket connect code because it can't handle file descriptors over 1024 so segfaults (phew, hard one to find)
* Added option to have clients send back log to server (SessionServerCreateInfo.remoteLogEnabled) .. this forced a network protocol bump
* Improved asserts for when network messages are corrupt
* Some small fixes of asserts in debug in win32 detoured code
[CL 30343891 by henrik karlsson in ue5-main branch]
* Implemented RunProcess which can be used to spawn and wait on raw processes (not detoured). (Note, calling program needs to report file system modifications since it is not known to UBA)
* Changed so UBAExecutor is using UBA for non-detoured processes as well. This will give correct profiling tracking and reuse existing code.
* Fixed handle leak in windows
* Fixed race condition on linux since wordexp() is n ot thread safe
* Added tests
* New binaries
[CL 30216046 by henrik karlsson in ue5-main branch]
* Fixed race condition where process could be returned and then picked up before the callback in process return message is invoked.
[CL 30167049 by henrik karlsson in ue5-main branch]