Skip to content
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

13.1 DEV - corrupted FS, and problems to load presets #201

Closed
1 task done
dosipod opened this issue Apr 16, 2022 · 19 comments
Closed
1 task done

13.1 DEV - corrupted FS, and problems to load presets #201

dosipod opened this issue Apr 16, 2022 · 19 comments
Labels
bug Something isn't working

Comments

@dosipod
Copy link

dosipod commented Apr 16, 2022

What happened?

Using https://wled-install.github.io/ to install [SR13.1 DEV] results in corrupted FS . Using the same installer with normal wled is working fine . The same was tested on multiple esp32 versions .When saving presets serial monitor shows errors with LittleFS
ERROR_13 0 1

To Reproduce Bug

Use https://wled-install.github.io/ to install 13.1 DEV . Then create presets and reboot the esp, look at the serial monitor in ardunio IDE , you should see an error related to LittleFS

Expected Behavior

As we are using the same installation method we expect srwled fs to be fixed

Install Method

Binary from WLED.me

What version of WLED?

13.1 DEV

Which microcontroller/board are you seeing the problem on?

ESP32

Relevant log/trace output

No response

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@dosipod dosipod added the bug Something isn't working label Apr 16, 2022
@atuline
Copy link
Owner

atuline commented Apr 16, 2022

@dosipod
Copy link
Author

dosipod commented Apr 16, 2022

SR13.1 DEV binary is only here https://wled-install.github.io/ , is this web installer not supported ?
I am only testing multiple units and if you can install SR13.1 DEV from https://wled-install.github.io/ without any issue then we can close this .

@btittelbach
Copy link

not sure if this is related, but I observed that after upgrading to 13.1 my presets stopped working.

downgrading to 12.0 made presets work again.

@TobiasJu
Copy link

@btittelbach just compiled 13.1 from the Master branch myself and yes presets stopped working. Most of the time selecting a preset does not change the animation and sometimes the esp32 resets itself.

@softhack007
Copy link
Collaborator

softhack007 commented Apr 27, 2022

What kind of micophone are you using? Analogue or digital? Which Pins?

Because there could be a relation to how the I2S driver is collecting samples, like watchdog reset or "WiFi dies" effects...
Also corrupted FS might be a consequence of a reset/crash, if this happens while a write operation is ongoing.

@dosipod
Copy link
Author

dosipod commented Apr 28, 2022

I am not sure if this is clear but we are testing multiple units and none of them are having any attached leds or microphone .
Compiling from source and flashing with esptool as per the wiki also resulted in the same LittleFS behavior . Is it possible that this is related to my setup and not a bug ?
It is still the case there is no issue with compiling or installing normal wled from web installers on the same PC

@softhack007
Copy link
Collaborator

Did you check serial output? In case you see some "guru meditation" or unexpected reset, that would be clearly a bug.

@dosipod
Copy link
Author

dosipod commented Apr 29, 2022

I am not really sure if the first picture I added is what you meant by check serial output because that is the serial output errors but i am not sure if that is generic for all filesystem issues or it is pointing to something in the code in lfs.c .

It would be very simple to close this if someone could mention that installing SR13.1 DEV from https://wled-install.github.io/ worked with no filesystem errors and give few details on their environment if esptool installed version even matters in such case .

@softhack007
Copy link
Collaborator

It seems that LittleFS has a known problem when used from multiple threads (missing semaphore). As consequence, you see bad blocks and temporary missing files. Maybe related ?

issue lorol/LITTLEFS#44
PR lorol/LITTLEFS#45

@softhack007
Copy link
Collaborator

... I have created a fork of lorol LittleFS, and merged the pending PR that should improve thread-safety.
Please give it a try - you need to re-compile with the following change in platformio.ini:

find this in [esp32] section:

https://github.com/lorol/LITTLEFS.git

and replace with

https://github.com/softhack007/LITTLEFS-threadsafe.git#master

Please tell us if this helps.

@dosipod
Copy link
Author

dosipod commented May 26, 2022

Thank you very much , Would it be possible to replace the bad 13,1 Dev bin at https://wled-install.github.io/

@softhack007
Copy link
Collaborator

I've just committed the necessary changes for platformio.ini into dev - see 212e2d3

Now we need someone who knows how to upload binaries to wled-install....

@dosipod
Copy link
Author

dosipod commented May 29, 2022

we just tested https://github.com/wled-install/wled-install.github.io/blob/main/fw/SR_ESP32_4MB_13.1_DEV.bin [07d7dec]
on 3 different MCUs ( All of which worked fine with normal wled and SR13.0-B6 ) .

All our tests indicated the presets issues are not resolved . Flashing the bin per the wiki using esptool ,OTA or from web installer resulted in the same issues with presets .

00
01
02
03

@jonasschwenk
Copy link

Same here. With SR 13 b6 everything works fine. After Upgrade to 13.1 presets are broken. No matter if installed ota or flash via esptool( inc erase ).

@softhack007
Copy link
Collaborator

softhack007 commented May 30, 2022

Some known problems in WLED that could be related to the presets problem:

The first problem affects the B6 prerelease, and could lead to corrupted json files that cannot be loaded in a newer version of WLED. The second one affects WLED 13.1 only, and could lead to presets not being loaded/saved.

Could you please post your your [WLED-IP]/presets.json files, before and after updating WLED? It might help us poor free-time devs to better understand what happens on the devices.

@softhack007 softhack007 changed the title 13.1 DEV corrupted FS 13.1 DEV - corrupted FS, and problems to load presets May 30, 2022
@dosipod
Copy link
Author

dosipod commented May 30, 2022

Good News, Members of the SR dev team are able to reproduce the presets issues with 13.1 Dev.

softhack007 added a commit that referenced this issue Jun 22, 2022
this should fix the "preset load failed and Wifi lost" problem from #201
@ewoudwijma
Copy link
Collaborator

Softhack solved the preset issue. Can you confirm it is working for you?
I don't know status of corrupted FS, do we need to keep this issue open?

@dosipod
Copy link
Author

dosipod commented Jun 27, 2022

We could only spare two units at the moment with 16x32 and 16x16 . We did not face any corrupted FS when interacting with presets . Aside from few minor unrelated observations it seems the installation issue reported earlier for 13.1 is solved . Excellent work . I can close this if someone else confirms or at your discretion .

@jonasschwenk
Copy link

I can also confirm its working for my setup. All 8 controller are now working with 13.1. All proplems with the presets are gone. Excellent work and a big thank you.

@dosipod dosipod closed this as completed Jun 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants