[PATCH] rpc_client: retry open on STATUS_PIPE_NOT_AVAILABLE

David Disseldorp ddiss at suse.de
Tue Mar 4 07:44:29 MST 2014

Hi Metze,

On Tue, 04 Mar 2014 12:34:58 +0100, Stefan (metze) Metzmacher wrote:

> > Windows Server starts some named pipe services on demand, and responds
> > to initial open requests with STATUS_PIPE_NOT_AVAILABLE. The FssagentRpc
> > named pipe on Windows Server 2012 exhibits this behaviour.
> > 
> > This change sees rpcclient retry named pipe open requests when the
> > server responds with STATUS_PIPE_NOT_AVAILABLE. The retry logic is
> > contained in an asynchronous tevent_timer callback, to allow for
> > non-blocking callers.
> Can you explain this more detailed please?
> What triggers the start of the service?
> Do you have some captures?

A create&x on the FssagentRpc named pipe triggers the start of the
FSRVP service. Such requests receive STATUS_PIPE_NOT_AVAILABLE errors
until the service is available.

I'll send you a capture off-list.

> Is STATUS_PIPE_NOT_AVAILABLE only returned if the service already
> started, but is not ready to handle io?
> Or is it returned for any non existing named pipe?

The MS specs don't have anything definitive in this regard, MS-ERRREF
states STATUS_PIPE_NOT_AVAILABLE = An instance of a named pipe cannot be
found in the listening state.

Some local tests against Windows Server 2012 gave:
- An open request against a non-existent named pipe retrieves a
- An open request against the FssagentRpc named pipe when the FSRVP
  service is explicitly stopped retrieves a STATUS_INVALID_PIPE_STATE

Cheers, David

More information about the samba-technical mailing list