My company produces Android devices running Linux 3.4 and we have seen that sometimes but rarely a file on the ext4 emmc file system will suddenly become zero-length. Normally I would suspect an improper shutdown while the file was being written but in this situation I know that this file is written once at first boot and never written again; although it is read at every boot.

Is anyone aware of a bug in ext4 code that could cause this? It seems that ext4 is still under quite a bit of active development. Maybe some sys-admins out there have encountered this and are aware of patch or version of the kernel that has a fix?

  • 1
    How large are the files? There were some bugs with inline_data, 60 byte or less files, but I don't think 3.4 ext4 supported that option. – Mark Plotnick Dec 26 '17 at 22:13
  • This happened on a file of 84 bytes size. – satur9nine Dec 28 '17 at 2:47
  • Are there many simultaneous writes happening at the same time? – Tigger Dec 28 '17 at 6:06
  • For the particular file in question that suffers from the problem there are definitely no simultaneous writes. In general the device is quite busy running various processes simultaneously that may each be writing files of their own. In general it is extremely rare that two processes or threads are writing the same file at the same time. – satur9nine Dec 28 '17 at 6:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.