Bug 13309 - Fix winbind child process exit bug
Fix winbind child process exit bug
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Winbind
All All
: P5 normal
: ---
Assigned To: Andreas Schneider
Samba QA Contact
Depends on:
  Show dependency treegraph
Reported: 2018-02-27 15:49 UTC by Andreas Schneider
Modified: 2018-02-27 15:49 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schneider 2018-02-27 15:49:10 UTC
Fix a bug when a child dies when a request is pending in the child. If the     signal handler fires before epoll finds out the other end of the parent-child     socket is closed, we close the socket on our side without taking care of the     pending request. This causes two problems: First, that one pending request     never is replied to properly, and secondly, we might end up with EPOLL_DEL on a     wrong file descriptor. This causes all sorts of trouble if we hit an active     one.
The fix for this problem is not to close the socket in winbind_child_died().    This however stops an idle child that dies hard from being properly cleaned up.     The fix for that is to add the child->monitor_fde that is set pending only when     no child request is active. This way we can remove the close(sock) in the     signal handler.