提交 5a92307d 编写于 作者: A alanb

8028208: (aio) Assertion in clearPendingIoMap when closing at around time file...

8028208: (aio) Assertion in clearPendingIoMap when closing at around time file lock is acquired immediately (win)
Reviewed-by: chegar
上级 fe52803a
...@@ -228,6 +228,7 @@ public class WindowsAsynchronousFileChannelImpl ...@@ -228,6 +228,7 @@ public class WindowsAsynchronousFileChannelImpl
@Override @Override
public void run() { public void run() {
long overlapped = 0L; long overlapped = 0L;
boolean pending = false;
try { try {
begin(); begin();
...@@ -241,6 +242,7 @@ public class WindowsAsynchronousFileChannelImpl ...@@ -241,6 +242,7 @@ public class WindowsAsynchronousFileChannelImpl
overlapped); overlapped);
if (n == IOStatus.UNAVAILABLE) { if (n == IOStatus.UNAVAILABLE) {
// I/O is pending // I/O is pending
pending = true;
return; return;
} }
// acquired lock immediately // acquired lock immediately
...@@ -250,10 +252,10 @@ public class WindowsAsynchronousFileChannelImpl ...@@ -250,10 +252,10 @@ public class WindowsAsynchronousFileChannelImpl
} catch (Throwable x) { } catch (Throwable x) {
// lock failed or channel closed // lock failed or channel closed
removeFromFileLockTable(fli); removeFromFileLockTable(fli);
if (overlapped != 0L)
ioCache.remove(overlapped);
result.setFailure(toIOException(x)); result.setFailure(toIOException(x));
} finally { } finally {
if (!pending && overlapped != 0L)
ioCache.remove(overlapped);
end(); end();
} }
......
...@@ -204,9 +204,6 @@ java/net/DatagramSocket/SendDatagramToBadAddress.java macosx-all ...@@ -204,9 +204,6 @@ java/net/DatagramSocket/SendDatagramToBadAddress.java macosx-all
# 6963118 # 6963118
java/nio/channels/Selector/Wakeup.java windows-all java/nio/channels/Selector/Wakeup.java windows-all
# 7052549
java/nio/channels/FileChannel/ReleaseOnCloseDeadlock.java windows-all
# 7133499, 7133497 # 7133499, 7133497
java/nio/channels/AsyncCloseAndInterrupt.java macosx-all java/nio/channels/AsyncCloseAndInterrupt.java macosx-all
java/nio/channels/AsynchronousFileChannel/Lock.java macosx-all java/nio/channels/AsynchronousFileChannel/Lock.java macosx-all
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册