Subject: | Using large hashes as arguments for threads creates Corrupted storable string (binary v2.6) at ../../lib/Storable.pm |
Thread::Pool 0.32
ActivePerl 5.8.2
Solaris 9
Error is:
Corrupted storable string (binary v2.6) at ../../lib/Storable.pm
(autosplit into ../../lib/auto/Storable/thaw.al) line 358
this occurs when passing many parameters and hashes to a job. Code is like this (simplified):
my $threadPool = threadPool($numThreads);
foreach my $printerid (sort keys %userByPrinter) {
my $jobid=$threadPool->job ( $user,\%dateByName1,\%archiveDateByName,\%nameByUser,\%userByPrinter,$printerid, $targetDir,$archiveTargetDir,$flag,\%dateByName2,\%dateByName3,\% dateByName4,$environment);
}
$threadPool->shutdown();
This works fine for up to about 15 threads and hashes with around 400 entries. Above 15 threads the above mentioned error appears. Limiting the number of threads to 15 seems to prevent the problem, but is obviously not the solution.
The error occurs only on some threads, i.e. from 18 threads, 14 run and 3 fail with the mentioned error.
Thanks a lot for your help
Heiko
grussbac@pt.lu