Emmc store a zero size file

I have a problem with the file system residing on the 4 GByte emmc memory. My program writes two log files, one at the end of the minute and one at the end of the hour. Sporadically the log file written at the hour mark has been found to be zero in size. The file exists as an entry in the directory but its size, which is normally in the order of tens of kbytes, is zero. The program is written in C and uses the normal open, write and read primitives. Can you give me some hints to solve this problem and make the file system reliable?

Best regards.

Hi @bzzpaolo,

Thanks for using the Toradex community.

Could you please state the HW and SW versions of your setup?

Best Regards
Kevin

I apologise for forgetting,
the SOM is Colibri iMX7D 1GB V1.1A
custom board
Toradex Embedded Linux Demo with LXDE - 2.8b7 (2020-06-10)
Best Regards
Paolo

@bzzpaolo this is likely a problem in the custom program or the way you scheduled it.
A better description and a code excerpt would help to understand.

1 Like