Skip Menu |

This queue is for tickets about the FCGI-ProcManager CPAN distribution.

Report information
The Basics
Id: 69946
Status: resolved
Priority: 0/
Queue: FCGI-ProcManager

People
Owner: Nobody in particular
Requestors: dark_neo [...] Safe-mail.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: start_delay parameter causes FCGI::ProcManager to hang (patch to solve included)
Date: Mon, 1 Aug 2011 16:20:06 -0400
To: bug-FCGI-ProcManager [...] rt.cpan.org
From: dark_neo [...] Safe-mail.net
Hi, Tried to use start_delay parameter for making FCGI::ProcManager ver. 0.19 to not restart dying children too often, like this: pm_manage(n_processes => 2, start_delay => 2, die_timeout => 30); and found that now it starts only one child and hangs. Looking at source revealed: for (my $s = $this->start_delay(); $s; $s = sleep $s) {}; This is perl, v5.10.1, and perldoc -f sleep says: sleep Causes the script to sleep for EXPR seconds, or forever if no EXPR. Returns the number of seconds actually slept. So obviously this is an infinite loop. Here is a patch to solve: --- ProcManager.pm~ 2011-08-02 03:04:09.000000000 +0000 +++ ProcManager.pm 2011-08-02 03:04:58.000000000 +0000 @@ -228,7 +228,7 @@ last MANAGING_LOOP; } - for (my $s = $this->start_delay(); $s; $s = sleep $s) {}; + for (my $s = $this->start_delay(); $s > 0; $s -= sleep $s) {}; } # this should block until the next server dies. Please fix...

Message body is not shown because sender requested not to inline it.

Subject: Re: [rt.cpan.org #69946] start_delay parameter causes FCGI::ProcManager to hang (patch to solve included)
Date: Mon, 01 Aug 2011 22:27:42 +0100
To: bug-FCGI-ProcManager [...] rt.cpan.org
From: Gareth Kirwan <gbjk [...] thermeon.com>
Thanks, received and appreciated. Will get a release out shortly, hopefully. On Mon, 2011-08-01 at 16:20 -0400, dark_neo via RT wrote: Show quoted text
> Mon Aug 01 16:20:21 2011: Request 69946 was acted upon. > Transaction: Ticket created by dark_neo@Safe-mail.net > Queue: FCGI-ProcManager > Subject: start_delay parameter causes FCGI::ProcManager to hang (patch to solve included) > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: dark_neo@Safe-mail.net > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=69946 > > > > Hi, > > Tried to use start_delay parameter for making FCGI::ProcManager ver. 0.19 to not restart dying children too often, like this: > > pm_manage(n_processes => 2, start_delay => 2, die_timeout => 30); > > and found that now it starts only one child and hangs. Looking at source revealed: > > for (my $s = $this->start_delay(); $s; $s = sleep $s) {}; > > This is perl, v5.10.1, and perldoc -f sleep says: > > sleep Causes the script to sleep for EXPR seconds, or forever if no > EXPR. Returns the number of seconds actually slept. > > So obviously this is an infinite loop. Here is a patch to solve: > > --- ProcManager.pm~ 2011-08-02 03:04:09.000000000 +0000 > +++ ProcManager.pm 2011-08-02 03:04:58.000000000 +0000 > @@ -228,7 +228,7 @@ > last MANAGING_LOOP; > } > > - for (my $s = $this->start_delay(); $s; $s = sleep $s) {}; > + for (my $s = $this->start_delay(); $s > 0; $s -= sleep $s) {}; > } > > # this should block until the next server dies. > > Please fix... > > differences between files attachment (ProcManager.pm.patch) > --- ProcManager.pm~ 2011-08-02 03:04:09.000000000 +0000 > +++ ProcManager.pm 2011-08-02 03:04:58.000000000 +0000 > @@ -228,7 +228,7 @@ > last MANAGING_LOOP; > } > > - for (my $s = $this->start_delay(); $s; $s = sleep $s) {}; > + for (my $s = $this->start_delay(); $s > 0; $s -= sleep $s) {}; > } > > # this should block until the next server dies.