Thanks for reply Carl.
I don't know how hard this would be to implement, but in my opinion this
would be very worthwhile. Just as the network can't be trusted to
transmit data 100% faithfully, the disc cannot be trusted either. Disc
corruption is likely a rare occurrence, but to be bullet-proof it'd be
better if integrity were checked to make this impossible.
Going to the furthest extent, I guess you also can't trust RAM either
(cosmic rays etc)! But, hey, that's life...
Out of interest, what info in the MXF headers is unknown at the start of
the process?
And... Are there any other points in the process where data is
written/read from network or disc and it's not checksummed on either side?
Damn I wish I knew C++! I'd really like to be able contribute to the
code rather than just finding niggly issues all the time. Port
DCP-o-matic to Javascript and I'm in! ;)
As a precaution, I'm going to remake all DCPs which were made on the
faulty drive. I have all the project files still, so can just run it as
a batch - not a big deal at all.
Many thanks,
Jim
On 16/10/2018 10:55, Carl Hetherington wrote:
On Tue, 16 Oct 2018, Jim Dummett via DCPomatic wrote:
Hi Carl.
[snip]
I've checked that all the DCPs on that drive
pass a hash-check, but...
are the hashes calculated:
1. As the MXF files are created *before* they are written to disc?
or
2. Files written to disc first, and then read back from disc afterwards
to calculate hashes?
Number 2. Sadly you can't do it on the fly (as far as I
can see) as when
the MXF is finished you have to write some stuff back to the header at the
start of the file.
I'm thinking that if any of the data got
corrupted between DCP-o-matic
writing it to disc and then reading it back again to calculate the
hashes, the hashes would reflect the corrupted data. And so the fact
that my hash-check passes wouldn't guarantee the DCP is as it should be.
Or is there some other integrity checking process which would make this
impossible?
You're right here, I think.
DCP-o-matic does save individual frame hashes as it writes the DCP, but
these are only used for resumption of encodes (to work out where the
previously encoded MXF stopped being "right").
It could re-check those hashes when it is making the new hash for the
CPL/PKL files. In fact it may not be much of a performance hit as that
operation is probably limited by disk IO.
https://dcpomatic.com/mantis/view.php?id=1380
Best,
Carl