JDK-7133497 : (fc) FileChannel.lock not preempted by asynchronous close on OS X
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.nio
  • Affected Version: 7u4,8
  • Priority: P4
  • Status: Resolved
  • Resolution: Duplicate
  • OS: os_x
  • CPU: x86
  • Submitted: 2012-01-26
  • Updated: 2014-01-22
  • Resolved: 2014-01-22
Related Reports
Relates :  
From http://java.net/jira/browse/MACOSX_PORT-230 --

Build: b201
Keywords: test-fail-macos
Tests failed (Regression):

This has been resolved in jdk9/dev via JDK-7133499.

EVALUATION Implementing asynchronous close of FileChannel is going to require changes that may be disruptive to other platforms so I think we should work on this for 8 and then back-port later to a 7u release. Note that this never worked with Apple's JDK6 either so this is not a regression.

EVALUATION The issue here is that dup2 is blocking and doesn't close the file as is does on other platforms. This is the same underlying reason that channels/AsyncCloseAndInterrupt.java fails.