On 2015-10-08 15:20:11, SREZIC wrote:
Show quoted text> On 2015-10-08 14:40:48, yanick@babyl.dyndns.org wrote:
> > On 2015-10-08 02:04 PM, jt@plainblack.com via RT wrote:
> > > Thu Oct 08 14:04:08 2015: Request 107634 was acted upon.
> > > Transaction: Ticket created by jt@plainblack.com
> > > Queue: Parallel-ForkManager
> > > Subject: 1.15 runs at 100% CPU
> > > Broken in: (no value)
> > > Severity: (no value)
> > > Owner: Nobody
> > > Requestors: jt@plainblack.com
> > > Status: new
> > > Ticket <URL:
https://rt.cpan.org/Ticket/Display.html?id=107634 >
> > >
> > >
> > > Running on the latest CentOS Linux and Perl 5.16 the program I’ve
> > > linked below works perfectly on version 1.0.8 of
> > > Parallel::ForkManager, but on 1.15 it runs at 100% CPU. I haven’t
> > > tried the versions in-between.
> >
> > You might want to tweak your `$pm->set_waitpid_blocking_sleep(0);`
> >
> > See
https://metacpan.org/pod/Parallel::ForkManager#BLOCKING-CALLS for
> > more details.
>
> I'm not sure. Either it's set to 0, then it should block and don't
> consume CPU, or it is the default, that is 1 (second), and consume
> very little CPU. Only if somebody sets the sleep value to a very small
> number (maybe 0.001 or less) then there should be some effect on the
> CPU usage visible.
>
> Actually I can reproduce the 100% with the oneliner below with 1.15.
> Problem does not occur with 1.13:
>
> perl -MParallel::ForkManager -e '$pm=Parallel::ForkManager-
> >new(4);while(1) { $pm->start and next; warn "do something $$"; sleep
> 1; $pm->finish } $pm->wait_all_children'
Manual bisecting shows that the problem was introduced in commit 36578291403767a0afd5c2a598daf961a39a632c