Several bugs in Thor's MRU file cache that could cause files to be accessed after having been closed by the MRU cache.
As a result queries could fail with checked_pread failures on local files or RFSERR_InvalidFileIOHandle errors if dealing with a remote file on dafilesrv.
The main problem was that the implementation incorrectly allowed the client of a cached file to retrieve the underlying IFileIO, allowing the cache to close the file whilst still in use.
Dafilesrv can report RFSERR_InvalidFileIOHandle, as in:
and clients fail:
From debugging it appears client has sent a handle value of 0 to dafilesrv which is why it cannot be found and produces the error.
Client should not send handle==0 to dafilesrv but either throw an exception or re-establish a file handle/connection to dafilesrv.