espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.72k stars 7.3k forks source link

Crash when calling `esp_http_client_init()` (IDFGH-11827) #12920

Closed gamename closed 10 months ago

gamename commented 10 months ago

Answers checklist.

IDF version.

v5.3-dev-796-g30870c819f

Espressif SoC revision.

ESP32-D0WD-V3 (revision v3.1)

Operating System used.

macOS

How did you build your project?

Command line with CMake

If you are using Windows, please specify command line type.

None

Development Kit.

ESP32-WROOM-32D

Power Supply used.

USB

What is the expected behavior?

Sending an HTTPS POST message

What is the actual behavior?

intermittent crash when reading the esp_http_client_config_t client config

Steps to reproduce.

  1. Flash the image
  2. Try to send a POST to and HTTPS address
  3. About 3 out of 5 times, you'll get a crash

The code is here, so I suspect something is not correct in my config.

Debug Logs.

Executing action: flash
Running cmake in directory /Users/tennis/src/esp32-mailbox-reed-switch-sensor/build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DPYTHON=/Users/tennis/.espressif/python_env/idf5.3_py3.11_env/bin/python -DESP_PLATFORM=1 -DCCACHE_ENABLE=0 /Users/tennis/src/esp32-mailbox-reed-switch-sensor"...
-- Building ESP-IDF components for target esp32
-- Project sdkconfig file /Users/tennis/src/esp32-mailbox-reed-switch-sensor/sdkconfig
-- Compiler supported targets: xtensa-esp-elf
-- Found Python3: /Users/tennis/.espressif/python_env/idf5.3_py3.11_env/bin/python (found version "3.11.6") found components: Interpreter
-- App "esp32-mailbox-reed-switch-senso" version: edf23b1
-- Adding linker script /Users/tennis/src/esp32-mailbox-reed-switch-sensor/build/esp-idf/esp_system/ld/memory.ld
-- Adding linker script /Users/tennis/esp/esp-idf/components/esp_system/ld/esp32/sections.ld.in
-- Adding linker script /Users/tennis/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script /Users/tennis/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.api.ld
-- Adding linker script /Users/tennis/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script /Users/tennis/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld
-- Adding linker script /Users/tennis/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld
-- Adding linker script /Users/tennis/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script /Users/tennis/esp/esp-idf/components/soc/esp32/ld/esp32.peripherals.ld
-- Components: app_trace app_update bootloader bootloader_support bt cmock console cxx driver efuse esp-tls esp_adc esp_app_format esp_bootloader_format esp_coex esp_common esp_driver_ana_cmpr esp_driver_dac esp_driver_gpio esp_driver_gptimer esp_driver_i2s esp_driver_mcpwm esp_driver_pcnt esp_driver_rmt esp_driver_sdio esp_driver_sdm esp_driver_sdmmc esp_driver_sdspi esp_driver_spi esp_driver_tsens esp_eth esp_event esp_gdbstub esp_hid esp_http_client esp_http_server esp_https_ota esp_https_server esp_hw_support esp_lcd esp_local_ctrl esp_mm esp_netif esp_netif_stack esp_partition esp_phy esp_pm esp_psram esp_ringbuf esp_rom esp_system esp_timer esp_wifi espcoredump esptool_py fatfs freertos gpio_manager hal heap http_manager http_parser idf_test ieee802154 json log lwip main mbedtls mqtt newlib nvs_flash nvs_sec_provider openthread ota_manager partition_table perfmon protobuf-c protocomm pthread sdmmc secrets_manager soc spi_flash spiffs tcp_transport time_manager ulp unity usb vfs wear_levelling wifi_manager wifi_provisioning wpa_supplicant xtensa
-- Component paths: /Users/tennis/esp/esp-idf/components/app_trace /Users/tennis/esp/esp-idf/components/app_update /Users/tennis/esp/esp-idf/components/bootloader /Users/tennis/esp/esp-idf/components/bootloader_support /Users/tennis/esp/esp-idf/components/bt /Users/tennis/esp/esp-idf/components/cmock /Users/tennis/esp/esp-idf/components/console /Users/tennis/esp/esp-idf/components/cxx /Users/tennis/esp/esp-idf/components/driver /Users/tennis/esp/esp-idf/components/efuse /Users/tennis/esp/esp-idf/components/esp-tls /Users/tennis/esp/esp-idf/components/esp_adc /Users/tennis/esp/esp-idf/components/esp_app_format /Users/tennis/esp/esp-idf/components/esp_bootloader_format /Users/tennis/esp/esp-idf/components/esp_coex /Users/tennis/esp/esp-idf/components/esp_common /Users/tennis/esp/esp-idf/components/esp_driver_ana_cmpr /Users/tennis/esp/esp-idf/components/esp_driver_dac /Users/tennis/esp/esp-idf/components/esp_driver_gpio /Users/tennis/esp/esp-idf/components/esp_driver_gptimer /Users/tennis/esp/esp-idf/components/esp_driver_i2s /Users/tennis/esp/esp-idf/components/esp_driver_mcpwm /Users/tennis/esp/esp-idf/components/esp_driver_pcnt /Users/tennis/esp/esp-idf/components/esp_driver_rmt /Users/tennis/esp/esp-idf/components/esp_driver_sdio /Users/tennis/esp/esp-idf/components/esp_driver_sdm /Users/tennis/esp/esp-idf/components/esp_driver_sdmmc /Users/tennis/esp/esp-idf/components/esp_driver_sdspi /Users/tennis/esp/esp-idf/components/esp_driver_spi /Users/tennis/esp/esp-idf/components/esp_driver_tsens /Users/tennis/esp/esp-idf/components/esp_eth /Users/tennis/esp/esp-idf/components/esp_event /Users/tennis/esp/esp-idf/components/esp_gdbstub /Users/tennis/esp/esp-idf/components/esp_hid /Users/tennis/esp/esp-idf/components/esp_http_client /Users/tennis/esp/esp-idf/components/esp_http_server /Users/tennis/esp/esp-idf/components/esp_https_ota /Users/tennis/esp/esp-idf/components/esp_https_server /Users/tennis/esp/esp-idf/components/esp_hw_support /Users/tennis/esp/esp-idf/components/esp_lcd /Users/tennis/esp/esp-idf/components/esp_local_ctrl /Users/tennis/esp/esp-idf/components/esp_mm /Users/tennis/esp/esp-idf/components/esp_netif /Users/tennis/esp/esp-idf/components/esp_netif_stack /Users/tennis/esp/esp-idf/components/esp_partition /Users/tennis/esp/esp-idf/components/esp_phy /Users/tennis/esp/esp-idf/components/esp_pm /Users/tennis/esp/esp-idf/components/esp_psram /Users/tennis/esp/esp-idf/components/esp_ringbuf /Users/tennis/esp/esp-idf/components/esp_rom /Users/tennis/esp/esp-idf/components/esp_system /Users/tennis/esp/esp-idf/components/esp_timer /Users/tennis/esp/esp-idf/components/esp_wifi /Users/tennis/esp/esp-idf/components/espcoredump /Users/tennis/esp/esp-idf/components/esptool_py /Users/tennis/esp/esp-idf/components/fatfs /Users/tennis/esp/esp-idf/components/freertos /Users/tennis/src/esp32-mailbox-reed-switch-sensor/components/gpio_manager /Users/tennis/esp/esp-idf/components/hal /Users/tennis/esp/esp-idf/components/heap /Users/tennis/src/esp32-mailbox-reed-switch-sensor/components/http_manager /Users/tennis/esp/esp-idf/components/http_parser /Users/tennis/esp/esp-idf/components/idf_test /Users/tennis/esp/esp-idf/components/ieee802154 /Users/tennis/esp/esp-idf/components/json /Users/tennis/esp/esp-idf/components/log /Users/tennis/esp/esp-idf/components/lwip /Users/tennis/src/esp32-mailbox-reed-switch-sensor/main /Users/tennis/esp/esp-idf/components/mbedtls /Users/tennis/esp/esp-idf/components/mqtt /Users/tennis/esp/esp-idf/components/newlib /Users/tennis/esp/esp-idf/components/nvs_flash /Users/tennis/esp/esp-idf/components/nvs_sec_provider /Users/tennis/esp/esp-idf/components/openthread /Users/tennis/src/esp32-mailbox-reed-switch-sensor/components/ota_manager /Users/tennis/esp/esp-idf/components/partition_table /Users/tennis/esp/esp-idf/components/perfmon /Users/tennis/esp/esp-idf/components/protobuf-c /Users/tennis/esp/esp-idf/components/protocomm /Users/tennis/esp/esp-idf/components/pthread /Users/tennis/esp/esp-idf/components/sdmmc /Users/tennis/src/esp32-mailbox-reed-switch-sensor/components/secrets_manager /Users/tennis/esp/esp-idf/components/soc /Users/tennis/esp/esp-idf/components/spi_flash /Users/tennis/esp/esp-idf/components/spiffs /Users/tennis/esp/esp-idf/components/tcp_transport /Users/tennis/src/esp32-mailbox-reed-switch-sensor/components/time_manager /Users/tennis/esp/esp-idf/components/ulp /Users/tennis/esp/esp-idf/components/unity /Users/tennis/esp/esp-idf/components/usb /Users/tennis/esp/esp-idf/components/vfs /Users/tennis/esp/esp-idf/components/wear_levelling /Users/tennis/src/esp32-mailbox-reed-switch-sensor/components/wifi_manager /Users/tennis/esp/esp-idf/components/wifi_provisioning /Users/tennis/esp/esp-idf/components/wpa_supplicant /Users/tennis/esp/esp-idf/components/xtensa
-- Configuring done (4.3s)
-- Generating done (0.6s)
-- Build files have been written to: /Users/tennis/src/esp32-mailbox-reed-switch-sensor/build
Serial port /dev/cu.usbserial-0001
Connecting..........
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting.......
Detecting chip type... ESP32
Running ninja in directory /Users/tennis/src/esp32-mailbox-reed-switch-sensor/build
Executing "ninja flash"...
[3/12] Performing configure step for 'bootloader'
-- Building ESP-IDF components for target esp32
-- Project sdkconfig file /Users/tennis/src/esp32-mailbox-reed-switch-sensor/sdkconfig
-- Compiler supported targets: xtensa-esp-elf
-- Adding linker script /Users/tennis/esp/esp-idf/components/soc/esp32/ld/esp32.peripherals.ld
-- Bootloader project name: "bootloader" version: 1
-- Adding linker script /Users/tennis/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script /Users/tennis/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.api.ld
-- Adding linker script /Users/tennis/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script /Users/tennis/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script /Users/tennis/esp/esp-idf/components/bootloader/subproject/main/ld/esp32/bootloader.ld
-- Adding linker script /Users/tennis/esp/esp-idf/components/bootloader/subproject/main/ld/esp32/bootloader.rom.ld
-- Components: bootloader bootloader_support efuse esp_app_format esp_bootloader_format esp_common esp_hw_support esp_rom esp_system esptool_py freertos hal log main micro-ecc newlib partition_table soc spi_flash xtensa
-- Component paths: /Users/tennis/esp/esp-idf/components/bootloader /Users/tennis/esp/esp-idf/components/bootloader_support /Users/tennis/esp/esp-idf/components/efuse /Users/tennis/esp/esp-idf/components/esp_app_format /Users/tennis/esp/esp-idf/components/esp_bootloader_format /Users/tennis/esp/esp-idf/components/esp_common /Users/tennis/esp/esp-idf/components/esp_hw_support /Users/tennis/esp/esp-idf/components/esp_rom /Users/tennis/esp/esp-idf/components/esp_system /Users/tennis/esp/esp-idf/components/esptool_py /Users/tennis/esp/esp-idf/components/freertos /Users/tennis/esp/esp-idf/components/hal /Users/tennis/esp/esp-idf/components/log /Users/tennis/esp/esp-idf/components/bootloader/subproject/main /Users/tennis/esp/esp-idf/components/bootloader/subproject/components/micro-ecc /Users/tennis/esp/esp-idf/components/newlib /Users/tennis/esp/esp-idf/components/partition_table /Users/tennis/esp/esp-idf/components/soc /Users/tennis/esp/esp-idf/components/spi_flash /Users/tennis/esp/esp-idf/components/xtensa
-- Configuring done (3.1s)
-- Generating done (0.1s)
-- Build files have been written to: /Users/tennis/src/esp32-mailbox-reed-switch-sensor/build/bootloader
[1/1] cd /Users/tennis/src/esp32-mailbox-reed-switch-sensor/build/bootloader/esp-idf/esptool_py && /Users/t...0x8000 bootloader 0x1000 /Users/tennis/src/esp32-mailbox-reed-switch-sensor/build/bootloader/bootloader.bin
Bootloader binary size 0x6810 bytes. 0x7f0 bytes (7%) free.
[10/12] Generating binary image from built executable
esptool.py v4.7.dev3
Creating esp32 image...
Merged 2 ELF sections
Successfully created esp32 image.
Generated /Users/tennis/src/esp32-mailbox-reed-switch-sensor/build/esp32-mailbox-reed-switch-sensor.bin
[11/12] cd /Users/tennis/src/esp32-mailbox-reed-switch-sensor/build/esp-idf/esptool_py && /Users/tennis/.es...ion-table.bin /Users/tennis/src/esp32-mailbox-reed-switch-sensor/build/esp32-mailbox-reed-switch-sensor.bin
esp32-mailbox-reed-switch-sensor.bin binary size 0xe2db0 bytes. Smallest app partition is 0x100000 bytes. 0x1d250 bytes (11%) free.
[11/12] cd /Users/tennis/esp/esp-idf/components/esptool_py && /usr/local/Cellar/cmake/3.28.0/bin/cmake -D I...2-mailbox-reed-switch-sensor/build -P /Users/tennis/esp/esp-idf/components/esptool_py/run_serial_tool.cmake
esptool.py --chip esp32 -p /dev/cu.usbserial-0001 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 4MB 0x1000 bootloader/bootloader.bin 0x10000 esp32-mailbox-reed-switch-sensor.bin 0x8000 partition_table/partition-table.bin 0xe000 ota_data_initial.bin
esptool.py v4.7.dev3
Serial port /dev/cu.usbserial-0001
Connecting.......
Chip is ESP32-D0WD-V3 (revision v3.1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 24:dc:c3:c4:bc:c8
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Flash will be erased from 0x00001000 to 0x00007fff...
Flash will be erased from 0x00010000 to 0x000f2fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Compressed 26640 bytes to 16341...
Writing at 0x00001000... (100 %)
Wrote 26640 bytes (16341 compressed) at 0x00001000 in 0.9 seconds (effective 242.3 kbit/s)...
Hash of data verified.
Compressed 929200 bytes to 578062...
Writing at 0x000f11e9... (100 %)
Wrote 929200 bytes (578062 compressed) at 0x00010000 in 13.8 seconds (effective 537.0 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 129...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (129 compressed) at 0x00008000 in 0.1 seconds (effective 310.3 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 31...
Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (31 compressed) at 0x0000e000 in 0.2 seconds (effective 387.1 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
Executing action: monitor
Running idf_monitor in directory /Users/tennis/src/esp32-mailbox-reed-switch-sensor
Executing "/Users/tennis/.espressif/python_env/idf5.3_py3.11_env/bin/python /Users/tennis/esp/esp-idf/tools/idf_monitor.py -p /dev/cu.usbserial-0001 -b 115200 --toolchain-prefix xtensa-esp32-elf- --decode-coredumps info --target esp32 --revision 0 /Users/tennis/src/esp32-mailbox-reed-switch-sensor/build/esp32-mailbox-reed-switch-sensor.elf -m '/Users/tennis/.espressif/python_env/idf5.3_py3.11_env/bin/python' '/Users/tennis/esp/esp-idf/tools/idf.py'"...
--- esp-idf-monitor 1.3.4 on /dev/cu.usbserial-0001 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
0x00
mode:D� clock div:2
load:0x3fff0030,len�ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:7140
load:0x40078000,len:15500
load:0x40080400,len:4
0x40080400: _init at ??:?

load:0x40080404,len:3904
entry 0x40080640
I (29) boot: ESP-IDF v5.3-dev-796-g30870c819f-dirty 2nd stage bootloader
I (29) boot: compile time Jan  2 2024 19:57:00
I (32) boot: Multicore bootloader
I (36) boot: chip revision: v3.1
I (39) boot.esp32: SPI Speed      : 40MHz
I (44) boot.esp32: SPI Mode       : DIO
I (49) boot.esp32: SPI Flash Size : 4MB
I (53) boot: Enabling RNG early entropy source...
I (59) boot: Partition Table:
I (62) boot: ## Label            Usage          Type ST Offset   Length
I (69) boot:  0 nvs              WiFi data        01 02 00009000 00005000
I (77) boot:  1 otadata          OTA data         01 00 0000e000 00002000
I (84) boot:  2 app0             OTA app          00 10 00010000 00100000
I (92) boot:  3 app1             OTA app          00 11 00110000 00100000
I (99) boot:  4 coredump         Unknown data     01 03 00210000 00010000
I (107) boot: End of partition table
I (111) boot: No factory image, trying OTA 0
I (116) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=29400h (168960) map
I (183) esp_image: segment 1: paddr=00039428 vaddr=3ffb0000 size=041e8h ( 16872) load
I (189) esp_image: segment 2: paddr=0003d618 vaddr=40080000 size=02a00h ( 10752) load
I (193) esp_image: segment 3: paddr=00040020 vaddr=400d0020 size=9dcb0h (646320) map
I (418) esp_image: segment 4: paddr=000ddcd8 vaddr=40082a00 size=150a8h ( 86184) load
I (464) boot: Loaded app from partition at offset 0x10000
I (512) boot: Set actual ota_seq=1 in otadata[0]
I (512) boot: Disabling RNG early entropy source...
I (523) cpu_start: Multicore app
I (532) cpu_start: Pro cpu start user code
I (532) cpu_start: cpu freq: 160000000 Hz
I (532) cpu_start: Application information:
I (535) cpu_start: Project name:     esp32-mailbox-reed-switch-senso
I (542) cpu_start: App version:      edf23b1
I (547) cpu_start: Compile time:     Jan  2 2024 20:17:40
I (553) cpu_start: ELF file SHA256:  b016a9c24...
I (558) cpu_start: ESP-IDF:          v5.3-dev-796-g30870c819f-dirty
I (565) cpu_start: Min chip rev:     v0.0
I (570) cpu_start: Max chip rev:     v3.99
I (575) cpu_start: Chip rev:         v3.1
I (580) heap_init: Initializing. RAM available for dynamic allocation:
I (587) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (593) heap_init: At 3FFB9758 len 000268A8 (154 KiB): DRAM
I (599) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (605) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (612) heap_init: At 40097AA8 len 00008558 (33 KiB): IRAM
I (620) spi_flash: detected chip: generic
I (623) spi_flash: flash io: dio
I (627) esp_core_dump_uart: Init core dump to UART
I (633) main_task: Started on CPU0
I (643) main_task: Calling app_main()
I (643) MAIN: NVS Init
I (673) MAIN: Parse secrets file
I (673) MAIN: Gather Wi-Fi credentials
I (673) MAIN: Wi-Fi credentials OK. Starting Wi-Fi
I (693) wifi:wifi driver task: 3ffc5000, prio:23, stack:6656, core=0
I (703) wifi:wifi firmware version: 44c86e3
I (713) wifi:wifi certification version: v7.0
I (713) wifi:config NVS flash: enabled
I (713) wifi:config nano formating: disabled
I (713) wifi:Init data frame dynamic rx buffer num: 32
I (713) wifi:Init static rx mgmt buffer num: 5
I (723) wifi:Init management short buffer num: 32
I (723) wifi:Init dynamic tx buffer num: 32
I (733) wifi:Init static rx buffer size: 1600
I (733) wifi:Init static rx buffer num: 10
I (733) wifi:Init dynamic rx buffer num: 32
I (743) wifi_init: rx ba win: 6
I (743) wifi_init: tcpip mbox: 32
I (753) wifi_init: udp mbox: 6
I (753) wifi_init: tcp mbox: 6
I (753) wifi_init: tcp tx win: 5760
I (763) wifi_init: tcp rx win: 5760
I (763) wifi_init: tcp mss: 1440
I (773) wifi_init: WiFi IRAM OP enabled
I (773) wifi_init: WiFi RX IRAM OP enabled
I (783) WIFI_MANAGER: ssid: disconnected
I (783) WIFI_MANAGER: password: M0nkum0nku
I (793) phy_init: phy_version 4780,16b31a7,Sep 22 2023,20:42:16
I (873) wifi:mode : sta (24:dc:c3:c4:bc:c8)
I (873) wifi:enable tsf
E (883) wifi:sta is connecting, return error
I (893) wifi:new:<6,0>, old:<1,0>, ap:<255,255>, sta:<6,0>, prof:1
I (893) wifi:state: init -> auth (b0)
I (903) wifi:state: auth -> assoc (0)
I (913) wifi:state: assoc -> run (10)
I (953) wifi:connected with disconnected, aid = 17, channel 6, BW20, bssid = 98:da:c4:f2:b2:d4
I (953) wifi:security: WPA2-PSK, phy: bgn, rssi: -45
I (953) wifi:pm start, type: 1

I (953) wifi:dp: 1, bi: 102400, li: 3, scale listen interval from 307200 us to 307200 us
I (973) wifi:<ba-add>idx:0 (ifx:0, 98:da:c4:f2:b2:d4), tid:0, ssn:0, winSize:64
I (1053) wifi:AP's beacon interval = 102400 us, DTIM period = 1
I (1963) esp_netif_handlers: sta ip: 192.168.0.182, mask: 255.255.255.0, gw: 192.168.0.1
I (1963) WIFI_MANAGER: Successfully connected to SSID:disconnected
I (1963) WIFI_MANAGER: Connected to WiFi
I (1973) TIME_MANAGER: Initializing SNTP
I (1973) TIME_MANAGER: Waiting for system time to be set... (1/10)
I (3983) TIME_MANAGER: Waiting for system time to be set... (2/10)
I (4453) wifi:<ba-add>idx:1 (ifx:0, 98:da:c4:f2:b2:d4), tid:2, ssn:0, winSize:64
I (5983) MAIN: GPIO Init
I (5983) gpio: GPIO[2]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (5983) MAIN: Getting REST API URL
I (5983) MAIN: Begin reed switch monitoring
I (5993) MAIN: Reed switch OPEN
I (5993) HTTP_MANAGER: URL: https://y5dlyh7fgixjlhacpy34dgmenq0eyoht.lambda-url.us-east-1.on.aws/open

assert failed: block_locate_free tlsf.c:566 (block_size(block) >= size)
HINT: CORRUPT HEAP: heap metadata corrupted resulting in TLSF malfunction.
Make sure you are not making out of bound writing on the memory you allocate in your application.
Make sure you are not writing on freed memory.
For more information run 'idf.py docs -sp api-reference/system/heap_debug.html'.

Backtrace: 0x40081ae2:0x3ffbf5f0 0x40089795:0x3ffbf610 0x40091e09:0x3ffbf630 0x4008f0d8:0x3ffbf750 0x4008ea9d:0x3ffbf770 0x400820e7:0x3ffbf790 0x40082164:0x3ffbf7b0 0x40082199:0x3ffbf7d0 0x400827df:0x3ffbf7f0 0x400828bf:0x3ffbf840 0x4013a63a:0x3ffbf860 0x4013ad4f:0x3ffbf890 0x4013af7f:0x3ffbf8c0 0x400f9e61:0x3ffbf8f0 0x400d9877:0x3ffbf920 0x400d991b:0x3ffbfae0 0x4008a2a2:0x3ffbfd00
0x40081ae2: panic_abort at /Users/tennis/esp/esp-idf/components/esp_system/panic.c:472

0x40089795: esp_system_abort at /Users/tennis/esp/esp-idf/components/esp_system/port/esp_system_chip.c:93

0x40091e09: __assert_func at /Users/tennis/esp/esp-idf/components/newlib/assert.c:81

0x4008f0d8: block_locate_free at /Users/tennis/esp/esp-idf/components/heap/tlsf/tlsf.c:566 (discriminator 1)
 (inlined by) tlsf_malloc at /Users/tennis/esp/esp-idf/components/heap/tlsf/tlsf.c:1005 (discriminator 1)

0x4008ea9d: multi_heap_malloc_impl at /Users/tennis/esp/esp-idf/components/heap/multi_heap.c:210

0x400820e7: heap_caps_malloc_base at /Users/tennis/esp/esp-idf/components/heap/heap_caps.c:179

0x40082164: heap_caps_malloc at /Users/tennis/esp/esp-idf/components/heap/heap_caps.c:202

0x40082199: heap_caps_malloc_default at /Users/tennis/esp/esp-idf/components/heap/heap_caps.c:228

0x400827df: trace_malloc at /Users/tennis/esp/esp-idf/components/heap/include/heap_trace.inc:119

0x400828bf: __wrap_calloc at /Users/tennis/esp/esp-idf/components/heap/include/heap_trace.inc:197

0x4013a63a: esp_transport_init at /Users/tennis/esp/esp-idf/components/tcp_transport/transport.c:94

0x4013ad4f: esp_transport_base_init at /Users/tennis/esp/esp-idf/components/tcp_transport/transport_ssl.c:496

0x4013af7f: esp_transport_ssl_init at /Users/tennis/esp/esp-idf/components/tcp_transport/transport_ssl.c:515

0x400f9e61: esp_http_client_init at /Users/tennis/esp/esp-idf/components/esp_http_client/esp_http_client.c:706

0x400d9877: http_post_to_aws_api_gateway at /Users/tennis/src/esp32-mailbox-reed-switch-sensor/components/http_manager/http_manager.c:153

0x400d991b: http_manager_task at /Users/tennis/src/esp32-mailbox-reed-switch-sensor/components/http_manager/http_manager.c:62

0x4008a2a2: vPortTaskWrapper at /Users/tennis/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:134

ELF file SHA256: b016a9c24

Initiating core dump!
I (6051) esp_core_dump_uart: Press Enter to print core dump to UART...
I (6058) esp_core_dump_uart: Print core dump to uart...
Core dump started (further output muted)
Received  23 kB...
Core dump finished!
===============================================================
==================== ESP32 CORE DUMP START ====================
The ROM ELF file won't load automatically since it was not found for the provided chip type.

Crashed task handle: 0x3ffbfd90, name: 'http_manager_ta', GDB name: 'process 1073479056'
Crashed task is not in the interrupt context
Panic reason: assert failed: block_locate_free tlsf.c:566 (block_size(block) >= size)
HINT: CORRUPT HEAP: heap metadata corrupted resulting in TLSF malfunction.
Make sure you are not making out of bound writing on the memory you allocate in your application.
Make sure you are not writing on freed memory.
For more information run 'idf.py docs -sp api-reference/system/heap_debug.html'.

================== CURRENT THREAD REGISTERS ===================
exccause       0x1d (StoreProhibitedCause)
excvaddr       0x0
epc1           0x4008850f
epc2           0x0
epc3           0x0
epc4           0x0
epc5           0x0
epc6           0x0
eps2           0x0
eps3           0x0
eps4           0x0
eps5           0x0
eps6           0x0
pc             0x40081ae5          0x40081ae5 <panic_abort+21>
lbeg           0x4000c28c          1073791628
lend           0x4000c296          1073791638
lcount         0x0                 0
sar            0x18                24
ps             0x60b23             396067
threadptr      <unavailable>
br             <unavailable>
scompare1      <unavailable>
acclo          <unavailable>
acchi          <unavailable>
m0             <unavailable>
m1             <unavailable>
m2             <unavailable>
m3             <unavailable>
expstate       <unavailable>
f64r_lo        <unavailable>
f64r_hi        <unavailable>
f64s           <unavailable>
fcr            <unavailable>
fsr            <unavailable>
a0             0x80089798          -2146920552
a1             0x3ffbf5f0          1073477104
a2             0x3ffbf63b          1073477179
a3             0x3                 3
a4             0xa                 10
a5             0x3ffbf864          1073477732
a6             0x40                64
a7             0x394c38f8          961296632
a8             0x0                 0
a9             0x1                 1
a10            0x28                40
a11            0x3ffbf703          1073477379
a12            0x1                 1
a13            0x3ffbf7d0          1073477584
a14            0x5                 5
a15            0x40                64

==================== CURRENT THREAD STACK =====================
#0  0x40081ae5 in panic_abort (details=0x3ffbf63b "assert failed: block_locate_free tlsf.c:566 (block_size(block) >= size)") at /Users/tennis/esp/esp-idf/components/esp_system/panic.c:472
HINT: CORRUPT HEAP: heap metadata corrupted resulting in TLSF malfunction.
Make sure you are not making out of bound writing on the memory you allocate in your application.
Make sure you are not writing on freed memory.
For more information run 'idf.py docs -sp api-reference/system/heap_debug.html'.
#1  0x40089798 in esp_system_abort (details=0x3ffbf63b "assert failed: block_locate_free tlsf.c:566 (block_size(block) >= size)") at /Users/tennis/esp/esp-idf/components/esp_system/port/esp_system_chip.c:93
HINT: CORRUPT HEAP: heap metadata corrupted resulting in TLSF malfunction.
Make sure you are not making out of bound writing on the memory you allocate in your application.
Make sure you are not writing on freed memory.
For more information run 'idf.py docs -sp api-reference/system/heap_debug.html'.
#2  0x40091e0c in __assert_func (file=0x3f40133b "tlsf.c", line=<optimized out>, func=<optimized out>, expr=0x3f4016c0 "block_size(block) >= size") at /Users/tennis/esp/esp-idf/components/newlib/assert.c:81
#3  0x4008f0db in block_locate_free (size=<optimized out>, control=<optimized out>) at /Users/tennis/esp/esp-idf/components/heap/tlsf/tlsf.c:566
#4  tlsf_malloc (tlsf=0x3ffb976c, size=<optimized out>) at /Users/tennis/esp/esp-idf/components/heap/tlsf/tlsf.c:1005
#5  0x4008eaa0 in multi_heap_malloc_impl (heap=0x3ffb9758, size=68) at /Users/tennis/esp/esp-idf/components/heap/multi_heap.c:210
#6  0x400820ea in heap_caps_malloc_base (size=64, caps=6144) at /Users/tennis/esp/esp-idf/components/heap/heap_caps.c:179
#7  0x40082167 in heap_caps_malloc (size=64, caps=6144) at /Users/tennis/esp/esp-idf/components/heap/heap_caps.c:202
#8  0x4008219c in heap_caps_malloc_default (size=64) at /Users/tennis/esp/esp-idf/components/heap/heap_caps.c:228
#9  0x400827e2 in trace_malloc (size=64, caps=0, mode=TRACE_MALLOC_DEFAULT) at /Users/tennis/esp/esp-idf/components/heap/include/heap_trace.inc:119
#10 0x400828c2 in __wrap_calloc (nmemb=1, size=64) at /Users/tennis/esp/esp-idf/components/heap/include/heap_trace.inc:197
#11 0x4013a63d in esp_transport_init () at /Users/tennis/esp/esp-idf/components/tcp_transport/transport.c:94
#12 0x4013ad52 in esp_transport_base_init () at /Users/tennis/esp/esp-idf/components/tcp_transport/transport_ssl.c:496
#13 0x4013af82 in esp_transport_ssl_init () at /Users/tennis/esp/esp-idf/components/tcp_transport/transport_ssl.c:515
#14 0x400f9e64 in esp_http_client_init (config=0x3ffbfa30) at /Users/tennis/esp/esp-idf/components/esp_http_client/esp_http_client.c:705
#15 0x400d987a in http_post_to_aws_api_gateway (host=0x3ffbfae0 "y5dlyh7fgixjlhacpy34dgmenq0eyoht.lambda-url.us-east-1.on.aws", path=0x3ffbfbe0 "open") at /Users/tennis/src/esp32-mailbox-reed-switch-sensor/components/http_manager/http_manager.c:153
#16 0x400d991e in http_manager_task (pvParameters=0x0) at /Users/tennis/src/esp32-mailbox-reed-switch-sensor/components/http_manager/http_manager.c:62
#17 0x4008a2a5 in vPortTaskWrapper (pxCode=0x400d9904 <http_manager_task>, pvParameters=0x0) at /Users/tennis/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:134

======================== THREADS INFO =========================
  Id   Target Id          Frame
* 1    process 1073479056 0x40081ae5 in panic_abort (details=0x3ffbf63b "assert failed: block_locate_free tlsf.c:566 (block_size(block) >= size)") at /Users/tennis/esp/esp-idf/components/esp_system/panic.c:472
HINT: CORRUPT HEAP: heap metadata corrupted resulting in TLSF malfunction.
Make sure you are not making out of bound writing on the memory you allocate in your application.
Make sure you are not writing on freed memory.
For more information run 'idf.py docs -sp api-reference/system/heap_debug.html'.
  2    process 1073413412 0x4000bff0 in ?? ()
  3    process 1073413760 0x400884ee in esp_cpu_wait_for_intr () at /Users/tennis/esp/esp-idf/components/esp_hw_support/cpu.c:145
  4    process 1073465132 0x400884ee in esp_cpu_wait_for_intr () at /Users/tennis/esp/esp-idf/components/esp_hw_support/cpu.c:145
  5    process 1073489756 0x4000bff0 in ?? ()
  6    process 1073411264 0x4000bff0 in ?? ()
  7    process 1073412644 0x4000bff0 in ?? ()
  8    process 1073485012 0x4000bff0 in ?? ()
  9    process 1073412992 0x4000bff0 in ?? ()
  10   process 1073500160 0x4000bff0 in ?? ()

       TCB             NAME PRIO C/B  STACK USED/FREE
---------- ---------------- -------- ----------------
0x3ffbfd90  http_manager_ta      5/5        2640/5544
0x3ffafd24             main      1/1        1440/2652
0x3ffafe80            IDLE0      0/0         416/1108
0x3ffbc72c            IDLE1      0/0         416/1116
0x3ffc275c              tiT    18/18         560/3020
0x3ffaf4c0             ipc0    24/24          448/568
0x3ffafa24             ipc1    24/24          448/564
0x3ffc14d4          sys_evt    20/20         528/2276
0x3ffafb80        esp_timer    22/22         432/3652
0x3ffc5000             wifi    23/23         512/6136

==================== THREAD 1 (TCB: 0x3ffbfd90, name: 'http_manager_ta') =====================
#0  0x40081ae5 in panic_abort (details=0x3ffbf63b "assert failed: block_locate_free tlsf.c:566 (block_size(block) >= size)") at /Users/tennis/esp/esp-idf/components/esp_system/panic.c:472
HINT: CORRUPT HEAP: heap metadata corrupted resulting in TLSF malfunction.
Make sure you are not making out of bound writing on the memory you allocate in your application.
Make sure you are not writing on freed memory.
For more information run 'idf.py docs -sp api-reference/system/heap_debug.html'.
#1  0x40089798 in esp_system_abort (details=0x3ffbf63b "assert failed: block_locate_free tlsf.c:566 (block_size(block) >= size)") at /Users/tennis/esp/esp-idf/components/esp_system/port/esp_system_chip.c:93
HINT: CORRUPT HEAP: heap metadata corrupted resulting in TLSF malfunction.
Make sure you are not making out of bound writing on the memory you allocate in your application.
Make sure you are not writing on freed memory.
For more information run 'idf.py docs -sp api-reference/system/heap_debug.html'.
#2  0x40091e0c in __assert_func (file=0x3f40133b "tlsf.c", line=<optimized out>, func=<optimized out>, expr=0x3f4016c0 "block_size(block) >= size") at /Users/tennis/esp/esp-idf/components/newlib/assert.c:81
#3  0x4008f0db in block_locate_free (size=<optimized out>, control=<optimized out>) at /Users/tennis/esp/esp-idf/components/heap/tlsf/tlsf.c:566
#4  tlsf_malloc (tlsf=0x3ffb976c, size=<optimized out>) at /Users/tennis/esp/esp-idf/components/heap/tlsf/tlsf.c:1005
#5  0x4008eaa0 in multi_heap_malloc_impl (heap=0x3ffb9758, size=68) at /Users/tennis/esp/esp-idf/components/heap/multi_heap.c:210
#6  0x400820ea in heap_caps_malloc_base (size=64, caps=6144) at /Users/tennis/esp/esp-idf/components/heap/heap_caps.c:179
#7  0x40082167 in heap_caps_malloc (size=64, caps=6144) at /Users/tennis/esp/esp-idf/components/heap/heap_caps.c:202
#8  0x4008219c in heap_caps_malloc_default (size=64) at /Users/tennis/esp/esp-idf/components/heap/heap_caps.c:228
#9  0x400827e2 in trace_malloc (size=64, caps=0, mode=TRACE_MALLOC_DEFAULT) at /Users/tennis/esp/esp-idf/components/heap/include/heap_trace.inc:119
#10 0x400828c2 in __wrap_calloc (nmemb=1, size=64) at /Users/tennis/esp/esp-idf/components/heap/include/heap_trace.inc:197
#11 0x4013a63d in esp_transport_init () at /Users/tennis/esp/esp-idf/components/tcp_transport/transport.c:94
#12 0x4013ad52 in esp_transport_base_init () at /Users/tennis/esp/esp-idf/components/tcp_transport/transport_ssl.c:496
#13 0x4013af82 in esp_transport_ssl_init () at /Users/tennis/esp/esp-idf/components/tcp_transport/transport_ssl.c:515
#14 0x400f9e64 in esp_http_client_init (config=0x3ffbfa30) at /Users/tennis/esp/esp-idf/components/esp_http_client/esp_http_client.c:705
#15 0x400d987a in http_post_to_aws_api_gateway (host=0x3ffbfae0 "y5dlyh7fgixjlhacpy34dgmenq0eyoht.lambda-url.us-east-1.on.aws", path=0x3ffbfbe0 "open") at /Users/tennis/src/esp32-mailbox-reed-switch-sensor/components/http_manager/http_manager.c:153
#16 0x400d991e in http_manager_task (pvParameters=0x0) at /Users/tennis/src/esp32-mailbox-reed-switch-sensor/components/http_manager/http_manager.c:62
#17 0x4008a2a5 in vPortTaskWrapper (pxCode=0x400d9904 <http_manager_task>, pvParameters=0x0) at /Users/tennis/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:134

==================== THREAD 2 (TCB: 0x3ffafd24, name: 'main') =====================
#0  0x4000bff0 in ?? ()
#1  0x4008a64e in vPortClearInterruptMaskFromISR (prev_level=<optimized out>) at /Users/tennis/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos/portmacro.h:564
#2  vPortExitCritical (mux=0x3ffbc978) at /Users/tennis/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:504
#3  0x40089c92 in xQueueGenericSend (xQueue=0x3ffbc92c, pvItemToQueue=0x3ffbb6a0, xTicksToWait=<optimized out>, xCopyPosition=<optimized out>) at /Users/tennis/esp/esp-idf/components/freertos/FreeRTOS-Kernel/queue.c:1056
#4  0x400d8fc4 in send_post (url=0x3ffbb934 "y5dlyh7fgixjlhacpy34dgmenq0eyoht.lambda-url.us-east-1.on.aws", state=0x3f4043a8 "open") at /Users/tennis/src/esp32-mailbox-reed-switch-sensor/main/main.c:106
#5  0x400d91f9 in app_main () at /Users/tennis/src/esp32-mailbox-reed-switch-sensor/main/main.c:163
#6  0x4016bc7a in main_task (args=0x0) at /Users/tennis/esp/esp-idf/components/freertos/app_startup.c:208
#7  0x4008a2a5 in vPortTaskWrapper (pxCode=0x4016bbb4 <main_task>, pvParameters=0x0) at /Users/tennis/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:134

==================== THREAD 3 (TCB: 0x3ffafe80, name: 'IDLE0') =====================
#0  0x400884ee in esp_cpu_wait_for_intr () at /Users/tennis/esp/esp-idf/components/esp_hw_support/cpu.c:145
#1  0x400d3a76 in esp_vApplicationIdleHook () at /Users/tennis/esp/esp-idf/components/esp_system/freertos_hooks.c:59
#2  0x4008b374 in prvIdleTask (pvParameters=0x0) at /Users/tennis/esp/esp-idf/components/freertos/FreeRTOS-Kernel/tasks.c:4273
#3  0x4008a2a5 in vPortTaskWrapper (pxCode=0x4008b368 <prvIdleTask>, pvParameters=0x0) at /Users/tennis/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:134

==================== THREAD 4 (TCB: 0x3ffbc72c, name: 'IDLE1') =====================
#0  0x400884ee in esp_cpu_wait_for_intr () at /Users/tennis/esp/esp-idf/components/esp_hw_support/cpu.c:145
#1  0x400d3a76 in esp_vApplicationIdleHook () at /Users/tennis/esp/esp-idf/components/esp_system/freertos_hooks.c:59
#2  0x4008b374 in prvIdleTask (pvParameters=0x0) at /Users/tennis/esp/esp-idf/components/freertos/FreeRTOS-Kernel/tasks.c:4273
#3  0x4008a2a5 in vPortTaskWrapper (pxCode=0x4008b368 <prvIdleTask>, pvParameters=0x0) at /Users/tennis/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:134

==================== THREAD 5 (TCB: 0x3ffc275c, name: 'tiT') =====================
#0  0x4000bff0 in ?? ()
#1  0x4008a64e in vPortClearInterruptMaskFromISR (prev_level=<optimized out>) at /Users/tennis/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos/portmacro.h:564
#2  vPortExitCritical (mux=0x3ffc18c4) at /Users/tennis/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:504
#3  0x4008a055 in xQueueReceive (xQueue=0x3ffc1878, pvBuffer=0x3ffc26a0, xTicksToWait=<optimized out>) at /Users/tennis/esp/esp-idf/components/freertos/FreeRTOS-Kernel/queue.c:1632
#4  0x400f128a in sys_arch_mbox_fetch (mbox=<optimized out>, msg=0x3ffc26a0, timeout=760) at /Users/tennis/esp/esp-idf/components/lwip/port/freertos/sys_arch.c:317
#5  0x400e01b7 in tcpip_timeouts_mbox_fetch (mbox=0x3ffb57d4 <tcpip_mbox>, msg=0x3ffc26a0) at /Users/tennis/esp/esp-idf/components/lwip/lwip/src/api/tcpip.c:104
#6  0x400e0275 in tcpip_thread (arg=0x0) at /Users/tennis/esp/esp-idf/components/lwip/lwip/src/api/tcpip.c:142
#7  0x4008a2a5 in vPortTaskWrapper (pxCode=0x400e0254 <tcpip_thread>, pvParameters=0x0) at /Users/tennis/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:134

==================== THREAD 6 (TCB: 0x3ffaf4c0, name: 'ipc0') =====================
#0  0x4000bff0 in ?? ()
#1  0x4008a64e in vPortClearInterruptMaskFromISR (prev_level=<optimized out>) at /Users/tennis/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos/portmacro.h:564
#2  vPortExitCritical (mux=0x3ffb008c <xKernelLock>) at /Users/tennis/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:504
#3  0x4008ca61 in xTaskGenericNotifyWait (uxIndexToWait=0, ulBitsToClearOnEntry=<optimized out>, ulBitsToClearOnExit=4294967295, pulNotificationValue=0x3ffaf400, xTicksToWait=<optimized out>) at /Users/tennis/esp/esp-idf/components/freertos/FreeRTOS-Kernel/tasks.c:5769
#4  0x40085644 in ipc_task (arg=0x0) at /Users/tennis/esp/esp-idf/components/esp_system/esp_ipc.c:58
#5  0x4008a2a5 in vPortTaskWrapper (pxCode=0x40085614 <ipc_task>, pvParameters=0x0) at /Users/tennis/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:134

==================== THREAD 7 (TCB: 0x3ffafa24, name: 'ipc1') =====================
#0  0x4000bff0 in ?? ()
#1  0x4008a64e in vPortClearInterruptMaskFromISR (prev_level=<optimized out>) at /Users/tennis/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos/portmacro.h:564
#2  vPortExitCritical (mux=0x3ffb008c <xKernelLock>) at /Users/tennis/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:504
#3  0x4008ca61 in xTaskGenericNotifyWait (uxIndexToWait=0, ulBitsToClearOnEntry=<optimized out>, ulBitsToClearOnExit=4294967295, pulNotificationValue=0x3ffaf960, xTicksToWait=<optimized out>) at /Users/tennis/esp/esp-idf/components/freertos/FreeRTOS-Kernel/tasks.c:5769
#4  0x40085644 in ipc_task (arg=0x1) at /Users/tennis/esp/esp-idf/components/esp_system/esp_ipc.c:58
#5  0x4008a2a5 in vPortTaskWrapper (pxCode=0x40085614 <ipc_task>, pvParameters=0x1) at /Users/tennis/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:134

==================== THREAD 8 (TCB: 0x3ffc14d4, name: 'sys_evt') =====================
#0  0x4000bff0 in ?? ()
#1  0x4008a64e in vPortClearInterruptMaskFromISR (prev_level=<optimized out>) at /Users/tennis/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos/portmacro.h:564
#2  vPortExitCritical (mux=0x3ffc0760) at /Users/tennis/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:504
#3  0x4008a055 in xQueueReceive (xQueue=0x3ffc0714, pvBuffer=0x3ffc13e0, xTicksToWait=<optimized out>) at /Users/tennis/esp/esp-idf/components/freertos/FreeRTOS-Kernel/queue.c:1632
#4  0x4016a460 in esp_event_loop_run (event_loop=0x3ffc06f4, ticks_to_run=4294967295) at /Users/tennis/esp/esp-idf/components/esp_event/esp_event.c:569
#5  0x4016a47a in esp_event_loop_run_task (args=0x3ffc06f4) at /Users/tennis/esp/esp-idf/components/esp_event/esp_event.c:107
#6  0x4008a2a5 in vPortTaskWrapper (pxCode=0x4016a46c <esp_event_loop_run_task>, pvParameters=0x3ffc06f4) at /Users/tennis/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:134

==================== THREAD 9 (TCB: 0x3ffafb80, name: 'esp_timer') =====================
#0  0x4000bff0 in ?? ()
#1  0x4008a64e in vPortClearInterruptMaskFromISR (prev_level=<optimized out>) at /Users/tennis/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos/portmacro.h:564
#2  vPortExitCritical (mux=0x3ffb008c <xKernelLock>) at /Users/tennis/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:504
#3  0x4008c94c in ulTaskGenericNotifyTake (uxIndexToWait=0, xClearCountOnExit=1, xTicksToWait=<optimized out>) at /Users/tennis/esp/esp-idf/components/freertos/FreeRTOS-Kernel/tasks.c:5684
#4  0x400d5407 in timer_task (arg=0x0) at /Users/tennis/esp/esp-idf/components/esp_timer/src/esp_timer.c:477
#5  0x4008a2a5 in vPortTaskWrapper (pxCode=0x400d53f8 <timer_task>, pvParameters=0x0) at /Users/tennis/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:134

==================== THREAD 10 (TCB: 0x3ffc5000, name: 'wifi') =====================
#0  0x4000bff0 in ?? ()
#1  0x4008a64e in vPortClearInterruptMaskFromISR (prev_level=<optimized out>) at /Users/tennis/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos/portmacro.h:564
#2  vPortExitCritical (mux=0x3ffc2f4c) at /Users/tennis/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:504
#3  0x4008a055 in xQueueReceive (xQueue=0x3ffc2f00, pvBuffer=0x3ffc4f40, xTicksToWait=<optimized out>) at /Users/tennis/esp/esp-idf/components/freertos/FreeRTOS-Kernel/queue.c:1632
#4  0x4016b846 in queue_recv_wrapper (queue=0x3ffc2f00, item=0x3ffc4f40, block_time_tick=4294967295) at /Users/tennis/esp/esp-idf/components/esp_wifi/esp32/esp_adapter.c:287
#5  0x40093644 in ppTask ()
#6  0x4008a2a5 in vPortTaskWrapper (pxCode=0x40093618 <ppTask>, pvParameters=0x0) at /Users/tennis/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:134

======================= ALL MEMORY REGIONS ========================
Name   Address   Size   Attrs
.rtc.text 0x400c0000 0x0 RW
.rtc.dummy 0x3ff80000 0x0 RW
.rtc.force_fast 0x3ff80000 0x0 RW
.rtc_noinit 0x50000000 0x0 RW
.rtc.force_slow 0x50000000 0x0 RW
.rtc_fast_reserved 0x3ff82000 0x0 RW
.iram0.vectors 0x40080000 0x403 R XA
.iram0.text 0x40080404 0x176a3 R XA
.dram0.data 0x3ffb0000 0x41e8 RW A
.ext_ram_noinit 0x3f800000 0x0 RW
.ext_ram.bss 0x3f800000 0x0 RW
.flash.appdesc 0x3f400020 0x100 R  A
.flash.rodata 0x3f400120 0x29300 RW A
.flash.text 0x400d0020 0x9dcaf R XA
.iram0.data 0x40097aa8 0x0 RW
.iram0.bss 0x40097aa8 0x0 RW
.dram0.heap_start 0x3ffb9758 0x0 RW
.coredump.tasks.data 0x3ffbfd90 0x154 RW
.coredump.tasks.data 0x3ffbf530 0x850 RW
.coredump.tasks.data 0x3ffafd24 0x154 RW
.coredump.tasks.data 0x3ffbb570 0x5a0 RW
.coredump.tasks.data 0x3ffafe80 0x154 RW
.coredump.tasks.data 0x3ffbbf70 0x1a0 RW
.coredump.tasks.data 0x3ffbc72c 0x154 RW
.coredump.tasks.data 0x3ffbc580 0x1a0 RW
.coredump.tasks.data 0x3ffc275c 0x154 RW
.coredump.tasks.data 0x3ffc2520 0x230 RW
.coredump.tasks.data 0x3ffaf4c0 0x154 RW
.coredump.tasks.data 0x3ffaf2f0 0x1c0 RW
.coredump.tasks.data 0x3ffafa24 0x154 RW
.coredump.tasks.data 0x3ffaf850 0x1c0 RW
.coredump.tasks.data 0x3ffc14d4 0x154 RW
.coredump.tasks.data 0x3ffc12b0 0x210 RW
.coredump.tasks.data 0x3ffafb80 0x154 RW
.coredump.tasks.data 0x3ffba950 0x1b0 RW
.coredump.tasks.data 0x3ffc5000 0x154 RW
.coredump.tasks.data 0x3ffc4df0 0x200 RW

===================== ESP32 CORE DUMP END =====================
===============================================================
Done!
Coredump checksum='2ca9c9322f65b034cc65524f909e69a3f46ec857f0c88a3891fdaf4962ffa800'
I (8247) esp_core_dump_uart: Core dump has been written to uart.
Rebooting...
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:7140
load:0x40078000,len:15500
load:0x40080400,len:4
0x40080400: _init at ??:?

load:0x40080404,len:3904
entry 0x40080640
I (29) boot: ESP-IDF v5.3-dev-796-g30870c819f-dirty 2nd stage bootloader
I (29) boot: compile time Jan  2 2024 19:57:00
I (31) boot: Multicore bootloader
I (36) boot: chip revision: v3.1
I (39) boot.esp32: SPI Speed      : 40MHz
I (44) boot.esp32: SPI Mode       : DIO
I (49) boot.esp32: SPI Flash Size : 4MB
I (53) boot: Enabling RNG early entropy source...
I (59) boot: Partition Table:
I (62) boot: ## Label            Usage          Type ST Offset   Length
I (69) boot:  0 nvs              WiFi data        01 02 00009000 00005000
I (77) boot:  1 otadata          OTA data         01 00 0000e000 00002000
I (84) boot:  2 app0             OTA app          00 10 00010000 00100000
I (92) boot:  3 app1             OTA app          00 11 00110000 00100000
I (99) boot:  4 coredump         Unknown data     01 03 00210000 00010000
I (107) boot: End of partition table
I (111) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=29400h (168960) map
I (177) esp_image: segment 1: paddr=00039428 vaddr=3ffb0000 size=041e8h ( 16872) load
I (184) esp_image: segment 2: paddr=0003d618 vaddr=40080000 size=02a00h ( 10752) load
I (188) esp_image: segment 3: paddr=00040020 vaddr=400d0020 size=9dcb0h (646320) map
I (413) esp_image: segment 4: paddr=000ddcd8 vaddr=40082a00 size=150a8h ( 86184) load
I (459) boot: Loaded app from partition at offset 0x10000
I (459) boot: Disabling RNG early entropy source...
I (471) cpu_start: Multicore app
I (479) cpu_start: Pro cpu start user code
I (479) cpu_start: cpu freq: 160000000 Hz
I (480) cpu_start: Application information:
I (483) cpu_start: Project name:     esp32-mailbox-reed-switch-senso
I (490) cpu_start: App version:      edf23b1
I (495) cpu_start: Compile time:     Jan  2 2024 20:17:40
I (501) cpu_start: ELF file SHA256:  b016a9c24...
I (506) cpu_start: ESP-IDF:          v5.3-dev-796-g30870c819f-dirty
I (513) cpu_start: Min chip rev:     v0.0
I (518) cpu_start: Max chip rev:     v3.99
I (522) cpu_start: Chip rev:         v3.1
I (527) heap_init: Initializing. RAM available for dynamic allocation:
I (535) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (540) heap_init: At 3FFB9758 len 000268A8 (154 KiB): DRAM
I (547) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (553) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (559) heap_init: At 40097AA8 len 00008558 (33 KiB): IRAM
I (567) spi_flash: detected chip: generic
I (570) spi_flash: flash io: dio
I (575) esp_core_dump_uart: Init core dump to UART
I (580) main_task: Started on CPU0
I (590) main_task: Calling app_main()
I (590) MAIN: NVS Init
I (620) MAIN: Parse secrets file
I (620) MAIN: Gather Wi-Fi credentials
I (620) MAIN: Wi-Fi credentials OK. Starting Wi-Fi
I (640) wifi:wifi driver task: 3ffc5000, prio:23, stack:6656, core=0
I (650) wifi:wifi firmware version: 44c86e3
I (660) wifi:wifi certification version: v7.0
I (660) wifi:config NVS flash: enabled
I (660) wifi:config nano formating: disabled
I (660) wifi:Init data frame dynamic rx buffer num: 32
I (660) wifi:Init static rx mgmt buffer num: 5
I (670) wifi:Init management short buffer num: 32
I (670) wifi:Init dynamic tx buffer num: 32
I (680) wifi:Init static rx buffer size: 1600
I (680) wifi:Init static rx buffer num: 10
I (680) wifi:Init dynamic rx buffer num: 32
I (690) wifi_init: rx ba win: 6
I (690) wifi_init: tcpip mbox: 32
I (700) wifi_init: udp mbox: 6
I (700) wifi_init: tcp mbox: 6
I (700) wifi_init: tcp tx win: 5760
I (710) wifi_init: tcp rx win: 5760
I (710) wifi_init: tcp mss: 1440
I (720) wifi_init: WiFi IRAM OP enabled
I (720) wifi_init: WiFi RX IRAM OP enabled
I (730) WIFI_MANAGER: ssid: disconnected
I (730) WIFI_MANAGER: password: M0nkum0nku
I (740) phy_init: phy_version 4780,16b31a7,Sep 22 2023,20:42:16
I (820) wifi:mode : sta (24:dc:c3:c4:bc:c8)
I (820) wifi:enable tsf
E (830) wifi:sta is connecting, return error
I (840) wifi:new:<6,0>, old:<1,0>, ap:<255,255>, sta:<6,0>, prof:1
I (840) wifi:state: init -> auth (b0)
I (860) wifi:state: auth -> assoc (0)
I (870) wifi:state: assoc -> run (10)
W (880) wifi:[ADDBA]rx delba, code:39, delete tid:0
W (880) wifi:[ADDBA]rx delba, code:39, delete tid:0
W (880) wifi:[ADDBA]rx delba, code:39, delete tid:2
I (900) wifi:connected with disconnected, aid = 2, channel 6, BW20, bssid = 40:ed:00:42:7e:ea
I (900) wifi:security: WPA2-PSK, phy: bgn, rssi: -56
I (910) wifi:pm start, type: 1

I (910) wifi:dp: 1, bi: 102400, li: 3, scale listen interval from 307200 us to 307200 us
I (930) wifi:AP's beacon interval = 102400 us, DTIM period = 1
I (950) wifi:<ba-add>idx:0 (ifx:0, 40:ed:00:42:7e:ea), tid:0, ssn:327, winSize:64
I (1920) esp_netif_handlers: sta ip: 192.168.0.182, mask: 255.255.255.0, gw: 192.168.0.1
I (1920) WIFI_MANAGER: Successfully connected to SSID:disconnected
I (1920) WIFI_MANAGER: Connected to WiFi
I (1930) TIME_MANAGER: Initializing SNTP
I (1930) TIME_MANAGER: Waiting for system time to be set... (1/10)
I (3940) TIME_MANAGER: Waiting for system time to be set... (2/10)

Done

More Information.

This is new code, so its possible I am mis-configuring something.

gamename commented 10 months ago

@hmalpani I've done some refactoring in hopes of getting around the error. Now the crash happens consistently at this point.

I will attach a coredump. esp_core_dump.txt

yaghmr commented 8 months ago

I have the same problem you had. How did you solve it?

gamename commented 8 months ago

@yaghmr I wrote an http wrapper and it finally worked. Here is the zip file for it http_manager-main.zip