8028208: (aio) Assertion in clearPendingIoMap when closing at around time file lock is acquired immediately (win)
Reviewed-by: chegar
--- a/jdk/src/windows/classes/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java Tue Nov 12 18:12:47 2013 +0100
+++ b/jdk/src/windows/classes/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java Tue Nov 12 17:37:45 2013 +0000
@@ -228,6 +228,7 @@
@Override
public void run() {
long overlapped = 0L;
+ boolean pending = false;
try {
begin();
@@ -241,6 +242,7 @@
overlapped);
if (n == IOStatus.UNAVAILABLE) {
// I/O is pending
+ pending = true;
return;
}
// acquired lock immediately
@@ -250,10 +252,10 @@
} catch (Throwable x) {
// lock failed or channel closed
removeFromFileLockTable(fli);
- if (overlapped != 0L)
- ioCache.remove(overlapped);
result.setFailure(toIOException(x));
} finally {
+ if (!pending && overlapped != 0L)
+ ioCache.remove(overlapped);
end();
}
--- a/jdk/test/ProblemList.txt Tue Nov 12 18:12:47 2013 +0100
+++ b/jdk/test/ProblemList.txt Tue Nov 12 17:37:45 2013 +0000
@@ -204,9 +204,6 @@
# 6963118
java/nio/channels/Selector/Wakeup.java windows-all
-# 7052549
-java/nio/channels/FileChannel/ReleaseOnCloseDeadlock.java windows-all
-
# 7133499, 7133497
java/nio/channels/AsyncCloseAndInterrupt.java macosx-all
java/nio/channels/AsynchronousFileChannel/Lock.java macosx-all