-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[nrf52840] Filesystem errors when virtual drive fills up #1627
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
BTW: How circuitpython is flashed doesn't make a difference. Also I noticed: When there's only a single main.py file, it seems to run stable. I have one board that runs like that since many weeks, and is plugged and unplugged several times a day. But as soon as there are more files, and especially libraries in subdirectories, the drive gets wiped sooner or later. |
What o/s including version is running on the host computer? Why does title mention "drive fills up"? |
I tested several host computers, with Windows 10 and Linux Mint 18.3/19.1. Same results. "Drive fills up" means, the fuller the virtual drive gets (regardless what data, may be Python code, random test data), the more likely the read errors appear. As I said, a single Circuitpython file may run without an error indefinitely, but as soon as you copy additional files to the virtual drive, the errors appear. If the drive is nearly full, the errors occur inevitably. |
That's interesting detail. I was only asking because a disk/storage device being completely full often causes various forms of mayhem and I wasn't sure if you were talking about 100% full or not. |
I'm unable to reproduce this with 94822ee built in debug mode on the PCA10056. I loaded it with JLink and then added a blinky code.py (below), made the lib folder and then dragged the lib folder over. I also copied the examples over. It was slow but didn't have errors. Next I repeatedly ejected the drive, disconnected the usb data lines with an inline switch, reset circuitpython via GDB and verified I could still read files from the drive. Note I was on Mac OSX Mojave and made sure to eject the drive. Both Windows and Linux may cache FS changes that may lead to file system corruption if CircuitPython is disconnected or reset before everything has been flushed by the OS. There is nothing we can do about this since it is done host-side. We encourage folks to "safely eject" before removal and use an editor that flushes immediately. Please comment if you can reproduce this still with a finite set of steps. code.py import digitalio
import board
import time
led = digitalio.DigitalInOut(board.LED3)
led.direction = digitalio.Direction.OUTPUT
while True:
led.value = not led.value
time.sleep(0.1) |
Tested boards: pca10056, pca10059
Steps to reproduce the errors:
The following errors occur, sometimes immediately, sometimes after disconnecting and reconnecting the board from the USB:
This happens with all 4.x beta releases, as well with self-compiled versions. Increasing the stack size doesn't help.
Could anybody please try to reproduce this? Maybe also on other boards?
The text was updated successfully, but these errors were encountered: