Original title: "Workspace's FileReadDeleteTest's testFileDeletionWhileReadingNio() fails in Ubuntu 14.04"
Steps to reproduce:
1. run mvn clean install on develop branch on an Ubuntu 14.04, openjdk version "1.8.0_111", Apache Maven 3.3.9
Actual Results: Exception thrown in workspace impl's FileReadDeleteTest's testFileDeletionWhileReadingNio (the testFileDeletionWhileReadingIo test succeeds) . See exception below.
Expected Results: The Test succeeds in Ubuntu 14.04 as it does in Mac OS X: The FileChannel is thread safe enough to keep reading the file stream even though the file was deleted in the second thread.
Workaround (if any): Build matterhorn-workspace-impl with -DskiptTests=true
REF: This is the exception thrown in the first thread at "return channel.transferTo(total, 1024, sink);" immediately after the file was deleted in the second thread.
java.io.IOException: No such file or directory
at sun.nio.ch.FileDispatcherImpl.size0(Native Method)
The big question is that FileUtility uses FileChannel and it doesn't seem to be as thread safe on Ubuntu (14.04) as it is on other Operating Systems.
I forgot to mention that the Ubuntu was in a Virtualbox. Apparently, memory mapping is not allowed on shared directories in Virtualbox  . The FileChannel tranferTo in testFileDeletionWhileReadingNio() ran successfully and all built Ok when building Opencast in a non-shared VM location within the Ubuntu Virtualbox VM. Good to know for the future. Closing ticket.
Additional notes about this java nio FileChannel file access thread safety issue from a VirtualBox vm using a shared file system.
I'm currently using VirtualBox 5.0.12 r104815 and I have not tried the upgraded version of VirtualBox 5.1.8.
The thread that gives an explanation of why virtual box does not support memory mapping on shared file system: https://www.virtualbox.org/pipermail/vbox-dev/2013-April/011349.html
This looks like the VirtualBox mmap issue tracking ticket https://www.virtualbox.org/ticket/819
(Opencast FileUtils uses FileChannel which relies on mmap thread safety, per the Workspace module's junit)