Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Children aren't being reaped

by taint (Chaplain)
on Jun 04, 2014 at 23:43 UTC ( [id://1088753]=note: print w/replies, xml ) Need Help??


in reply to Children aren't being reaped

OK. I had to install Parallel::ForkManager to run your script.

Do note, for reference, this is on a BSD box / 3cores @3.2Ghz & 128Mb ram
this is output from 4 passes of the script:

PASS_1 ############################################## ---1--- There are currently 1 child processes Parent here with child 19752 ---2--- 1.08652903919403 $VAR1 = '19752'; $VAR2 = 1; There are currently 2 child processes Parent here with child 19753 ---3--- $VAR1 = '19752'; $VAR2 = 1; $VAR3 = '19753'; $VAR4 = 1; There are currently 3 child processes Parent here with child 19754 ---4--- 29.9177767800849 $VAR1 = '19752'; $VAR2 = 1; $VAR3 = '19754'; $VAR4 = 1; $VAR5 = '19753'; $VAR6 = 1; There are currently 4 child processes Parent here with child 19755 ---5--- 20.8902671140369 deleted 19752 SIG{CHLD}: PID 19752 , reaped $VAR1 = '19752'; $VAR2 = 1; $VAR3 = '19754'; $VAR4 = 1; $VAR5 = '19755'; $VAR6 = 1; $VAR7 = '19753'; $VAR8 = 1; 22.0297099811706 There are currently 4 child processes Parent here with child 19756 ---6--- $VAR1 = '19756'; $VAR2 = 1; $VAR3 = '19754'; $VAR4 = 1; $VAR5 = '19755'; $VAR6 = 1; $VAR7 = '19753'; $VAR8 = 1; There are currently 5 child processes Parent here with child 19757 ---7--- $VAR1 = '19756'; $VAR2 = 1; $VAR3 = '19754'; $VAR4 = 1; $VAR5 = '19757'; $VAR6 = 1; $VAR7 = '19755'; $VAR8 = 1; $VAR9 = '19753'; $VAR10 = 1; There are currently 6 child processes Parent here with child 19758 ---8--- deleted 19755 SIG{CHLD}: PID 19755 , reaped deleted 19754 SIG{CHLD}: PID 19754 , reaped $VAR1 = '19756'; $VAR2 = 1; $VAR3 = '19754'; $VAR4 = 1; $VAR5 = '19757'; $VAR6 = 1; $VAR7 = '19755'; $VAR8 = 1; $VAR9 = '19753'; $VAR10 = 1; $VAR11 = '19758'; $VAR12 = 1; 21.8205172218132 There are currently 5 child processes Parent here with child 19759 ---9--- $VAR1 = '19759'; $VAR2 = 1; $VAR3 = '19756'; $VAR4 = 1; $VAR5 = '19757'; $VAR6 = 1; $VAR7 = '19753'; $VAR8 = 1; $VAR9 = '19758'; $VAR10 = 1; There are currently 6 child processes Parent here with child 19760 ---10--- deleted 19753 SIG{CHLD}: PID 19753 , reaped 11.9239235481929 $VAR1 = '19759'; $VAR2 = 1; $VAR3 = '19756'; $VAR4 = 1; $VAR5 = '19757'; $VAR6 = 1; $VAR7 = '19753'; $VAR8 = 1; $VAR9 = '19760'; $VAR10 = 1; $VAR11 = '19758'; $VAR12 = 1; There are currently 6 child processes Parent here with child 19761 deleted 19757 SIG{CHLD}: PID 19757 , reaped 25.2174839632336 20.2505783060316 14.2380751691509 22.0961115997035 PASS_2 ############################################## ---1--- There are currently 1 child processes Parent here with child 19839 ---2--- 5.81327571521808 $VAR1 = '19839'; $VAR2 = 1; There are currently 2 child processes Parent here with child 19840 ---3--- 26.8340911994438 $VAR1 = '19839'; $VAR2 = 1; $VAR3 = '19840'; $VAR4 = 1; There are currently 3 child processes Parent here with child 19841 ---4--- $VAR1 = '19839'; $VAR2 = 1; $VAR3 = '19840'; $VAR4 = 1; $VAR5 = '19841'; $VAR6 = 1; There are currently 4 child processes Parent here with child 19842 ---5--- deleted 19839 SIG{CHLD}: PID 19839 , reaped 29.3751962109219 $VAR1 = '19842'; $VAR2 = 1; $VAR3 = '19839'; $VAR4 = 1; $VAR5 = '19840'; $VAR6 = 1; $VAR7 = '19841'; $VAR8 = 1; There are currently 4 child processes deleted 19840 SIG{CHLD}: PID 19840 , reaped Parent here with child 19843 ---6--- 16.5706555218186 $VAR1 = '19842'; $VAR2 = 1; $VAR3 = '19843'; $VAR4 = 1; $VAR5 = '19841'; $VAR6 = 1; There are currently 4 child processes Parent here with child 19844 ---7--- $VAR1 = '19842'; $VAR2 = 1; $VAR3 = '19844'; $VAR4 = 1; $VAR5 = '19843'; $VAR6 = 1; $VAR7 = '19841'; $VAR8 = 1; There are currently 5 child processes deleted 19842 SIG{CHLD}: PID 19842 , reaped Parent here with child 19845 ---8--- 28.2081559206109 $VAR1 = '19844'; $VAR2 = 1; $VAR3 = '19843'; $VAR4 = 1; $VAR5 = '19841'; $VAR6 = 1; $VAR7 = '19845'; $VAR8 = 1; There are currently 5 child processes deleted 19843 SIG{CHLD}: PID 19843 , reaped Parent here with child 19846 ---9--- 5.92891379247714 $VAR1 = '19844'; $VAR2 = 1; $VAR3 = '19846'; $VAR4 = 1; $VAR5 = '19841'; $VAR6 = 1; $VAR7 = '19845'; $VAR8 = 1; There are currently 5 child processes Parent here with child 19847 ---10--- $VAR1 = '19844'; $VAR2 = 1; $VAR3 = '19846'; $VAR4 = 1; $VAR5 = '19841'; $VAR6 = 1; $VAR7 = '19847'; $VAR8 = 1; $VAR9 = '19845'; $VAR10 = 1; There are currently 6 child processes Parent here with child 19848 deleted 19844 SIG{CHLD}: PID 19844 , reaped 16.388091998988 19.9064871132124 28.8538391165185 18.7242657503795 PASS_3 ############################################## ---1--- There are currently 1 child processes Parent here with child 19904 ---2--- 5.30967963614795 $VAR1 = '19904'; $VAR2 = 1; There are currently 2 child processes Parent here with child 19905 ---3--- $VAR1 = '19905'; $VAR2 = 1; $VAR3 = '19904'; $VAR4 = 1; There are currently 3 child processes Parent here with child 19906 ---4--- $VAR1 = '19905'; $VAR2 = 1; $VAR3 = '19904'; $VAR4 = 1; $VAR5 = '19906'; $VAR6 = 1; 14.0728420972574 There are currently 4 child processes Parent here with child 19907 ---5--- deleted 19904 SIG{CHLD}: PID 19904 , reaped 14.8346512041736 $VAR1 = '19905'; $VAR2 = 1; $VAR3 = '19904'; $VAR4 = 1; $VAR5 = '19906'; $VAR6 = 1; $VAR7 = '19907'; $VAR8 = 1; 19.2724771912891 deleted 19907 SIG{CHLD}: PID 19907 , reaped deleted 19905 SIG{CHLD}: PID 19905 , reaped There are currently 2 child processes Parent here with child 19908 ---6--- $VAR1 = '19908'; $VAR2 = 1; $VAR3 = '19906'; $VAR4 = 1; 7.44214059773196 deleted 19906 SIG{CHLD}: PID 19906 , reaped There are currently 2 child processes Parent here with child 19909 ---7--- $VAR1 = '19908'; $VAR2 = 1; $VAR3 = '19909'; $VAR4 = 1; There are currently 3 child processes Parent here with child 19910 ---8--- $VAR1 = '19908'; $VAR2 = 1; $VAR3 = '19909'; $VAR4 = 1; $VAR5 = '19910'; $VAR6 = 1; There are currently 4 child processes Parent here with child 19911 ---9--- $VAR1 = '19911'; $VAR2 = 1; $VAR3 = '19908'; $VAR4 = 1; $VAR5 = '19909'; $VAR6 = 1; $VAR7 = '19910'; $VAR8 = 1; There are currently 5 child processes deleted 19908 SIG{CHLD}: PID 19908 , reaped 0.143267137346008 Parent here with child 19912 ---10--- 7.10553884494413 $VAR1 = '19911'; $VAR2 = 1; $VAR3 = '19909'; $VAR4 = 1; $VAR5 = '19910'; $VAR6 = 1; $VAR7 = '19912'; $VAR8 = 1; There are currently 5 child processes Parent here with child 19913 17.9852389706049 8.36108772305135 11.8464185482572 PASS_4 ############################################## ---1--- There are currently 1 child processes Parent here with child 20024 ---2--- 29.0573237369518 $VAR1 = '20024'; $VAR2 = 1; There are currently 2 child processes Parent here with child 20025 ---3--- 6.16131757839877 $VAR1 = '20025'; $VAR2 = 1; $VAR3 = '20024'; $VAR4 = 1; There are currently 3 child processes Parent here with child 20026 ---4--- $VAR1 = '20026'; $VAR2 = 1; $VAR3 = '20025'; $VAR4 = 1; $VAR5 = '20024'; $VAR6 = 1; There are currently 4 child processes 25.3741171815183 deleted 20024 SIG{CHLD}: PID 20024 , reaped 17.9586660325277 Parent here with child 20027 deleted 20025 SIG{CHLD}: PID 20025 , reaped ---5--- $VAR1 = '20026'; $VAR2 = 1; $VAR3 = '20027'; $VAR4 = 1; There are currently 3 child processes Parent here with child 20028 ---6--- 29.3681498033676 deleted 20027 SIG{CHLD}: PID 20027 , reaped deleted 20026 SIG{CHLD}: PID 20026 , reaped
Immediately upon executing PASS_4, I received the following:
Bizarre copy of ARRAY in anonlist at /usr/local/lib/perl5/site_perl/5. +12/mach/Data/Dumper.pm line 590.
I'm still examining the output. But felt it worth posting, for others who can't/won't run it, to examine.

--Chris

¡λɐp ʇɑəɹ⅁ ɐ əʌɐɥ puɐ ʻꜱdləɥ ꜱᴉɥʇ ədoH

Replies are listed 'Best First'.
Re^2: Children aren't being reaped
by taint (Chaplain) on Jun 05, 2014 at 00:19 UTC

    Well. I haven't quite nailed it down. But something's bugging me about this section:

    foreach my $num (@Array){ print "---$num---\n"; print Dumper(%children); while (keys %children >= $max) { print "Haaaanging\n"; sleep 1; }
    Just thought I'd mention it.

    --Chris

    ¡λɐp ʇɑəɹ⅁ ɐ əʌɐɥ puɐ ʻꜱdləɥ ꜱᴉɥʇ ədoH

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1088753]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (2)
As of 2024-04-24 18:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found