oehme opened a new issue, #11498:
URL: https://github.com/apache/maven/issues/11498

   ### 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.
   
   Unfortunately, there is another race in 
[LookupInvoker](https://github.com/apache/maven/blob/5834e3899eed5c6a088a937a3c8d171d72d869f3/impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/LookupInvoker.java#L399).
 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.
   
   The LookupInvoker needs to wait until the background thread is ready. This 
probably means that the whole "FastTerminal"/background thread abstraction is a 
bad idea and should be removed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to