On Fri, 2006-10-13 at 09:02 +0200, Paul J Stevens wrote:
> Steve,
> 
> Dbmail doesn't need more segments than processes running. The fact that
> we're sometimes seeing this behaviour indicates a bug in dbmail.

>From man shmget:
       exit() Upon exit() all attached shared memory segments are
       detached (not destroyed).
                 ^^^^^^^^^^^^^

Destruction of shared memory segments happens with shmctl(, IPC_RMID, )
which appears only in scoreboard_delete.

scoreboard_delete is only called from server.c / StartServer, which is
the "middle-level" process. So my guess, then, is that the middle
process is dying and leaving shared memory segments laying around?

A quick test by killing the middle process does not confirm this.
Instead, the middle process died, the parent process exited, and a child
process was left all by itself serving connections.

That ain't good, either!

Aaron

Reply via email to