1

We've encountered weird situtaion, at work, several times in the last few months. After restarting the computer - some of the latest saved files became full of nulls. The size is correct and modification time is correct, but all the file is only '0' from start to end.

  • It happend on several similar computers.
  • All of the computers run Windows 7 Embedded.
  • All of the computers has File Based Write Filter, but it wasn't active on the drive where the corrupted files saved (in some cases: it wasn't active at all).
  • It happaned on HDD of different types (SSD, and not-SSD). The file system was NTFS, and the size was between 250 and 500 GB.
  • Apart from the HDDs, all of the computers have basicly the same hardware, including Intel C600/X79 series chipset 6 port sata achi controller.
  • In one situation, a batch file was re-written by our application, and afterwards (before restart) windows launched it and it ran correctly. After 2 minutes we restareted the computer - and the file was full of nulls.
  • The restart never happened in the middle of the file writing. It was clearly after the file has been saved and closed properly (although, it is possible that all of the restarts were from the power switch, and not from normal shutdown process).
  • It's rare situation. We can't find a way to make it happen by demand. In the past 6~ months it happend to us about 10 times on about 4 computers/HDDs.

How could we approach this annoying bug?

Thanks.

1 Answer 1

1

Disable write caching on those drives (Windows 7 Disk Policy). But using the normal shutdown would be preferable.

2
  • Will try. But 2 questions: (a) Does delayed write can be after minutes? It's not supposed to be after fraction of second? (b) Doesn't the fact that windows did ran the batch file correctly before the restart, impling some deeper problem? I mean - "write caching" issues, is adequate explenation for my deacription? Commented Jan 17, 2018 at 9:09
  • (a) I think not, but I'm not a Windows fan. Unix & linux sync every x seconds, but I believe Windows doesn't. (b) No, the OS will not read blocks from disk if he has them in memory. Adequate explanation: the help for "write caching" warns for your problem: make sure you have no power failures, like "put a lid on that power switch". Commented Jan 17, 2018 at 9:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .