bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AIX and Interix also do early PID recycling.


From: Steven W. Orr
Subject: Re: AIX and Interix also do early PID recycling.
Date: Wed, 25 Jul 2012 08:31:17 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20

On 7/25/2012 8:14 AM, Greg Wooledge wrote:
On Wed, Jul 25, 2012 at 09:59:28AM +0200, Michael Haubenwallner wrote:
OTOH, AFAICT, as long as a PID isn't waitpid()ed for, it isn't reused by fork().
However, I'm unable to find that in the POSIX spec.

A process that hasn't been waited for should become a zombie, which
should be sufficient to prevent its PID being reused.  Are you saying
that AIX and Interix don't have zombies?

One small nit:

A process that hasn't been waited for should become a zombie *if* the parent dies *or* the parent has set SIGCHLD to SIG_IGN. If the parent persists and the children are not harvested then the children are in a defunct state.

I don't know what Internix is, but I once discovered an AIX system that had over 10,000 defunct processes. The people would detect a slowdown every few days and just reboot it. Turns out that a programmer had written a server that did not manage its slaves, so they all just sat there waiting to be waited for.

I went in and added a few lines of code to do the wait calls. It never needed a reboot since.

--
Time flies like the wind. Fruit flies like a banana. Stranger things have  .0.
happened but none stranger than this. Does your driver's license say Organ ..0
Donor?Black holes are where God divided by zero. Listen to me! We are all- 000
individuals! What if this weren't a hypothetical question?
steveo at syslang.net



reply via email to

[Prev in Thread] Current Thread [Next in Thread]