It appears to work fine without the join(). Running the program with Devel::Trace seems to indicate that it is segfaulting at:
>> /usr/lib/perl5/5.8.5/i586-linux-thread-multi/IO/Handle.pm:431:
+read($_[0], $_[1], $_[2], $_[3] || 0);
although of course that could be messed up by the threading. I'd suggest paring this down to an even smaller example that exhibits the same behaviour (I would imagine that the actual content of the XML and what the callback does have no bearing on the behaviour,) and submit a report via perlbug and also possibly to the author of
XML::Twig.
I do notice that you don't get the coredump if you change the safe_parsefile to:
my $fh;
open $fh,'xmlfile.xml' or die $!;
my $result = $statusTwig->safe_parse($fh);
close $fh;
But then it blocks which is probably not what is wanted either.
/J\