See strace/truss. It's a runtime call monitor for Perl, to find out where the problem is.
failed to fetch initial working directory
Is this the exact error message you get? I have a feeling that it's an issue with threading (you didn't mention in your post you use threads). Maybe you should post more code so we can take a look at it.
In reply to Re^3: rmtree() is failing after some time
by dHarry
in thread rmtree() is failing after some time
by KristinaBurden
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |