The function _pthread_mutex_init_calloc_cb is called from within malloc_spin_lock. This might hang if a thread in the same process space either terminated abnormally (leaving the mutex locked), or it might hang if allocated memory had been corrupted somehow. The last (less likely) possibility is that either FreeBSD or perl has a bug. How easy would it be to upgrade to an 8.x version of the OS to try it out?