https://bz.apache.org/bugzilla/show_bug.cgi?id=65316
--- Comment #6 from Stefan Bodewig <bode...@apache.org> --- When we started to support parallel execution of tasks Ant's Project instance started to associate executing tasks with threads - there is a ThreadLocal that knows the "current task". If something is sent to System.out/err Project redirects the output to the thread's task's handleOutput. In many cases the "current task" is an UnknownElement. There is a small window between the UnknownElement losing it's "realThing" and Project deregistering the task from the currrent thread (the later happens during the "taskFinished" event). I think we need to synchronize all parts of the code that reads or writes from realThing. An alternative could be to use a local copy or an AtomicReference instead, though. I'll have a look. -- You are receiving this mail because: You are the assignee for the bug.