More precisely for (2): the reception of a zero-sized UDP, when it races with a local [close], deadlocks one of TclUDP's internal threads. Unfortunately reverse-engineering that makes me shy; I'd prefer the author (or maintainer) to take over the analysis (or at least confirm it and give directions to look at the relevant parts).