circuitpython: Silent file corruption on NRF devices

On large disk writes, filesystem corruption seems to be an issue on the disk. It reports as working properly to the host OS, even after a reboot of the controller. This has been tested on several devices, but is most problematic on the nice_nano, which has almost identical specs to the itsybitsyNRF. Tested using several Cpy versions including 6 rc.0. Steps to reproduce https://github.com/KMKfw/kmk_firmware

  1. copy KMK folder to the root of the drive
  2. wait until disk sync or run sync on linux
  3. code is corrupted when trying to run

This issue is much more likely to occur while trying to replace files on disk, though even initial copy seems to fail, and half of the time, crashes to safe mode if a disk sync is forced. rsync reports that the files are correct, when the code is run, random files will have errors that make no sense, and be corrupt with garbage data. Copying the same files over them works eventually, and all code with 0 changes will run properly.

Tested on Linux, as well as a Windows 10 VM on Virtualbox

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 17 (1 by maintainers)

Most upvoted comments

It is a bug that I marked it with the wrong milestone 😃

OK, so this is probably internal filesystem only. Thanks! That’s very helpful. We have seen this in the past, and I have a vague memory of trying to fix it, but clearly it needs more investigation.