develooper Front page | perl.perl5.porters | Postings from November 2004

[perl #7112] Bug: Win32 fails after 6 forks.

From:
Steve Peters via RT
Date:
November 29, 2004 13:32
Subject:
[perl #7112] Bug: Win32 fails after 6 forks.
Message ID:
rt-3.0.11-7112-101253.8.30889467126561@perl.org
> [Joe.Smith@inwap.com - Wed Jun 13 05:18:03 2001]:
> 
> 
> -----------------------------------------------------------------
> [Please enter your report here]
> 
> In reference to a USENET posting.
> 
> 		Newsgroups: alt.perl
> 		Subject: Re: I can not fork at windows
> 		References: <992330594.302450@athnrd02.forthnet.gr>
> 
> $|= 1;
> for $var (1..3)
> {
> 
>  for (1..2)
>  {
>   if ( $pid=fork() )
>   {
>       print "Parent $$ created child $pid\n" ;
>   sleep 1;
>   waitpid($pid,0);
>   exit 0;
>     }
>     elsif ( ! defined $pid )
>     {
>       die "Can not go to multi thread mode\n"
>   }
>   else
>   {
>   print "Child $$ running\n";
>   }
>  }
>  print "\nThread team $var finished\n\n";
> }
> 
> print "Program $$ finished\n";
> 
> 
> When I run the program on Win98, I got this output and error alert:
> C:\TEMP>perl temp.pl
> Parent 412345 created child -326661
> Child -326661 running
> Parent -326661 created child -327257
> Child -327257 running
> 
> Thread team 1 finished
> 
> Parent -327257 created child -326241
> Child -326241 running
> Parent -326241 created child -325225
> Child -325225 running
> 
> Thread team 2 finished
> 
> Parent -325225 created child -324209
> Child -324209 running
> Child -298617 running
> 
> Thread team 3 finished
> 
> Parent -324209 created child -298617
> Program -298617 finished
> 
>   PERL caused an invalid page fault in
>   module PERL56.DLL at 0167:28073b9f.
>   Registers:
>   EAX=00000001 CS=0167 EIP=28073b9f EFLGS=00010202
>   EBX=02bc5420 SS=016f ESP=03cdfe54 EBP=03cdfe58
>   ECX=01663db0 DS=016f ESI=02bc5408 FS=6d97
>   EDX=81c433ec ES=016f EDI=02bc5480 GS=0000
>   Bytes at CS:EIP:
>   8b 50 fc 6a 01 59 84 d1 74 67 83 65 08 00 53 8b
>   Stack dump:
>   01663db0 03cdfea8 28074b46 00000001 2806fdfc 01662254 00000001
>   2800e9c5 00000001 02bc5420 02bcf020 000000ff 280581f2 02bcf020
>   02bc5420 02bcf020
> 
> 

I was able to replicate the failure with ActiveState Perl 5.8.4 Build
810 on Windows XP.  Although I didn't get the nice failure above, it did
complain loudly in a popup about writing to a null pointer.






nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About