Description

Handling SIGTERM can deadlock because RequestExit() can log stuff. If we happen to be in the malloc at that time of receiving the signal this is going to deadlock the process. In general, we should only use signal safe POSIX functions in handlers.

Steps to Reproduce

Not easy to reproduce but things to check for:

1) Start UE4
2) While its starting Ctrl+C in the terminal
3) Check that RequestExitWithStatus prints but is not part of a UE_LOG output
4) Wait until the end and check that RequestExitWithStatus prints in the UE_LOG with an exit code

Another test
1) Start UE4
2) While its starting Ctrl+C in the terminal 2-3 times
3) Observe that first RequestExitWithStatus prints then RequestExist prints which will not be part of the UE_LOG

Have Comments or More Details?

There's no existing public thread on this issue, so head over toAnswerHub just mention UE-36663 in the post.

0
Login to Vote

Unresolved
ComponentTools - Linux
Target Fix4.204.21
CreatedSep 30, 2016
ResolvedMay 14, 2018
UpdatedMay 18, 2018