I wonder idly if Perl’s “copy-on-write” (COW) behavior could possibly be a factor here. Perl would copy data-structures related to RabbitMQ into each child, even though the children weren’t the threads that had actually initialized it. Therefore, if Rabbit has any sort of “destructor” subroutine, that destructor would see the initialized data-structures and of course try to clean it up. I can see that there could be trouble brewing in that case ... closing library handles multiple times, closing (library) resources that this thread never allocated, and so on. Even if Perl didn’t “double-free” anything, a library certainly could . . .
BrowserUK, you’ve had plenty of experience with both Perl threads and libraries. In your experience, does this Perl-specific COW behavior typically cause grief in cases like this one? (And, BTW, I mean that as a serious, face-value question, addressed to an expert in such things.)