(In reply to Magnus Melin [:mkmelin] from comment #19) > My main suspects in https://hg.mozilla.org/comm-central/pushloghtml?startdate=2021-09-10&enddate=2021-10-04 would be > * bug 1719996 - https://hg.mozilla.org/comm-central/rev/ffc062c993719c6b03bd8588a005eb827f9a3b0c > * bug 1717147 - https://hg.mozilla.org/comm-central/rev/35e064ada8debd021ce507fd0e8b20be363a9046 For debugging, (1) the first patch, I would record the current position of the file in near where seek to the end was removed and then re-insert the seek to end and then read the file position again compare the file position recorded earlier. If they are the same, the removal of seek was OK, but if not we have a problem. (I could find a similar file position when I tried to introduce the buffered write [still to be submitted/merged in the latest re-incarnation.] When a file stream was converted to buffered stream, the stream was AUTOMATICALLY rewound to the initial 0 position which caused a serious bug and that was why it had been removed many years ago, several years before I tried it. I could only find this automatic rewinding when I trace the file position very carefully in a similar approach. :-( (2) the second patch. I think only careful reading of the code, and dumping of various intermediate file, etc. can reveal any surprises or misunderstandings of the operation. (Well, in my attempt to introduce buffered write, I also touched this part and I was a bit surprised that a buffered input stream could not be modified into buffered output stream or something like that. The conversion of various file types were not quite symmetrical and uniform. If BenC could eliminate such extra code to deal with the limit of low-level IO function, so much the better.) I was assuming the above two are the only potential culprits, though.
Bug 1734847 Comment 31 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
(In reply to Magnus Melin [:mkmelin] from comment #19) > My main suspects in https://hg.mozilla.org/comm-central/pushloghtml?startdate=2021-09-10&enddate=2021-10-04 would be > * bug 1719996 - https://hg.mozilla.org/comm-central/rev/ffc062c993719c6b03bd8588a005eb827f9a3b0c > * bug 1717147 - https://hg.mozilla.org/comm-central/rev/35e064ada8debd021ce507fd0e8b20be363a9046 For debugging, (1) the first patch, I would record the current position of the file in near where seek to the end was removed and then re-insert the seek to end and then read the file position again compare the file position recorded earlier. If they are the same, the removal of seek was OK, but if not we have a problem. (I could find a similar file position problem when I tried to introduce the buffered write [still to be submitted/merged in the latest re-incarnation.] When a file stream was converted to buffered stream, the stream was AUTOMATICALLY rewound to the initial 0 position which caused a serious bug and that was why it had been removed many years ago, several years before I tried it. I could only find this automatic rewinding when I trace the file position very carefully in a similar approach. :-( (2) the second patch. I think only careful reading of the code, and dumping of various intermediate file, etc. can reveal any surprises or misunderstandings of the operation. (Well, in my attempt to introduce buffered write, I also touched this part and I was a bit surprised that a buffered input stream could not be modified into buffered output stream or something like that. The conversion of various file types were not quite symmetrical and uniform. If BenC could eliminate such extra code to deal with the limit of low-level IO function, so much the better.) I was assuming the above two are the only potential culprits, though.