Affected version
4.0.x
Bug description
MessageUtils uses a FastTerminal, which calls systemInstall in a background thread. I already found one race condition where uninstall was called before this background thread finishes. #11048
Unfortunately, there is another race in LookupInvoker. It also calls System.setOut and depending on the timing, this can happen before the FastTerminal background thread finishes. When that happens, you get a StackOverflowError on the next log message.