perl 5.8 hang on aix

oneiron on 2005-06-12T04:44:30

One of our customers had two "identical" aix boxes. On one of these, perl 5.8.6 worked fine; on the other (with identical binary perl build) running perl -v hung. Apparently, google did not help, and they then spent hours trying to trouble-shoot this problem, without success.



In desperation, they asked me for advice. I did a quick google and also came up dry. I then suggested they run perl -v via the aix truss command, which showed perl was hanging on an open of /dev/urandom. After fixing the offending /dev/urandom device, all was well. A happy ending.



The main reason I'm writing this journal entry is in the hope it will be indexed by a google robot and so be of use to someone who suffers this problem in the future. If perl 5.8 is hanging, run it with truss (or equivalent tool) to see where. And be suspicious of /dev/urandom or /dev/random. I guess this open of /dev/urandom was added in support of the new hash randomisation feature of perl 5.8 (designed to thwart denial of service attacks).