in reply to Printing to STDERR causes deadlocks.

FWIW -- "This is perl, v5.8.1-RC3 built for darwin-thread-multi-2level":

After fixing the shebang line as needed, the results are mysterious.

It never seems to hang (after a dozen or so trials with and without TRACE=1). It seems to randomly alternate between two behaviors, regardless of TRACE value:

Since I'm not getting any deadlocks, I'm not sure I can answer your other questions.