OS: FreeBSD 14.2-RELEASE-p1
Perl version: 5.40
After upgrading perl from 5.36 to 5.40 we started seeing these warnings in logs:
2025-05-30T09:43:10Z [83137] [WARNING] [main] DBI dr handle 0x2b8f6f9bb900 cleared whilst still active during global destruction.
We found Perl/perl5#23306 (comment) and applied to our in-house perl code which seems to stop the warnings from appearing. It looks like a race condition in cleanup, during testing we sometimes got the warning, sometimes not. After applying the fix the warnings stop.