[prev in list] [next in list] [prev in thread] [next in thread] 

List:       osiris-devel
Subject:    [osiris-devel] Re: possible fix for osirismd defunct procs
From:       lemmings <osiris-devel () lemmin ! gs>
Date:       2007-01-09 5:48:20
Message-ID: 20070109054820.GD6366 () lemmin ! gs
[Download RAW message or body]

On Mon, Jan 08, 2007 at 11:09:56AM -0500, David Vasil wrote:
> 
> I've been running your patched version of the defunct osirismd fix for a
> week now and defunct processes are still created, but they are cleaned
> up after the next sigchld is received by the osirismd scheduling
> process.  Is this expected behavior?

Yes. As the signal check for needing to reap children is periodic
there will inevitably be zombies that will accumulate, however they
will all get reaped in time as you have seen. The number that are
outstanding at any one time shouldn't be very high and shouldn't cause
problems.

> It is better than the current 4.2.2 release since the defunct processes
> are cleaned up.  It just seems that it would be ideal if the defunct
> procs were never created.  Let me know your thoughts; I'm going to test
> the build on BSD/Fedora/and WinNT platforms.

I/O and signals are not fun to mix. To obtain rapid reaping of
children requires either:

1) Reap child in signal handler: No (interferes with detailed log
diagnostics).

2) Have event handling core of osirismd use non blocking I/O and
I/O multiplexing. Indicate child that needs to be reaped by writing a
byte to pipe in signal handler.

3) Have event handling core of osirismd use signal driven I/O and
appropriate use of sigsuspend/sigprocmask/etc.

Options 2 & 3 would require a significant change to osirismd...
thus leading to the current approximate (but simple) solution of use
an atomic flag and periodically poll for the status of the flag
before/after I/O. The approximate solution could be improved with
additional timeouts/checks if warranted.

e
_______________________________________________
osiris-devel mailing list
osiris-devel@lists.shmoo.com
https://lists.shmoo.com/mailman/listinfo/osiris-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic