The Samba-Bugzilla – Bug 3464
RPC shutdown PDUs not handled
Last modified: 2010-09-08 05:30:50 UTC
The Samba 3 client library does not handle RPC shutdown PDUs.
It turns out that neither Windows or Samba servers send these, but RPC servers built upon the OSF runtime will send up to two shutdowns, each after a client has been idle for ten seconds. Apparently this value is "specified in Appendix A of the NCA connection architecture spec", so it's not necessarily implementation-specific (even though it might look that way).
Also, shutdown PDUs can be coalesced with an RPC response into the same SMB PDU, which appears to cause the first check in cli_pipe_validate_current_pdu() to fail. When this check is disabled, RPC_SHUTDOWN is processed as an unknown packet; the client really needs to get an error code that would cause it to retry the request (if this is not done by the RPC runtime itself).
As a workaround, we have disabled shutdowns in our version of the OSF code, and now disconnect idle clients after 45 minutes instead of 10 seconds (any suggestions on a better value for this appreciated). Samba domain members now appear to work fine, although it's possible there will be a transient error when the idle time limit is reached.