[PATCH] Don't set child->requests to NULL in parent process after fork

Jeremy Allison jra at samba.org
Sun Jan 11 04:40:29 GMT 2009


On Sun, Jan 11, 2009 at 11:56:23AM +0800, boyang wrote:
> Ha, This is a hard problem... I think too many reasons can cause child
> dying. For a slow child, I can image one reason for it. Assume request
> arrived for the child every second, and child needs 2 seconds to process
> one request. The the request arrives in order have to wait 2*n + 1
> seconds. If 2*n + 1 > 300(the default time out value), child get killed
> because the parent times out the request and send SIGTERM to child.

But as you've already discovered, it's not that
easy :-). The queuing logic in the parent is
actually quite robust.

> Other reason might be panic in child itself.

Panics in the code really shouldn't happen, and
so we shouldn't waste much effort writing recovery
code from them.

What is more likely is disconnection from the
domain, or cases where the child gets stuck
waiting for a slow or missing response from the DC. These
are the cases we should ensure our recovery
code is robust.

Jeremy.


More information about the samba-technical mailing list