[PATCH] winbindd: disconnect child process if request is cancelled at main process

Uri Simchoni urisimchoni at gmail.com
Tue Jun 23 15:03:40 MDT 2015


This patch fixes what seems to be breakage of line protocol between
the main winbindd process and one of its child processes, if a request
that is right now being served at the child process, is cancelled
(deleted) at the main process. The current code seems to nicely clean
all related objects and leave nothing dangling behind, except there's
an unanswered request in the pipe between the parent and the child,
and so the next request will read something that's not the response to
its request.

The fix is to close the connection and fork a new child. A different
possible fix would be to detach the request and let it finish, without
processing the result. The advantage of opening a new connection is
"getting back to business" instead of continue waiting. The
disadvantage is possibly creating more and more winbindd child
processes. Perhaps this should be accompanied by actively killing the
child process (at least sending SIGTERM once) and not letting it exit
when it fails to write its response.

The patch is related to the rework I'm doing to the patch that
controls number of fds, although technically it is not part of this
rework as it is a bug fix and needed in both the old patch of
stopping/resuming accept and the new patch I'm working on.

Thanks,
Uri.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cancel-child.patch
Type: application/octet-stream
Size: 3705 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20150624/78b8cf85/attachment.obj>


More information about the samba-technical mailing list