Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Parallel-ForkManager CPAN distribution.

Report information
The Basics
Id: 105748
Status: resolved
Priority: 0/
Queue: Parallel-ForkManager

People
Owner: Nobody in particular
Requestors: zefram [...] fysh.org
Cc:
AdminCc:

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



Subject: hang from waitpid conflict
Date: Wed, 8 Jul 2015 16:00:59 +0100
To: bug-Parallel-ForkManager [...] rt.cpan.org
From: Zefram <zefram [...] fysh.org>
The waitpid-conflict test fails, with a hang, one time in every four that it's run. This happens because of a bug in the internal wait_one_child abstraction. P:FM waits for each child individually in turn, and will return from wait_one_child when it has successfully reaped a managed child. If a child turns out to have been reaped externally, it is dropped from the managed set immediately, and is not returned as a successfully-reaped managed process. So after that the process of waiting for a managed child to terminate must continue. If the externally-reaped child happens to be the last one left, it will drop out of the managed set, and then there are no managed children left that could be returned from wait_one_child, so that call can't return. Instead there's an infinite wait for the waiting on no processes to return a reaped process. Attached patch fixes, by making wait_one_child return -1 (indicating error) if there are no managed children left without one having been successfully reaped. -zefram

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

Subject: Re: [rt.cpan.org #105748] hang from waitpid conflict
Date: Wed, 08 Jul 2015 17:38:40 -0400
To: bug-Parallel-ForkManager [...] rt.cpan.org
From: Yanick Champoux <yanick [...] babyl.dyndns.org>
Patched, thanks!