OpenJDK / jdk / jdk10
changeset 21654:eac1485a5232
8028208: (aio) Assertion in clearPendingIoMap when closing at around time file lock is acquired immediately (win)
Reviewed-by: chegar
author | alanb |
---|---|
date | Tue, 12 Nov 2013 17:37:45 +0000 |
parents | 8cb51c29ab64 |
children | 55f32ae4f920 |
files | jdk/src/windows/classes/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java jdk/test/ProblemList.txt |
diffstat | 2 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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