Description

A licensee is reporting that using a loading screen with the incremental garbage collector can result in a dead lock when a loading screen is displayed. The licensee found out that: 

--------------------

This deadlock occurs when the SlateLoadingThread's main loop attempts to acquire a FSlateRHIResourceManager's critical section which was already locked by FSlateRHIResourceManager::OnPreGarbageCollect() when it started incremental reachability analysis.

 

The critical section remains locked because the Game Thread ends up stuck in FSlateLoadingSynchronizationMechanism::DestroySlateThread() which requires SlateLoadingThread3 to progress and FSlateRHIResourceManager::OnPostGarbageCollect() can never be called since the game thread is spinning and unable to allow incremental GC to finish.

-------------------------

Steps to Reproduce

From the UDN case: 

DefaultEngine.ini:

[/Script/Engine.GarbageCollectionSettings]

gc.AllowIncrementalReachability=True

gc.AllowIncrementalGather=True

gc.IncrementalGatherTimeLimit=0.00125

gc.IncrementalReachabilityTimeLimit=0.00125

 

1) Run client and load initial map complex enough for reachability analysis to take several ms

2) Trigger travel to a different map

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-223522 in the post.

1
Login to Vote

Unresolved
ComponentUE - Foundation - Core
Target Fix5.6
CreatedSep 5, 2024
UpdatedSep 18, 2024
View Jira Issue