-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Data corruption after battery empty #3398
Comments
Yes please - do you have a link to the old issue too? |
Old issue is: #3000 |
If you want to try to reproduce it in the meantime, install sixths and do "topright"- "bottomright" -"bottomleft" gesture. It will turn on GPS. I can reproduce it way too easily on horseback trips. I'll try to hack up better reproducer. |
Great, thank you (also tagging #2865 for reference too). I'll tag @gfwilliams just so you're aware, in case there was any storage changes you're working on in the meanwhile |
Have you had corruption more than this one time in the last 6 months then? At least now it should have popped up the One issue is that storage is only scanned at boot, so we don't actually know whether the corruption did happen when the battery died, or whether it happened before and you only noticed when the watch rebooted. Potential fixes for this might be:
|
So I'm trying to reproduce the corruption, and no success so far. No, I did not detect corruption in last 6 months. I guess "storage is only scanned at boot" might be my problem. I suspect I did heavier-than-average use in the past. Is there way to force filesystem check on runtime -- maybe we should be doing that periodically... |
(I guess I should try to simply reboot watch after "heavy" use, and see if I can find some kind of pattern? Is Settings|Utils|Turn off then turn it back on way to do that?) |
Ahh, ok - it's just you said "
Actually right now there isn't, but I guess that could be exposed. Using turn off is probably nicer, but you could long-press the button (although I guess that risks potentially rebooting while writing to flash) |
So, yes, I did have it few times, but it was more than 6 months ago :-). So... what are the expected results of rebooting while writing to flash? I'm used to ext4 where there should be no ill results; recent writes may be lost but things should be consistent. How does BangleJS compare? |
Ok, so I drained battery maybe 10 times this morning, then did some tweaks from App loader, and now App loader no longer connects. But watch still reboots ok. |
For the record, may battery draining script was this: function eat(on) { function logstamp(s) { drain = 0; function periodic() { g.setColor(1, 1, 1); print(msg + msg2); let logfile = require("Storage").open("crash.log", "a"); |
It might just be your PC's bluetooth connection is confused. I doubt it's a bangle issue. If power fails while writing to flash I think it's similar, but the issue is really if it's writing a new file's header and those 32 bytes end up partially written. It'd be extremely unlikely for that to happen though |
I have solid connection from the Web IDE, yet app loader has deterministic problems. Compaction still works:
But I seem to read all the files okay,I'll try to debug it a bit more. |
Ok, so now I have corruption, this time .boot0 contains 0xff's . I don't recall running battery flat, recently. (Is there easy way to fix it?) 00000ce0: 6c 3b 61 2e 6d 6f 76 65 6d 65 6e 74 2b 3d 65 2e l;a.movement+=e. |
That's an odd one - if you look at the list of files in the Web IDE (click the storage icon towards the middle of the screen) are there any filenames that look corrupt? If you just go to the It seems to me like somehow the |
Filenames look ok in the web ide. I had few files truncated to 0xffff bytes in the past. Let me try the "rewrite settings". Is there documentation of filesystem properties somewhere? Knowing which actions can lead to corruption would be good. I now know "battery running empty" is dangerous. Is the "2 second press" dangerous? Is the "5 second press" dangerous? |
(And yes, "rewrite settings" did the trick for me. Thanks!) |
In recent firmwares even that isn't bad - it just means that maybe if you're super unlucky a file header will be partially written, but you do have to be very unlucky for that.
They shouldn't actually be very dangerous now either. I don't think it's very easy for a write to end up getting completely interrupted (apart from with the 5 second press) but even then it's just that a file ends up partially written like in this case. All I can think happened for you is maybe you changed a setting and then the storage needed compacting when Do you remember doing anything in particular right before you started noticing the error? |
Affected hardware version
Bangle 2
Your firmware version
2v21
The bug
I was using watch for gps logging, and battery ran flat for first time in maybe half a year. And... data corruption after I charged it. So it seems like the old issue is still there. Should I try to create some kind of reproducer?
Installed apps
sixths (0.03) was used for gps logging, it seems to trigger corruption quite easily.
The text was updated successfully, but these errors were encountered: