Hello,
Context:
The build machines are running windows 11, which are all connected to a samba share that is ran on a linux machine in house. Our other unreal projects are not currently giving us this error. Each project has it’s own network share drive on the same linux box.
In our build farm we have machines that are giving us the following warning when writing to our DDC (network samba share).
Here is the warning:
LogDerivedDataCache: Warning: //DDCURL/gameDDC: Failed to write to temp file //DDCURL/gameDDC/Buckets/BulkDataList/af/e9/Temp.3dd4e685-49fc-3311-f213-7f968afe4e7f when saving //DDCURL/gameDDC/Buckets/BulkDataList/af/e9/28390a248e6350ccb9f8153aa2317df60fec.udd from '/Game/Path/To/Asset/MyAsset'. Error 0x00000000. File is 398 bytes when 355 bytes are expected.
Another example of this error would is Error 0x00000000. File is -1 bytes when 394 bytes are expected.
After looking at the code, it appears it will return -1 when the temp file does not exist (DDC file that is prefixed with “Temp.”)
bool FFileSystemCacheStore::SaveFile(
FStringBuilderBase& Path,
const FStringView DebugName,
const TFunctionRef<void (FArchive&)> WriteFunction,
const bool bReplaceExisting) const
{
const double StartTime = FPlatformTime::Seconds();
TStringBuilder<256> TempPath;
TempPath << FPathViews::GetPath(Path) << TEXT("/Temp.") << FGuid::NewGuid();
TUniquePtr<FArchive> Ar = OpenFileWrite(TempPath, DebugName);
if (!Ar)
{
UE_LOG(LogDerivedDataCache, Warning,
TEXT("%s: Failed to open temp file %s for writing when saving %s from '%.*s'. Error 0x%08x."),
*CachePath, *TempPath, *Path, DebugName.Len(), DebugName.GetData(), FPlatformMisc::GetLastError());
return false;
}
WriteFunction(*Ar);
const int64 WriteSize = Ar->Tell();
if (!Ar->Close() || WriteSize == 0 || WriteSize != IFileManager::Get().FileSize(*TempPath))
{
UE_LOG(LogDerivedDataCache, Warning,
TEXT("%s: Failed to write to temp file %s when saving %s from '%.*s'. Error 0x%08x. "
"File is %" INT64_FMT " bytes when %" INT64_FMT " bytes are expected."),
*CachePath, *TempPath, *Path, DebugName.Len(), DebugName.GetData(), FPlatformMisc::GetLastError(),
IFileManager::Get().FileSize(*TempPath), WriteSize);
IFileManager::Get().Delete(*TempPath, /*bRequireExists*/ false, /*bEvenReadOnly*/ false, /*bQuiet*/ true);
return false;
}
Would anyone know why all of a sudden this seems to pop up for us? Or has anyone seen a similar issue before? I know we can probably wipe the DDC and have it get rebuilt but we would prefer not to do that at the moment.