When a DC goes down hard, winbind can end up in a 100% CPU loop. The next
(small) RPC request to the DC ends up as a trans2 request. If the connection
goes down, we end up trying to discard the request via the loop in
cli_state_notify_pending(). Because this is a trans2 request,
cli_smb_req_unset_pending will not kick in. Thus the pending array will always
remain at length 1.
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Oct 19 01:39:35 CEST 2011 on sn-devel-104
req = cli->conn.pending[0];
state = tevent_req_data(req, struct cli_smb_state);
+ if (NT_STATUS_EQUAL(status, NT_STATUS_PIPE_BROKEN)) {
+ /*
+ * We're dead. No point waiting for trans2
+ * replies.
+ */
+ state->mid = 0;
+ }
+
cli_smb_req_unset_pending(req);
/*