| Previous | Next |
| RPC_S_INVALID_ASYNC_CALL | RPC_X_PIPE_DISCIPLINE_ERROR |
RPC_X_PIPE_CLOSED
Closed pipe versus closed connection
RPC_X_PIPE_CLOSED describes the lifecycle of one streamed RPC parameter. It does not by itself say that the RPC association, TCP connection, or named-pipe transport was closed. In the Microsoft RPC error mapping, the value corresponds to an RPC pipe-closed fault returned for the call.
A pipe reaches its terminal state after its input has been exhausted, its output has been completed, or a failure path has abandoned the stream. Further pipe work in that call is no longer valid. The error is especially useful when a callback or cleanup path attempts to keep consuming or producing elements after the runtime has ended that stream.
Typical causes
- A producer or consumer treats end of stream as a temporary empty condition and calls again instead of returning control to the RPC runtime.
- An error path closes or abandons the pipe, but later code still invokes a callback through saved state from the same call.
- Application code retains a pipe descriptor beyond the lifetime of its RPC invocation and tries to use it after the manager function returned.
- Multiple callbacks race through shared state and one path finalizes the pipe before another path has finished its work.
Useful diagnostics
Track a per-call state machine for each pipe parameter: not started, active, terminal, and failed. Record the event that ended the stream as well as every later callback attempt. This makes it possible to distinguish a legitimate completion from an early close caused by an application error.
Compare this error with RPC_X_PIPE_EMPTY. “Empty” means that no next logical element is available when the runtime tries to obtain one; “closed” means that the pipe object can no longer be used at all. RPC_X_PIPE_DISCIPLINE_ERROR instead points to a call that finished before required pipe work was complete.
References
- Microsoft: mapping RPC pipe-closed faults to Win32 errors
- The Open Group: lifecycle of DCE RPC pipe callbacks
- Microsoft: system error codes 1700–3999
Looking for a different code? Search another status or error code.