RFR [8058099] (ch) Cleanup in FileChannel/FileDispatcher native implementation [win]
Alan Bateman
Alan.Bateman at oracle.com
Tue Sep 23 11:59:33 UTC 2014
On 22/09/2014 14:17, Ivan Gerasimov wrote:
>
> On 22.09.2014 16:09, Alan Bateman wrote:
>> :
>> Martin Doerr brought up an issue recently where LockFileEx was
>> returning ERROR_IO_PENDING [1]. I'm still wondering about that one
>> because I also believed that if we aren't using FILE_FLAG_OVERLAPPED
>> that it would also complete synchronously. Maybe we need to look at
>> that one again to understand how this is possible.
>>
> That looks scary!
> However, I didn't find the reproducer in the thread, so it's hard to
> say how it was possible to make it fail.
I'm not sure either, it's either that the MS documentation is wrong,
Windows doesn't work the way the documentation says, or something
fishing in the bug report. I've cc'ed Martin to see if he can say any
more about the issue.
> I can revert these two usages of OVERLAPPED to be safe.
> On the other hand, we have a few more places where OVERLAPPED
> structure is used, but the action is assumed to complete synchronously
> - i.e. no checks for ERROR_IO_PENDING error are performed.
> The places are write0 and writev0 (in append mode) and release0.
>
> Shouldn't we check for ERROR_IO_PENDING more consistently?
I don't think so, I think what you have is right (at least according to
the documentation).
-Alan
More information about the nio-dev
mailing list