-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
SD Card access causes crash in development branch, but not in release branch (CAUSED BY WATCHDOG - see below) #21473
Comments
FYI any exception with Reason unknown is likely caused by watchdogs enabled recently in dev branch. To stop chasing windmills I suggest you disable the watchdog feature and continue with what you want to do. EDIT: Add this |
you are of course correct. adding this to user_config_override.h, and rebuilding for my esp32cam, it's listed 430+ files so far (better than 45). |
it dies in a different way now.... no crash log on the serial, just hangs with no network access, and serial logs turned themselves off... but then I'm giving it hell, so I'm not surprised. |
re-opening - the watchdog triggers in the reproduction above because of listing a very large folder, and so hanging the main loop - which we could solve with some yield(). But with further testing any SD access can cause a main loop hang. Edit - a self-build release build stalls main loop - first time at first file download. 2nd time after 471 file downloads. |
I think a bug in the UFSServe function. Possibly streaming direct from file to socket is not a good idea... |
The reason why the WDT is enabled is to find code parts which blocks Tasmota (way too long). Goal is to change long blocking code in "normal" working code. |
PROBLEM DESCRIPTION
I was experiencing random crashes on esp32cam writing and reading from SD card.
I found a way to reliably reproduce the crash on esp32cam and esp32s3cam boards.
Further testing on the S3 board only indicates that I did not see a crash with the release version
(tasmota32s3.bin | http://ota.tasmota.com/tasmota32/release/tasmota32s3.bin | 1956k | 20240514 16:12)
but does crash reliably with the development version:
(tasmota32s3.bin | http://ota.tasmota.com/tasmota32/tasmota32s3.bin | 1973k | 20240522 17:19
Crashes happen on writing files, listing folders and reading files, in unmodified firmware.
I have not done equivalent testing of internal flash.
REQUESTED INFORMATION
Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!
Backlog Template; Module; GPIO 255
:Backlog Rule1; Rule2; Rule3
:Status 0
:weblog
to 4 and then, when you experience your issue, provide the output of the Console log:TO REPRODUCE
unzip the attached zip onto an SD card, insert into the device.
Monitor the serial of the device.
Using the menus, go to Tools/Manage File System
click on
timelapse
click on
tl
(contains ~1600 files)files will begin to be listed in the browser window. You may get as far as 45-75 files listed before the device crashes.
Note that this is a way to reproduce, but the issue affects general read/write of the SD card, and is not necessarily specifically related to listing files. e.g. it was crashing writing files every 10s to the folder. Backtraces indicated it was in different functions, e.g. sometimes fclose() on a file write. But this reproduction does not involve writing...
EXPECTED BEHAVIOUR
The device should not crash when accessing the SD card.
SCREENSHOTS
n/a
ADDITIONAL CONTEXT
use the contents of this zip file to easily reproduce:
timelapse.zip
(Please, remember to close the issue when the problem has been addressed)
The text was updated successfully, but these errors were encountered: