s60sc / ESP32-CAM_MJPEG2SD

ESP32 Camera motion capture application to record JPEGs to SD card as AVI files and stream to browser as MJPEG. If a microphone is installed then a WAV file is also created. Files can be uploaded via FTP or downloaded to browser.
GNU Affero General Public License v3.0
931 stars 214 forks source link

Reset due to task watchdog every couple of minutes #474

Closed ivoras closed 2 months ago

ivoras commented 2 months ago

I'm using one of these ESP32-S3 boards: https://www.aliexpress.com/item/1005006434168488.html and everything works fine EXCEPT that the board keeps rebooting every few minutes. Here are the log messages:

[23:12:19.030 logSetup] =============== ESP-CAM_MJPEG 9.9.3 ===============
[23:12:19.041 logSetup] Compiled with arduino-esp32 v3.0.4
[23:12:19.041 printResetReason] Reset due to task watchdog
[23:12:19.051 printWakeupReason] Wakeup by reset
[23:12:19.099 infoSD] SD card type SDHC, Size: 29.1GB
[23:12:19.100 listFolder] Sketch size 1.6MB
[23:12:19.249 listFolder] File: /data/configs.txt, size: 7005 bytes
[23:12:19.251 listFolder] File: /data/common.js, size: 38896 bytes
[23:12:19.254 listFolder] File: /data/MJPEG2SD.htm, size: 92KB
[23:12:19.265 listFolder] SD_MMC: 111.9MB used of 29.1GB
[23:12:19.265 loadConfig] Load config
[23:12:19.471 updateAppStatus] Enabling motion detection
[23:12:19.475 setup] PSRAM size: 8.0MB
[23:12:20.217 prepCam] Camera init OK for model OV5640 on board CAMERA_MODEL_ESP32S3_EYE_FREENOVE
[23:12:20.400 setWifiSTA] Wifi Station IP from DHCP
.[23:12:20.464 onWiFiEvent] WiFi Station connection to Cosmos, using hostname: ESP-CAM_MJPEG_5C98E222C930
[23:12:20.477 onWiFiEvent] Wifi Station IP, use 'http://10.0.0.151' to connect
[23:12:20.926 setupMdnsHost] mDNS service: http://ESP-CAM_MJPEG_5.local
[23:12:24.383 startWifi] Wifi stats for Cosmos - signal strength: -44 dBm; Encryption: WPA_WPA2_PSK; channel: 5
[23:12:24.384 startPing] Started ping monitoring - Off
[23:12:24.397 startWebServer] Starting web server on port: 80
[23:12:24.397 startWebServer] Remote server certificates not checked
[23:12:24.407 startSustainTasks] Started 1 HTTP sustain tasks
[23:12:24.408 prepUpload] File uploads will use FTP server
[23:12:24.420 prepTelegram] Telegram not being used
[23:12:24.443 updateAppStatus] Enabling motion detection
[23:12:24.512 prepRecording] To record new AVI, do one of:
[23:12:24.512 prepRecording] - press Start Recording on web page
[23:12:24.512 prepRecording] - move in front of camera

[23:12:24.523 prepRecording] Camera model OV5640 on board CAMERA_MODEL_ESP32S3_EYE_FREENOVE ready @ 20MHz
[23:12:24.533 checkMemory]  Free: heap 167572, block: 155636, min: 167512, pSRAM 3261444
[23:12:24.543 loop] =============== Total tasks: 18 ===============

[23:12:24.712 resetWatchDog] WatchDog started using task: ping
[23:12:24.713 getLocalNTP] Using NTP server: pool.ntp.org
[01:12:24.714 showLocalTime] Got current time from NTP: 30/08/2024 01:12:24 with tz: CET-1CEST,M3.5.0,M10.5.0/3
[01:12:30.368 isNight] Night time
[01:12:54.400 setAlarm] Alarm scheduled at 31/08/2024 01:00:00
[01:12:55.074 getExtIP] External IP: x.x.x.x
[01:12:55.077 doAppPing] Daily rollover

Backtrace: 0x40045f29:0x3fcc1960 0x4004652d:0x3fcc1990 0x4207602d:0x3fcc1a10 0x42008a43:0x3fcc1ae0 0x42007f8a:0x3fcc1ba0 0x40382a8e:0x3fcc1c10

ELF file SHA256: d581b2b16e998995

Rebooting...
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x42033ac8
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3818,len:0x109c
load:0x403c9700,len:0x4
load:0x403c9704,len:0xb50
load:0x403cc700,len:0x2fd0
entry 0x403c98ac

[23:13:55.434 logSetup] Setup RAM based log, size 7168, starting from 5471

... and it repeats.

Any ideas where to start looking? Is there a long-running task that doesn't yield to scheduler?

s60sc commented 2 months ago

Could you send the decoded stack trace