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

Brian Burkhalter brian.burkhalter at oracle.com
Tue Dec 6 00:45:41 UTC 2016

Please review this hopefully final patch:


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



On Dec 2, 2016, at 1:33 PM, Brian Burkhalter <brian.burkhalter at oracle.com> wrote:

>>> This patch addresses the problem by using fallocate() on Linux when the requested size exceeds the allocated size, and by synchronizing on positionLock in the section in FileChannelImpl.map() where the file is extended. Note that the same crash is observed on OS X without the addition of this synchronization.
>> I've read through your exchange with Robbin in JIRA and I think this is okay. It was an oversight that map didn't synchronize on positionLock when extending the size and I think you'll need to extend the scope to include the mmap itself, otherwise another thread can truncate it between the resize + mmap).
> Revised patch: http://cr.openjdk.java.net/~bpb/8168628/webrev.01/
> The differences with respect to webrev.00 are:
> 1) Enlarge the scope of the synchronized block to include map0().
> 2) Add the changes to src/java.base/unix/native/libjava/io_util_md.c
> I am investigating collapsing the tests attached to the issue into a single test which is *not* run automatically.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20161205/ebc5b09b/attachment.html>

More information about the nio-dev mailing list