Subject: | Critical Bug in Parallel::Fork::BossWorkerAsync |
Date: | Wed, 10 Aug 2011 12:17:36 +0530 |
To: | "bug-Parallel-Fork-BossWorkerAsync [...] rt.cpan.org" <bug-Parallel-Fork-BossWorkerAsync [...] rt.cpan.org> |
From: | Pramod Kumar Ravula <pramodr [...] juniper.net> |
HI ,
To achieve the parallel execution we used a Perl module "Parallel::Fork::BossWorkerAsync" In one of our application.
BUG in Parallel::Fork::BossWorkerAsync module:
If any of the worker process gets killed from worker process pool, boss process is also going down. In such case we have to restart all the worker processes again.
Boss process should not go down and Boss Process should create a new idle child worker processes to auto recover the killed child work process.
Please let me know if you need any more information.
Following test code I used to reproduce the problem.
#!/volume/perl/bin/perl
use Parallel::Fork::BossWorkerAsync;
my $bw = Parallel::Fork::BossWorkerAsync->new(
worker_count => 2,
work_handler => \&work,
);
$bw->add_work({a=>1 , b=>2});
$bw->add_work({a=>1 , b=>2});
while(1) {
print "server running !!";
sleep(10);
}
sub work {
my ($job)=@_;
while(1) {
print " i am in worker process $$ !!";
sleep(10);
}
}
Thanks & regards,
Pramod