Copyright © https://mongoose-os.com

Mongoose OS Forum

frame

ESP32 crash during/after OTA update

nliviunliviu Romania
edited October 5 in Mongoose OS

The board is Wemos Lolin32, mos version 1.18

Config schema snippet:

 - ["debug.level", "i", 3, {title: "Debug level"}]
 - ["update.url", "s", "http://<my server ip>/ota/esp32base/fw.zip", {title : "Fetch updates form here"}]
 - ["update.interval", "i", 60, {title : "Check for updates this often"}]

Console log

[Oct  5 11:54:29.076] parse_zip_file_heade CRC32: 0xab729e1d
[Oct  5 11:54:29.082] context_remove_data  Consumed 67, 1118 left
[Oct  5 11:54:29.088] updater_set_status   Update state 1 -> 2
[Oct  5 11:54:29.094] context_save_unproce Added 1118 bytes to cached data
[Oct  5 11:54:29.107] context_update       Added 1436, size: 2554
[Oct  5 11:54:29.121] parse_manifest       FW: esp32base esp32 1.0.0_1 20171005-081705/??? -> 1.0.0_1 20171005-081705/???
[Oct  5 11:54:29.127] context_remove_data  Consumed 1351, 1203 left
[Oct  5 11:54:29.132] updater_set_status   Update state 2 -> 9
[Oct  5 11:54:29.140] updater_finish       Finished: 1 Version is the same as current
[Oct  5 11:54:29.146] context_remove_data  Consumed 1203, 0 left
[Oct  5 11:54:29.179] Guru Meditation Error of type StoreProhibited occurred on core  0. Exception was unhandled.
[Oct  5 11:54:29.179] Register dump:
[Oct  5 11:54:29.179] PC      : 0x401442ee  PS      : 0x00060b30  A0      : 0x801460cc  A1      : 0x3ffca180
[Oct  5 11:54:29.179] A2      : 0x00000000  A3      : 0x3ffca2a0  A4      : 0x00000002  A5      : 0xffffffff
[Oct  5 11:54:29.201] A6      : 0x8000001f  A7      : 0x3ffb53bc  A8      : 0x80144295  A9      : 0x3ffca160
[Oct  5 11:54:29.201] A10     : 0x000293b0  A11     : 0xffffffff  A12     : 0x00000000  A13     : 0xffffffff
[Oct  5 11:54:29.201] A14     : 0x3ffbd764  A15     : 0x00000001  SAR     : 0x00000001  EXCCAUSE: 0x0000001d
[Oct  5 11:54:29.223] EXCVADDR: 0x0000001f  LBEG    : 0x40158f84  LEND    : 0x40158fa3  LCOUNT  : 0x00000000
[Oct  5 11:54:29.223]
[Oct  5 11:54:29.223] Backtrace: 0x401442ee 0x401460c9 0x40083393 0x4014f7bd

Debug trace

Found core at 86045 - 821542
Remote debugging using 127.0.0.1:1234
Mapping IRAM: 131072 @ 0x40080000
Mapping DRAM: 335872 @ 0x3ffae000
Mapping /mongoose-os/common/platforms/esp32/rom/rom.bin at 0x40000000
Mapping .iram0.vectors: 1024 @ 0x40080000
Mapping .iram0.text: 63488 @ 0x40080400
Mapping .dram0.data: 10704 @ 0x3ffc0000
Mapping .dram0.bss: 22704 @ 0x3ffc29d0
Mapping .flash.rodata: 122848 @ 0x3f400020
Mapping .flash.text: 566677 @ 0x400d0018
Loaded core dump from last snippet in  /console.log
0x401442ee in mg_ev_mgr_lwip_process_signals (mgr=<optimized out>) at common/platforms/lwip/mg_lwip_ev_mgr.c:71
71      common/platforms/lwip/mg_lwip_ev_mgr.c: No such file or directory.
add symbol table from file "/mongoose-os/common/platforms/esp32/rom/rom.elf" at
        .text_addr = 0x40000000
Reading symbols from /mongoose-os/common/platforms/esp32/rom/rom.elf...(no debugging symbols found)...done.
(gdb) bt
#0  0x401442ee in mg_ev_mgr_lwip_process_signals (mgr=<optimized out>) at common/platforms/lwip/mg_lwip_ev_mgr.c:71
#1  0x401460cc in mg_lwip_get_poll_delay_ms (mgr=0x3ffc7f88 <s_mgr>) at common/platforms/lwip/mg_lwip_ev_mgr.c:192
#2  0x40083396 in mgos_mg_poll_cb (arg=<optimized out>) at /mongoose-os/fw/platforms/esp32/src/esp32_main.c:208
#3  0x4014f7c0 in mgos_task (arg=<optimized out>) at /mongoose-os/fw/platforms/esp32/src/esp32_main.c:278

Sometimes it only reboots after an assertion:

[Oct  5 13:58:12.103] parse_manifest       FW: esp32base esp32 1.0.0_1 20171005-081705/??? -> 1.0.0_1 20171005-081705/???
[Oct  5 13:58:12.109] context_remove_data  Consumed 1351, 1203 left
[Oct  5 13:58:12.115] updater_set_status   Update state 2 -> 9
[Oct  5 13:58:12.123] updater_finish       Finished: 1 Version is the same as current
[Oct  5 13:58:12.129] context_remove_data  Consumed 1203, 0 left
[Oct  5 13:58:12.147] assertion "!is_free(pb)" failed: file "/opt/Espressif/esp-idf/components/heap/./multi_heap.c", line 350, function: multi_heap_free
[Oct  5 13:59:13.007] ets Jun  8 2016 00:22:57
[Oct  5 13:59:13.007]
[Oct  5 13:59:13.007] rst:0x7 (TG0WDT_SYS_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[Oct  5 13:59:13.346] ets Jun  8 2016 00:22:57
[Oct  5 13:59:13.346]
[Oct  5 13:59:13.346] rst:0x7 (TG0WDT_SYS_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[Oct  5 13:59:13.346] configsip: 0, SPIWP:0xee
[Oct  5 13:59:13.346] clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[Oct  5 13:59:13.346] mode:DIO, clock div:2
[Oct  5 13:59:13.346] load:0x3fff0010,len:4
[Oct  5 13:59:13.346] load:0x3fff0014,len:5084
[Oct  5 13:59:13.352] load:0x40078000,len:0
[Oct  5 13:59:13.352] load:0x40078000,len:13040
[Oct  5 13:59:13.352] entry 0x40078b44
[Oct  5 13:59:13.377] W (89) boot: PRO CPU has been reset by WDT.
[Oct  5 13:59:13.377] W (89) boot: WDT reset info: PRO CPU PC=0x400816f0
[Oct  5 13:59:13.377] W (90) boot: WDT reset info: APP CPU PC=0x36884eca
[Oct  5 13:59:13.377] I (108) boot: ESP-IDF v1.0-2193-g953c4b6 2nd stage bootloader

The same base code runs without problems on several ESP8266.
Sometimes the firmware runs for several minutes before crashing, sometimes it works for several hours...

LE. espefuse.py output:

espefuse.py -p /dev/tty.SLAB_USBtoUART summary|grep CHIP_
CHIP_VERSION           Chip version                                      = 0 R/W (0x0)
CHIP_PACKAGE           Chip package identifier                           = 0 R/W (0x0)

Comments

Sign In or Register to comment.