ID 195345 - RotoPaint Cache is shared between Nuke instances; Interprocess lock fail fatal error

Follow

The RotoPaint tile cache (rotopaint cache in the preferences) is kept in one standard location.  

This leads to 
a) corruption if multiple instance of Nuke are using RotoPaint.
b) crashes in some instances on render farms executing the same script in parallel on a machine
 
This led to the lock file becoming corrupt.  2 examples of error output (separate cases):

a) from customer case using Nuke 9.0v8

Interprocess lock failed: 
/shows/rpg/farmdata101/501/85936501/142/1/nuke/tilecache/DiskSize.lock 
Exception in thread Thread-15: 
Traceback (most recent call last): 
File "/dist/sw/nuke/9.0/lib/python2.7/threading.py", line 551, in 
__bootstrap_inner 
self.run() 
File "/dist/sw/nuke/9.0/lib/python2.7/threading.py", line 504, in run 
self.__target(*self.__args, **self.__kwargs) 
File 
"/pixar/d2/sets/vfx2015b/lib/python2.7/site-packages/pykafka/producer.py", 
line 441, in queue_reader 
self.producer._worker_exception = sys.exc_info() 
ReferenceError: weakly-referenced object no longer exists
 


b)  from Engineering test, using NukeStudio 10.0v0.000275a

/Applications/Nuke10.0Main.000275a/Nuke10.0Main.000275a.app/Contents/MacOS/Nuke10.0Main.000275a --studio
NukeStudio 10.0v0.000275a, 64 bit, built Mar  2 2016.
Copyright (c) 2016 The Foundry Visionmongers Ltd.  All Rights Reserved.
Using "nukebeta" (RLM) and "nukexbeta" (RLM) and "nukestudiobeta" (RLM) licences.  Licence expires on: 2016/5/31
Interprocess lock failed: /var/tmp/SampleCache/SampleCache/DiskSize.lock
[Error][2016/02/09:17:12:44] ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
EXCEPTION REPORT
  User message is 'Cache disk size lock failed.'
  Threw exception of type Foundry::Cache::CacheDiskSizeLockFailed
  From Core/Cache/include/Cache/fnProcessGlobalDiskSize.h:138 in 'void Foundry::Cache::SharedDiskSize::recoverFailedLockAndCallRecursive(FUNCTOR &, bool, Foundry::Cache::Interruptor *, int) const [with FUNCTOR = Foundry::Cache::SharedDiskSize::InitFunctor]'
  Decoration is...
    [UserMessage] = Cache disk size lock failed.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Engineering Note
 
"we want to reuse the cache between runs of Nuke but not between simultaneous instances."

    We're sorry to hear that

    Please tell us why