ruuvi / ruuvi.gateway_esp.c

Ruuvi Gateway ESP32 code
BSD 3-Clause "New" or "Revised" License
24 stars 15 forks source link

After erasing the configuration, gateway was restarted by the panic handler (probably as a result of a race condition) #1017

Closed TheSomeMan closed 2 months ago

TheSomeMan commented 2 months ago

Affected version: v1.15.0

I (1275) ruuvi_gateway: [main/1] Checking the state of CONFIGURE button during startup: is_pressed: yes
I (1275) ruuvi_gateway: [main/1] Reset button is pressed during boot - erase settings in flash
I (1284) ruuvi_nvs: [main/1] NVS deinit partition: nvs
I (1289) ruuvi_nvs: [main/1] Erase NVS
I (1419) ruuvi_nvs: [main/1] NVS init partition: nvs
I (1422) gw_cfg: [main/1] Read file 'gw_cfg_default' from NVS
E (1423) gw_cfg: [main/1] ./main/gw_cfg_storage.c:75 {gw_cfg_storage_read_from_nvs}: Can't find config key 'gw_cfg_default' in flash, err=4354 (ESP_ERR_NVS_NOT_FOUND)
E (1435) gw_cfg: [main/1] ./main/gw_cfg_storage.c:113 {gw_cfg_storage_read_file}: Failed to read file 'gw_cfg_default' from NVS
I (1447) ruuvi_nvs: [main/1] NVS deinit partition: gw_cfg_def
I (1454) ruuvi_nvs: [main/1] Erase NVS GW_CFG_STORAGE
I (2092) ruuvi_nvs: [main/1] NVS init partition: gw_cfg_def
I (2138) ruuvi_gateway: [main/1] Restore previous MAC addr: C8:25:2D:8E:9C:2C
I (2140) settings: [main/1] ### SETTINGS: Write flag_rebooting_after_auto_update: 0
I (2144) settings: [main/1] ### SETTINGS: Write flag_force_start_wifi_hotspot: 1
I (2152) ruuvi_gateway: [main/1] Wait until the CONFIGURE button is released
I (2159) LEDS: [main/1] Notify: Cfg erased
I (2169) LEDS: [leds_task/8] LEDS: New blinking mode: RR--RR--
I (3886) reset_task: [main/1] The CONFIGURE button has been released - restart system
I (3887) wifi_manager: [main/1] Send msg: ORDER_STOP_AND_DESTROY
assertion "NULL != g_p_wifi_mutex" failed: file "./components/esp32-wifi-manager/src/wifi_manager_internal.c", line 74, function: wifi_manager_lock

abort() was called at PC 0x40202a4f on core 0

Backtrace:0x4008a560:0x3ffc3250 0x4008ad5d:0x3ffc3280 0x4009330d:0x3ffc32b0 0x40202a4f:0x3ffc3330 0x401165c5:0x3ffc3360 0x40118dea:0x3ffc3390 0x40118edc:0x3ffc33e0 0x4011944a:0x3ffc3410 0x40114709:0x3ffc3450 0x400f9f55:0x3ffc34a0 0x400d8479:0x3ffc34e0 0x400d8b9d:0x3ffc3540 0x400d90cc:0x3ffc35a0 0x400d5bbb:0x3ffc35f0 0x4008ad72:0x3ffc3620
markoaamunkajo commented 2 months ago

Multiple erase and reset button tests made, not spotted in logs