Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re^8: Best way to kill a child process

by flexvault (Monsignor)
on Oct 16, 2011 at 13:28 UTC ( #931784=note: print w/replies, xml ) Need Help??

in reply to Re^7: Best way to kill a child process
in thread Best way to kill a child process

Some points about this:

  • Problem happens in Debian, OpenSuse with perl5.10.1 and perl5.12.2
  • There are no grandchildren.
  • Does not seem to happen on single CPU, only multiple CPUs.
  • Use ratio of 4 children per CPU and parent only maintains that number
  • Children exit after 4 hours.
  • Usually takes 20-24 hours for problem to happen!

I'm sure it's a timing issue, but I haven't been able to duplicate the problem in testing. I think it hangs in $SIG{CHLD} since when I set the child $SIG{CHLD} to 'IGNORE', the problem goes away. It could be perl, linux or my program. If I find a way to duplicate it, I'll let you know. Regards.

Thank you

"Well done is better than well said." - Benjamin Franklin

Replies are listed 'Best First'.
Re^9: Best way to kill a child process
by Marshall (Abbot) on Oct 18, 2011 at 00:44 UTC
    Yes, if you find a way to duplicate this with a fairly simple program, I'd like to run it and see if I can replicate it also.

    I don't have a Linux machine myself, but I do have access to a 64 bit Linux, active-state 64 bit installation on a remote machine. I can hammer on this machine during the evenings and on the weekends.

    Setting $SIG{CHLD} = 'IGNORE' should cause the low level sigaction() structure to be set. Once that happens, Perl has nothing at all to do with this signal as Perl would never even see the signal. So if this causes a "reap" of the child, I can see why this doesn't cause a problem.

    Anyway, if you can make this happen more often than once every 24 hours, then I have a way to make a couple of runs on the weekend when the college's server is at a low usage level.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://931784]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (3)
As of 2018-03-20 02:42 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (247 votes). Check out past polls.