Skip Menu |

This queue is for tickets about the Test-Compile CPAN distribution.

Report information
The Basics
Id: 73291
Status: resolved
Priority: 0/
Queue: Test-Compile

People
Owner: Nobody in particular
Requestors: MARKSTOS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.13
Fixed in: 0.13



Subject: When testing large collections of modules, can die due to memory exhaustion.
Test modules are currently not unloaded from memory. I tried to test over 2,000 modules on an Amazon Micro-instance and the process was eventually killed, presumably because it had exhausted the memory on the machine. Borrowing the patterns from "Class::Unload" could be used to unload a module from memory as soon as it has been tested. (At least the symbols are cleaned up, I'm not sure if Perl returns the memory or not). I attempted the patch myself, but ran into complications. There is this line: $module->use; However, I found that it was working when "$module" had a value of "perllib::JSON::XS". The challenge is this: given a file name that points a Perl module, how do you detect which parts of the path belong to the Perl name space, and which parts are merely part of the file system? So far, you don't have to care, because UNIVERSAL::require can load the module anyway. One option might be inspect %INC before and after the 'use' statement and see what changed, and then unload all the differences, but I didn't go that far.
I think this is fixed in version 0.15. The module now forks a child process to check the syntax of each file, which should stop the parent process from accumulating any extra memory.