Loading is stuck, flush will never finish

Hey Danny, thanks again.

It’s only 1 of our cores that has a nullptr RequestedPackage entry, the rest of the cores all have valid entries. And the low requestid at 120 is specific to this core - each core has had a unique set of RequestIDs/RequestedPackages/AsyncPackageLookup/etc.

Some context that is the same across all of the cores: all but 1 RequestedPackage[i]::AsyncPackageLoadingState is set DeferredDelete and exactly 1 DependenciesReady. This 1 DependenciesReady package has AllDependenciesSetupState::WaitingForPackage and that WaitingForPackage is WaitingForIo. All of the FRunnableThreadPThread are in FPThreadEvent::Wait (this=…, WaitTime=4294967295,…), including FFileIoStore and FIoDispatcherImpl seemingly waiting for work. Here is that context from one instance:

`PendingRequests: .size=1 { [0] = 1439 }
RequestIdToPackageMap: .size=1 { [1439] = 0x7fbebf75a390 }

SyncLoadContext->RequestedPackages .size=15
SyncLoadContext->RequestedPackages[0 .. 13] … State: DeferredDelete
SyncLoadContext->RequestedPackages[14] [Content removed] State: DependenciesReady
AllDependenciesSetupState [Content removed] State: WaitingForIo

AsyncPackageLookup .size=9
AsyncPackageLookup[0] [Content removed] State: DependenciesReady

AsyncPackageLookup[5] [Content removed] and SerializationState.IoRequest.Impl != nullptr but looks like maybe partial garbage?

(all other AsyncPackageLookup::SerializationState.IoRequest.Impl == nullptr)

`(lldb) p ((FAsyncPackage2*)0x7fbebf753c40)->Desc
(FAsyncPackageDesc2) {
RequestID = -1
Priority = 2147483647
PackageFlags = PKG_None

UPackageId = (Id = 16699006371994741646)
}

(lldb) p ((FAsyncPackage2*)0x7fbebf753c40)->SerializationState.IoRequest.Impl:
(FIoRequestImpl) {
UE::FInheritedContextBase = (InheritedMetadataId = 330767)
NextRequest = 0x7fbedb22f4a0
BackendData = 0x000000000000
ChunkId = (Id = uint8[12] @ 0x61b084d23938)
Options = (RequestedOffset = 0, RequestedSize = 18446744073709551615, TargetVa = 0x000000000000, Flags = None)
Priority = 2147483647
Allocator = 0x7fbf1c423120
Backend = 0x7fbf3f3fc388
Batch = nullptr
Buffer = {
Value = (Storage = uint8[8] [Content removed] bIsSet = true)
}

RefCount = 480981616
ErrorCode = UE::Core::Private::Atomic::TAtomicBaseType_T = (Element = PendingFork | PendingEncryptionKey | 0x7fa0)
bCancelled = true
bFailed = false
}`Not sure if we can take the bCancelled (or any other values - RequestedSize=18446744073709551615 ) serious here, but this _feels_ like async loading has gotten out of sync and there’s no way to progress the expected state.

Please let me know if I can add any more context,

-blake