JDK 9 RFR of 8168628: (ch) JVM Crash in : ~StubRoutines::jshort_disjoint_arraycopy

Alan Bateman Alan.Bateman at oracle.com
Tue Dec 6 14:01:30 UTC 2016



On 06/12/2016 00:45, Brian Burkhalter wrote:
> Please review this hopefully final patch:
>
> http://cr.openjdk.java.net/~bpb/8168628/webrev.02/ 
> <http://cr.openjdk.java.net/%7Ebpb/8168628/webrev.02/>
>
> It is identical to webrev.01 except for the addition of a regression 
> test which is *not* run by default as it requires a large amount of 
> disk space
>
The update to handleSetLength in io_util_md.c looks okay.

Looking at FileDispatcherImpl.allocate0 then I assume the fstat64 to 
check the file size isn't needed - we should only be calling allocate0 
when extending the file. In any case, there is always going to be a 
timing issue here as some other process may have the file open and may 
be truncating or extending it.

The updated synchronized block in FileChannelImpl.map looks okay 
although not pretty to have it include the GC+ retry. It would be an 
unlucky day if extend the file and then mmap fails.

Alan





More information about the nio-dev mailing list