On 2023-04-25, at 4:17 PM, David T. Lewis lewis@mail.msen.com wrote:
On Tue, Apr 25, 2023 at 10:04:06AM -0700, tim Rowledge wrote:
Small update to record a very slightly different event, this time running on my local x64 xubuntu server.
Processing one of the large json files again, the system halted because the first two chars of the String read from the file were incorrect. The file actually starts with {"scanRunOn but in the debugger it was showing syscanRunOn As before, redoing the file read produced the correct result.
It's almost as if the file reading is getting usurped somewhere.
This smells like a concurrency issue related to file streams.
[snip]
That's what I started thinking and then I realised that the files involved are static and never written to; at least, not by intent. I'm going to set the permissions to readonly and see if anything gets triggered!
Even the reading I'm doing is as near atomic as we get for file operations; open the file, read the entire contents, parse into json. Mind you, for a MultiByteFileStream we do seem to do a lot of work to handle potential non-ascii UTF-8chars. Maybe that opens the door to some problems? Except we're still looking at sometihng that has happened maybe 5 times out of a thousand swings through the same file(s)
tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Any Sufficiently Advanced Incompetence Is Indistinguishable From Malice