Tue Aug 09 06:52:49 2011: Request 69848 was acted upon.
Transaction: Correspondence added by RSCHUPP
       Queue: PAR-Packer
     Subject: pp created exe  crash if useing parallel loops
   Broken in: (no value)
    Severity: (no value)
       Owner: Nobody
  Requestors: frank.w...@validusresearch.com
      Status: open
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=69848 >


On 2011-08-03 02:38:43, RSCHUPP wrote:
> piece of the PAR::Packer machinery needs consideration and
> extensive testing for which I don't have time ATM.

Just as a reminder to myself...
Things done to narrow down the problem - but still no solution:

- reduced the span of the BEGIN block in script/par.pl
- verified that the packed script is NOT executed from "inside"
  BEGIN or eval() any more
- set PL_perl_destruct_level=1 in myldr/main.c for perl_construct()
  and perl_destruct() call (but to no avail)
- problem occurs definitely AFTER the end of normal execution
  (but still in perl_run())
- using Devel::Symdump we see that the only END blocks registered
  are in File::Temp, PAR and par.pl 
- by instrumenting these END blocks we see that the problem 
  occurs AFTER they have been run
- the problem is not specific to Parallel::Loops or
  Parallel::ForkManager, the following script shows the same
  symptoms (with or without the wait()ing at the end)

use strict;
use warnings;
for (1..5)
{
    my $pid = fork();
    die "fork failed: $!" unless defined $pid;

    if ($pid == 0)
    {
        # child
        print STDERR "child $$\n";
        exit(0);
    }
}
print STDERR "waiting for children ...\n";
while ((my $pid = wait()) != -1)
{
    print STDERR "reaped $pid\n";
}

Reply via email to