ruuvi / ruuvi.gateway_esp.c

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

Gateway reset by panic caused by wifi library on software reboot #862

Closed TheSomeMan closed 1 year ago

TheSomeMan commented 1 year ago
2023-09-10 09:28:54
E0:46:8A:12:D9:7B
PANIC
Reset by panic: abort() was called at PC 0x4008ed29 on core 0 Backtrace:0x4008a590:0x3ffc5cb0 0x4008ad8d:0x3ffc5ce0 0x4009333d:0x3ffc5d10 0x4008ed29:0x3ffc5d90 0x40138b3e:0x3ffc5dc0 0x4019c789:0x3ffc5df0 0x401916e6:0x3ffc5e10 0x4008125e:0x3ffc5e30 0x400d7db8:0x3ffc5e60 0x400f667a:0x3ffc5e90 0x400f67a4:0x3ffc5ee0 0x401646c5:0x3ffc5f30 0x4008ada2:0x3ffc5f60 ELF file SHA256: 3a47011f02436fb8 Rebooting...

2023-09-09 18:34:02
E0:46:8A:12:D9:7B
PANIC
Reset by panic: abort() was called at PC 0x4008ed29 on core 0 Backtrace:0x4008a590:0x3ffc5cb0 0x4008ad8d:0x3ffc5ce0 0x4009333d:0x3ffc5d10 0x4008ed29:0x3ffc5d90 0x40138b3e:0x3ffc5dc0 0x4019c789:0x3ffc5df0 0x401916e6:0x3ffc5e10 0x4008125e:0x3ffc5e30 0x400d7db8:0x3ffc5e60 0x400f667a:0x3ffc5e90 0x400f67a4:0x3ffc5ee0 0x401646c5:0x3ffc5f30 0x4008ada2:0x3ffc5f60 ELF file SHA256: 3a47011f02436fb8 Rebooting...

2023-09-09 11:55:32
E0:46:8A:12:D9:7B
PANIC
Reset by panic: abort() was called at PC 0x4008ed29 on core 0 Backtrace:0x4008a590:0x3ffc5cb0 0x4008ad8d:0x3ffc5ce0 0x4009333d:0x3ffc5d10 0x4008ed29:0x3ffc5d90 0x40138b3e:0x3ffc5dc0 0x4019c789:0x3ffc5df0 0x401916e6:0x3ffc5e10 0x4008125e:0x3ffc5e30 0x400d7db8:0x3ffc5e60 0x400f667a:0x3ffc5e90 0x400f67a4:0x3ffc5ee0 0x401646c5:0x3ffc5f30 0x4008ada2:0x3ffc5f60 ELF file SHA256: 3a47011f02436fb8 Rebooting...

2023-09-09 09:20:16
E0:46:8A:12:D9:7B
PANIC
Reset by panic: abort() was called at PC 0x4008ed29 on core 0 Backtrace:0x4008a590:0x3ffc5cb0 0x4008ad8d:0x3ffc5ce0 0x4009333d:0x3ffc5d10 0x4008ed29:0x3ffc5d90 0x40138b3e:0x3ffc5dc0 0x4019c789:0x3ffc5df0 0x401916e6:0x3ffc5e10 0x4008125e:0x3ffc5e30 0x400d7db8:0x3ffc5e60 0x400f667a:0x3ffc5e90 0x400f67a4:0x3ffc5ee0 0x401646c5:0x3ffc5f30 0x4008ada2:0x3ffc5f60 ELF file SHA256: 3a47011f02436fb8 Rebooting...

Call stack:

0x4008ad8d esp_system_abort
0x4009333d abort
0x4008ed29 xQueueCreateCountingSemaphore
0x40138b3e wifi_thread_semphr_get_wrapper
0x4019c789 ieee80211_ioctl
0x401916e6 esp_wifi_stop
0x4008125e esp_restart
0x400d7db8 __wrap_esp_restart
0x400f667a reset_task_handle_sig
0x400f67a4 reset_task
0x401646c5 os_task_thread_func_wrapper_without_param
0x4008ada2 vPortTaskWrapper
  1. reset_task calls esp_restart to reboot the Gateway
  2. esp_restart calls shutdown_handlers, which should call all registered handler
  3. One of the shutdown handlers is esp_wifi_stop
  4. Next steps: ieee80211_ioctl -> wifi_thread_semphr_get_wrapper -> xQueueCreateCountingSemaphore -> abort

xQueueCreateCountingSemaphore calls abort only if memory allocation fails.

markoaamunkajo commented 1 year ago

QA passed