Re: Why is my overlapped WriteFile getting blocked? (repost)
From: Old Fart (oldfart_at_newsgroups.nospam)
Date: 06/14/04
- Next message: Chris P. [MVP]: "Re: Web site not responding to some requests Error: 12029"
- Previous message: Baris Seker: "Re: Web site not responding to some requests Error: 12029"
- In reply to: Rhett Gong [MSFT]: "Re: Why is my overlapped WriteFile getting blocked? (repost)"
- Next in thread: Rhett Gong [MSFT]: "Re: Why is my overlapped WriteFile getting blocked? (repost)"
- Reply: Rhett Gong [MSFT]: "Re: Why is my overlapped WriteFile getting blocked? (repost)"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 14 Jun 2004 09:21:03 -0700
Rhett,
First, I want to clarify something. The "server bug" was that it was never
reading from the named pipe. So, the client would connect to the named pipe
and get blocked on the first WriteFile. Even though the server was not
reading from the pipe, I would not expect an overlapped write to the pipe to
block.
I played around with this a little bit more, using a test program. Here is
what I observed:
I ran both the client and server on the same PC and opened the client pipe
with the path \\.\pipe\NPTest. The WriteFile call returned immediately with
error 997. (This is what I expect and hope for.)
I ran the client on one PC and the server on another. The client pipe was
opened with the path \\otherpc\pipe\NPTest. The WriteFile blocked. (Not
good.) Closing the server pipe resulted in the WriteFile returning error
109. (What I would expect under the circumstances.)
The, just for fun, I tried running both the client and server on the same
PC, but I opened the client side using the path \\samepc\pipe\NPTest. I got
the same results as for the different PCs test. That is, the WriteFile
blocked.
Let me know if you still want the test programs, in light of the information
above.
"Rhett Gong [MSFT]" <v-raygon@online.microsoft.com> wrote in message
news:jY1n1$tTEHA.1900@cpmsftngxa10.phx.gbl...
> We have never seen the WriteFile hang when doing asynchronous operation.
As you said,
> you have a bug inside your server, so the whole operations are under
incorrect state,
> and it is hard to say what cause the problem. If possible, please send me
a *simple*
> repro sample and I can help to check what makes WriteFile hang.
>
> ERROR_IO_PENDING is returned if write operation is not completed before
the WriteFile
> returns. From your description, you have seen completion events are being
properly
> posted to the IOCP, so everything works correctly as expected. If you
expect an
> ERROR_IO_PENDING, you could try WriteFile with a long distant server to
get this error
> returned.
>
>
> Thanks,
> Rhett Gong [MSFT]
> Microsoft Online Partner Support
>
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> Please reply to newsgroups only. Thanks.
>
- Next message: Chris P. [MVP]: "Re: Web site not responding to some requests Error: 12029"
- Previous message: Baris Seker: "Re: Web site not responding to some requests Error: 12029"
- In reply to: Rhett Gong [MSFT]: "Re: Why is my overlapped WriteFile getting blocked? (repost)"
- Next in thread: Rhett Gong [MSFT]: "Re: Why is my overlapped WriteFile getting blocked? (repost)"
- Reply: Rhett Gong [MSFT]: "Re: Why is my overlapped WriteFile getting blocked? (repost)"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|