org.apache.catalina.core.ContainerBase.threadDone should be volatile, because it is accessed across threads.
Fixed in trunk.