>This is typically caused by an application or library retaining a reference to a request, response, InputStream, OutputStream etc. beyond the lifetime of the original request (Tomcat recycles these objects and you end up with two threads trying to use the same object).
from: https://bz.apache.org/bugzilla/show_bug.cgi?id=64859#c1
The code in question is checking if the MappingData has a host set.
https://github.com/apache/tomcat/blob/9.0.38/java/org/apache/catalina/mapper/Mapper.java#L739-L744
>Map the specified host name and URI, mutating the given mapping data
The method is supposed to populate that data in-place. If it's being reused as is the assertion from the bug entry then would make sense.
When things get into that messed up state, you might want to take some heap dumps and look through them for instances of MappingData objects and check to see what is referencing them. Perhaps you can spot something odd going on there, like one of your Controller's retaining references to one of the object Mark mentioned, or perhaps look at your controllers to see what they are retaining references to, again, with an eye for anything that might hold onto one of the objects mentioned.