Deadlock during MiniDumpWriteDump when it tries to call RtlpReAllocateHeap - Critical section owned by PSOPrecompile pool thread

Hello!

We have started experiencing somewhat frequent deadlocks when a minidump is being generated in a Windows Development Client build. This occurs when an ensure is triggered while PSOs are being compiled in parallel. Specifically, we’ve been seeing the deadlock with this ensure during loading:

void FCoreRedirects::Initialize() { ensureMsgf(IsInGameThread(), TEXT("FCoreRedirects can only be initialized on the game thread."));I’ve attached a screenshot showing the PSO compilation thread that is locking the critical section and the thread attempting to write the minidump.

I went through the same investigations as mentioned in [Content removed] My understanding is that, as MiniDumpWriteDump suspends all threads when generating the minidump, if at that moment any thread holds the lock on the heap management critical section then MiniDumpWriteDump will deadlock if called in-process. Also, as mentioned in [Content removed] I’ve seen that Unreal already supports out-of-process minidump generation using USE_CRASH_REPORTER_MONITOR.

We have a few questions regarding all of this:

FCoreRedirects::Initialize ensure

This ensure has been occurring from time to time and we’re not sure what actions people are doing that trigger this.

  • Are there actions that are known to cause this that we should stop doing?
  • Are there things that we should be doing to prevent this?

USE_CRASH_REPORTER_MONITOR

  • Has Epic started enabling this for non-Editor builds (latest on git still has this enabled for Editor only)?
  • Are there still known issues with enabling this option? [Content removed] mentions issues with the pipe used for communication.

USE_CRASH_REPORTER_MONITOR and EAC

We are planning on using EAC as one of our anti cheat mechanisms.

  • Are there any integrations steps that we need to be aware of if we do decide to enable USE_CRASH_REPORTER_MONITOR?
  • From what we saw, EAC will allow the external crash process monitor for 30 seconds before ending it. Can you confirm if we need to configure anticheat_integritytool.cfg, specifically runtime_configuration -> crash_reporter_name = “CrashReportClient.exe”, with a different value?

Thanks!