ow2-proactive / programming

ProActive Programming library
http://proactive.activeeon.com/
GNU Affero General Public License v3.0
8 stars 19 forks source link

fix for ow2-proactive/scheduling#2687 #1323

Closed fviale closed 8 years ago

fviale commented 8 years ago

A race condition can occur when shutting down the JVM. In that case, the VFSMountManagerHelper shutdown hook can execute concurrently with VFSMountManagerHelper.closeFileSystems. In that case, the vfsManager(VFS:DefaultFileSystemManager) can be closed by the shutdown hook and used later in the closeFileSystems method

This fix is meant to avoid such conflicting states by the following:

Added a test to verify that, after the terminate call, the closeFileSystems does not throw a NPE, and the helper can be regenerated with a call to mountAny