Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASSERT_PARAM(-218959118 0), in arch_main.c at line 365 while using BLE (IDFGH-12768) #13747

Closed
3 tasks done
Koxx3 opened this issue May 5, 2024 · 89 comments
Closed
3 tasks done
Assignees
Labels
Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally

Comments

@Koxx3
Copy link

Koxx3 commented May 5, 2024

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

Environment

Development Kit: none (this is a custom board, but could reproduce the issue with a ESP32-WROOM-based board too)
Module or chip used: ESP32-D0WD
IDF version: v4.4.4 from Tasmota 2023.06.02
Build System: Platformio/Make
Compiler version: xtensa-esp32-elf-gcc (crosstool-NG esp-2021r2-patch5) 8.4.0
Operating System: Windows
Power Supply: external 5V or USB

Problem Description

My software uses BLE, Wifi (disabled during this test, but enable in sdkconfig), TWAI, UART, SPI, U2C and UART...

It scans for BLE beacons every second while it is connected in BLE to a 1 smartphone, and it reports the detected devices belonging to a custom filtered list with custom BLE characteristics.

Advertising is enabled while the smartphone is connected.
It uses NimBLE.

I crash after 5 to 8h if a smartphone remains connected. I don't see any crash if the smartphone isn't connected.

I've tried many many configurations following similar previous BLE stack errors reported on this github :

  • customize bt controller adv report
  • disable bt controller sleep
  • remove _btdm_sleep_check_duration callback from bt.c
  • increase watchdog timeout
  • change scan strategies and filtering
  • enabling BLE queue congestion check

Without success ...

Monitoring memory every 1h, I don't see any leak over time.

My sdkconfig : https://pastebin.com/2TzT7sTC

I can't move to higher IDF without a large impact on my software... which is not possible considering we are launching the production soon.
I tried IDF 4.4.5, but it crashes too (I didn't note the exception/backtrace)

Any help please ?

Expected Behaviour

The BLE stack should not panic when scanning.

Actual Behaviour

The application will panic after seemingly non-deterministic intervals, generally during BLE scans.

Steps to reproduce

N/A considering the complexity of the application.

Debug Logs

ASSERT_PARAM(-218959118 0), in arch_main.c at line 365
Guru Meditation Error: Core  0 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x40090b88: 000000f0 00004136 f01d0000
Core  0 register dump:
PC      : 0x40090b8f  PS      : 0x00060734  A0      : 0x80086505  A1      : 0x3ffb6020  
A2      : 0x00000000  A3      : 0xf2f2f2f2  A4      : 0x00000000  A5      : 0x3f43627e  
A6      : 0x0000016d  A7      : 0xfffffffc  A8      : 0x8000814b  A9      : 0x3ffb5f90  
A10     : 0x00000000  A11     : 0x3ffb5fb3  A12     : 0x3ffb5f5f  A13     : 0x00000035  
A14     : 0x00000000  A15     : 0x3ffb5f64  SAR     : 0x00000004  EXCCAUSE: 0x00000000  
EXCVADDR: 0x00000000  LBEG    : 0x4008640d  LEND    : 0x40086415  LCOUNT  : 0x00000000  

Backtrace: 0x40090b8c:0x3ffb6020 0x40086502:0x3ffb6040 0x401a1691:0x3ffb6060 0x40019fb5:0x3ffb6080 0x4001a1f2:0x3ffb60b0 0x401afe5a:0x3ffb60d0 0x401b15e1:0x3ffb6140 0x401ae5ff:0x3ffb6190 0x401ab7d2:0x3ffb61e0 0x40019d11:0x3ffb6220 0x40055b4d:0x3ffb6240 0x401a1a83:0x3ffb6260 0x401a20e5:0x3ffb6280 0x40096cad:0x3ffb62b0

Decoded stack trace :

r_assert at C:\Users\koxx3\.platformio\packages\framework-espidf\components\bt\controller\esp32/bt.c:1862
r_assert_param at ??:?
r_platform_reset at ??:?
?? ??:0
?? ??:0
r_llm_le_adv_report_ind at ??:?
r_llm_pdu_defer at ??:?
r_lld_pdu_check at ??:?
r_lld_evt_deffered_elt_handler at ??:?
?? ??:0
?? ??:0
r_rw_schedule at ??:?
btdm_controller_task at ??:?
vPortTaskWrapper at C:\Users\koxx3\.platformio\packages\framework-espidf\components\freertos\port\xtensa/port.c:142

Memory left after boot :

MEM left = 75468	
idle = 5064	
tft = 2188	
wifi = 4492	
btn = 2440	
canrx = 1572	
cantx = 1760	
sound = 188	
serial = 4488	
btCntr = 1580    	
btHost = 4932	
CAN_WD_BI = 1536	
CAN_LORX = 3524	
Tmr = 1384	
esp_timer = 3140	
loopTask = 4200	
ipc0 = 860	
ipc1 = 992	
sys_evt = 4200	
arduino_events = 4200

CPU usage :

loopTask         94881202                9%
taskButtons      12519417                1%
taskWifi         7381082         <1%
taskSerial       7324840         <1%
taskCanRx        28419565                2%
IDLE             976617190               94%
IDLE             806747117               77%
taskSound        4433369         <1%
taskTFT          100563690               9%
CAN_WD_BI        83969           <1%
Tmr Svc          103468          <1%
taskCanTx        4063407         <1%
CAN_RX           36              <1%
ipc1             105205          <1%
CAN_LORX         4447391         <1%
nimble_host      6326191         <1%
btController     18189015                1%
ipc0             4655381         <1%
esp_timer        23              <1%

Tasks informations:

taskCanTx | Core ID: 0 | Priority: 0 | Stack High Water Mark: 1760
taskCanRx | Core ID: 0 | Priority: 0 | Stack High Water Mark: 1652
Tmr Svc | Core ID: 0 | Priority: 1 | Stack High Water Mark: 1384
nimble_host | Core ID: 0 | Priority: 21 | Stack High Water Mark: 4932
btController | Core ID: 0 | Priority: 23 | Stack High Water Mark: 1580
esp_timer | Core ID: 0 | Priority: 22 | Stack High Water Mark: 3140
ipc0 | Core ID: 0 | Priority: 1 | Stack High Water Mark: 764
IDLE | Core ID: 0 | Priority: 0 | Stack High Water Mark: 1116

loopTask | Core ID: 1 | Priority: 1 | Stack High Water Mark: 4488
taskSound | Core ID: 1 | Priority: 0 | Stack High Water Mark: 220
taskButtons | Core ID: 1 | Priority: 0 | Stack High Water Mark: 2440
taskWifi | Core ID: 1 | Priority: 0 | Stack High Water Mark: 4492
taskSerial | Core ID: 1 | Priority: 0 | Stack High Water Mark: 4488
taskTFT | Core ID: 1 | Priority: 0 | Stack High Water Mark: 2188
CAN_WD_BI | Core ID: 1 | Priority: 10 | Stack High Water Mark: 1536
CAN_LORX | Core ID: 1 | Priority: 19 | Stack High Water Mark: 3524
CAN_RX | Core ID: 2147483647 | Priority: 15 | Stack High Water Mark: 7704
ipc1 | Core ID: 1 | Priority: 1 | Stack High Water Mark: 992
IDLE | Core ID: 1 | Priority: 0 | Stack High Water Mark: 1104

@espressif-bot espressif-bot added the Status: Opened Issue is new label May 5, 2024
@github-actions github-actions bot changed the title ASSERT_PARAM(-218959118 0), in arch_main.c at line 365 while using BLE ASSERT_PARAM(-218959118 0), in arch_main.c at line 365 while using BLE (IDFGH-12768) May 5, 2024
@esp-zhp
Copy link
Collaborator

esp-zhp commented May 7, 2024

Thank you for reporting the issue. It seems to be related to the BLE controller's memory. The reason for this issue is that the controller failed to allocate memory. We will attempt to replicate the problem. Could you provide a demo that reproduces this issue? This would be helpful in resolving the problem.

@esp-zhp
Copy link
Collaborator

esp-zhp commented May 7, 2024

The BLE controller allocates a block of memory during initialization, which is exclusively for the controller's use. There's no way to determine from the outside whether there has been a memory leak in the memory allocated for the controller.

@Koxx3
Copy link
Author

Koxx3 commented May 7, 2024

thanks a lot for the answer. I've spent a lot of time tracking this issue...

I switch to IDF 4.4.5, but no improvement.

I'll try to patch IDF-4.4.5 BT controller with 4.4.7 BT controller to ensure this issue isn't already fixed in the latest version.

Some questions :
1/ is it possible to observe the memory leak from outside of the BT controller ?
2/ do you think disconnecting the client can release the memory ?
3/ would is possible to allocate more memory to this module by any mean ?
4/ considering it seems to be "r_llm_le_adv_report_ind" the issue, is there any way to prevent it ? with advertising configuration, scan configuration, reducing MTU (255 bytes negociated by the IOS client in my case), sdk configuration or anything else ?

A said in the first post, it will be very complicated to release a test module if other software parts are involved, but I'll try during next weeks.

@esp-zhp
Copy link
Collaborator

esp-zhp commented May 7, 2024

1-Is it possible to observe memory leaks from outside of the BT controller?
Answer: Currently, it's not possible to detect memory leaks externally. The memory allocation for the controller is predetermined, and there's no API available for external monitoring of its memory usage. However, for debugging purposes, I can provide you with a new library and internal interfaces to access the controller's memory usage.Do you require access to this interface?
2-Do you think disconnecting the client can release the memory?
Answer: When there are no connections, a portion of the memory is indeed released. This is because the memory size is fixed after the controller's initialization.
3-Is it possible to allocate more memory to this module by any means?
Answer: The memory size allocated during controller initialization is calculated based on factors such as duplicate list size and maximum connection count. In theory, there should not be any assertion errors as sufficient memory is already allocated. Currently, there's no external interface to adjust memory allocation size, but internal adjustments can be made.
4-Considering "r_llm_le_adv_report_ind" seems to be the issue, is there any way to prevent it? Whether through advertising configuration, scan configuration, reducing MTU (255 bytes negotiated by the iOS client in my case), SDK configuration, or anything else?
Answer: The consumption of memory decreases when there are no established connections, and it also reduces when there are fewer devices in the air (due to duplicate list reasons). Other scenarios require further assessment.
5-As mentioned in the first post, it might be challenging to release a test module if other software components are involved, but I'll attempt it in the next few weeks.
Answer: Currently, it seems that this issue is solely related to BLE and not connected to other components. I'm still attempting to replicate the problem here. If you can replicate the issue using BLE, it would greatly aid in resolving the problem.

@Koxx3
Copy link
Author

Koxx3 commented May 7, 2024

ok, thanks again.
I'll keep you updated of the 4.4.5/4.4.7 patch tests.
if it fails, yes, it would be really interesting to have few APIs to monitor the memory and debug.

@esp-zhp
Copy link
Collaborator

esp-zhp commented May 7, 2024

d166426.zip(based on e8bdaf9 tag: v4.4.4)
Please replace the esp-idf/components/bt/controller/lib_esp32/esp32/libbtdm_app.a file. In the new lib file, I've added a new API that can retrieve the memory usage of the controller. Below is an example and the printed log.
When the BT controller compile version is printed as [d166426], it indicates successful application.

I (586) BTDM_INIT: BT controller compile version [d166426]

code:

extern uint16_t ke_get_heap_free_size(void);
uint16_t free_size;
while (1) {
free_size = ke_get_heap_free_size();
printf("free size %d byte\n",free_size);
vTaskDelay(10000 / portTICK_PERIOD_MS);
}

log:

I (29) boot: ESP-IDF v4.4.4-dirty 2nd stage bootloader
I (29) boot: compile time 20:28:41
I (29) boot: chip revision: v3.1
I (33) boot_comm: chip revision: 3, min. bootloader chip revision: 0
I (40) boot.esp32: SPI Speed      : 40MHz
I (44) boot.esp32: SPI Mode       : DIO
I (49) boot.esp32: SPI Flash Size : 2MB
I (53) boot: Enabling RNG early entropy source...
I (59) boot: Partition Table:
I (62) boot: ## Label            Usage          Type ST Offset   Length
I (70) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (77) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (85) boot:  2 factory          factory app      00 00 00010000 00100000
I (92) boot: End of partition table
I (96) boot_comm: chip revision: 3, min. application chip revision: 0
I (103) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=1d050h (118864) map
I (155) esp_image: segment 1: paddr=0002d078 vaddr=3ffbdb60 size=02fa0h ( 12192) load
I (160) esp_image: segment 2: paddr=00030020 vaddr=400d0020 size=7ca74h (510580) map
I (346) esp_image: segment 3: paddr=000aca9c vaddr=3ffc0b00 size=017f8h (  6136) load
I (348) esp_image: segment 4: paddr=000ae29c vaddr=40080000 size=17658h ( 95832) load
I (402) boot: Loaded app from partition at offset 0x10000
I (402) boot: Disabling RNG early entropy source...
I (414) cpu_start: Pro cpu up.
I (414) cpu_start: Starting app cpu, entry point is 0x400811d8
0x400811d8: call_start_cpu1 at /home/zhanghaipeng/esp_v4/esp-idf/components/esp_system/port/cpu_start.c:148

I (0) cpu_start: App cpu up.
I (430) cpu_start: Pro cpu start user code
I (430) cpu_start: cpu freq: 160000000
I (431) cpu_start: Application information:
I (435) cpu_start: Project name:     gatt_client_demo
I (441) cpu_start: App version:      v4.4.4-dirty
I (446) cpu_start: Compile time:     May  7 2024 20:28:36
I (452) cpu_start: ELF file SHA256:  c3c24db549fa719a...
I (458) cpu_start: ESP-IDF:          v4.4.4-dirty
I (464) heap_init: Initializing. RAM available for dynamic allocation:
I (471) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM
I (477) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM
I (483) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM
I (489) heap_init: At 3FFC8AC8 len 00017538 (93 KiB): DRAM
I (495) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (502) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (508) heap_init: At 40097658 len 000089A8 (34 KiB): IRAM
I (516) spi_flash: detected chip: generic
I (519) spi_flash: flash io: dio
W (523) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (537) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (586) BTDM_INIT: BT controller compile version [d166426]
I (586) system_api: Base MAC address is not set
I (586) system_api: read default base MAC address from EFUSE
I (596) phy_init: phy_version 4670,719f9f6,Feb 18 2021,17:07:07
I (1016) GATTC_DEMO: REG_EVT
free size 9556 byte
I (1016) GATTC_DEMO: scan start success
free size 9364 byte
free size 9364 byte
free size 9364 byte
free size 9540 byte

@Koxx3
Copy link
Author

Koxx3 commented May 7, 2024

ok. I am currently trying with IDF 4.4.7 version.
I'll be out of the office for few days, I'll be back in few days to continue tests.
If it's not too much to ask, can you generate it for IDF 4.4.5 and 4.4.7 please ?

@Koxx3
Copy link
Author

Koxx3 commented May 7, 2024

ok, let's go for a test in IDF 4.4.4 + libbtdm_app.a patch before the long weekend.

compilation test :

15:29:32.558 > I (216) BTDM_INIT: BT controller compile version [d166426]
15:29:32.558 > ESP_ERROR_CHECK failed: esp_err_t 0x101 (ESP_ERR_NO_MEM) at 0x40092ab0
15:29:32.559 > file: ".pio/libdeps/smartdisplay_vesc_35v2_pcb210/nimble/src/NimBLEDevice.cpp" line 879
15:29:32.560 > func: static void NimBLEDevice::init(const string&)
15:29:32.560 > expression: esp_bt_controller_init(&bt_cfg)
15:29:32.561 >
15:29:32.561 > abort() was called at PC 0x40092ab3 on core 1
15:29:32.561 >
15:29:32.561 >
15:29:32.561 > Backtrace: 0x40083842:0x3ffd93c0 0x40092abd:0x3ffd93e0 0x400991da:0x3ffd9400 0x40092ab3:0x3ffd9470 0x40115622:0x3ffd9490 0x400d8517:0x3ffd94e0 0x4010726f:0x3ffd96c0 0x401471da:0x3ffd97c0 0x40096a69:0x3ffd97e0
15:29:32.564 > 
15:29:32.564 >
15:29:32.564 >
15:29:32.564 >
15:29:32.564 > ELF file SHA256: 22f76682b73e94f5
15:29:32.564 >
15:29:32.564 > Rebooting...

NimBle function at this line :

void NimBLEDevice::init(const std::string &deviceName) {
    if(!initialized){
        int rc=0;
#ifdef ESP_PLATFORM
        esp_err_t errRc = ESP_OK;

#ifdef CONFIG_ENABLE_ARDUINO_DEPENDS
        // make sure the linker includes esp32-hal-bt.c so Arduino init doesn't release BLE memory.
        btStarted();
#endif

        errRc = nvs_flash_init();

        if (errRc == ESP_ERR_NVS_NO_FREE_PAGES || errRc == ESP_ERR_NVS_NEW_VERSION_FOUND) {
            ESP_ERROR_CHECK(nvs_flash_erase());
            errRc = nvs_flash_init();
        }

        ESP_ERROR_CHECK(errRc);

        esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT);

        esp_bt_controller_config_t bt_cfg = BT_CONTROLLER_INIT_CONFIG_DEFAULT();
#if  defined (CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S3)
        bt_cfg.bluetooth_mode = ESP_BT_MODE_BLE;
#else
        bt_cfg.mode = ESP_BT_MODE_BLE;
        bt_cfg.ble_max_conn = CONFIG_BT_NIMBLE_MAX_CONNECTIONS;
#endif
        bt_cfg.normal_adv_size = m_scanDuplicateSize;
        bt_cfg.scan_duplicate_type = m_scanFilterMode;

        ESP_ERROR_CHECK(esp_bt_controller_init(&bt_cfg));
        ESP_ERROR_CHECK(esp_bt_controller_enable(ESP_BT_MODE_BLE));
        ESP_ERROR_CHECK(esp_nimble_hci_init());
#endif
        nimble_port_init();

        // Setup callbacks for host events
        ble_hs_cfg.reset_cb = NimBLEDevice::onReset;
        ble_hs_cfg.sync_cb = NimBLEDevice::onSync;

        // Set initial security capabilities
        ble_hs_cfg.sm_io_cap = BLE_HS_IO_NO_INPUT_OUTPUT;
        ble_hs_cfg.sm_bonding = 0;
        ble_hs_cfg.sm_mitm = 0;
        ble_hs_cfg.sm_sc = 1;
        ble_hs_cfg.sm_our_key_dist = 1;
        ble_hs_cfg.sm_their_key_dist = 3;

        ble_hs_cfg.store_status_cb = ble_store_util_status_rr; /*TODO: Implement handler for this*/

        // Set the device name.
        rc = ble_svc_gap_device_name_set(deviceName.c_str());
        assert(rc == 0);

        ble_store_config_init();

        nimble_port_freertos_init(NimBLEDevice::host_task);
    }

    // Wait for host and controller to sync before returning and accepting new tasks
    while(!m_synced){
        taskYIELD();
    }

    initialized = true; // Set the initialization flag to ensure we are only initialized once.
} // init

esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
{
    esp_err_t err;
    uint32_t btdm_cfg_mask = 0;

#if CONFIG_BTDM_CTRL_HLI
    hli_queue_setup_pinned_to_core(CONFIG_BTDM_CTRL_PINNED_TO_CORE);
#endif /* CONFIG_BTDM_CTRL_HLI */

    //if all the bt available memory was already released, cannot initialize bluetooth controller
    if (btdm_dram_available_region[0].mode == ESP_BT_MODE_IDLE) {
        return ESP_ERR_INVALID_STATE;
    }

    osi_funcs_p = (struct osi_funcs_t *)malloc_internal_wrapper(sizeof(struct osi_funcs_t));
    if (osi_funcs_p == NULL) {
        return ESP_ERR_NO_MEM;
    }

    memcpy(osi_funcs_p, &osi_funcs_ro, sizeof(struct osi_funcs_t));
    if (btdm_osi_funcs_register(osi_funcs_p) != 0) {
        return ESP_ERR_INVALID_ARG;
    }

    if (btdm_controller_status != ESP_BT_CONTROLLER_STATUS_IDLE) {
        return ESP_ERR_INVALID_STATE;
    }

    if (cfg == NULL) {
        return ESP_ERR_INVALID_ARG;
    }

    if (cfg->controller_task_prio != ESP_TASK_BT_CONTROLLER_PRIO
            || cfg->controller_task_stack_size < ESP_TASK_BT_CONTROLLER_STACK) {
        return ESP_ERR_INVALID_ARG;
    }

    //overwrite some parameters
    cfg->bt_max_sync_conn = CONFIG_BTDM_CTRL_BR_EDR_MAX_SYNC_CONN_EFF;
    cfg->magic  = ESP_BT_CONTROLLER_CONFIG_MAGIC_VAL;

    if (((cfg->mode & ESP_BT_MODE_BLE) && (cfg->ble_max_conn <= 0 || cfg->ble_max_conn > BTDM_CONTROLLER_BLE_MAX_CONN_LIMIT))
            || ((cfg->mode & ESP_BT_MODE_CLASSIC_BT) && (cfg->bt_max_acl_conn <= 0 || cfg->bt_max_acl_conn > BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN_LIMIT))
            || ((cfg->mode & ESP_BT_MODE_CLASSIC_BT) && (cfg->bt_max_sync_conn > BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN_LIMIT))) {
        return ESP_ERR_INVALID_ARG;
    }

    ESP_LOGI(BTDM_LOG_TAG, "BT controller compile version [%s]", btdm_controller_get_compile_version());

    s_wakeup_req_sem = semphr_create_wrapper(1, 0);
    if (s_wakeup_req_sem == NULL) {
        err = ESP_ERR_NO_MEM;
        goto error;
    }

    esp_phy_modem_init();

    esp_bt_power_domain_on();

    btdm_controller_mem_init();

    periph_module_enable(PERIPH_BT_MODULE);

#ifdef CONFIG_PM_ENABLE
    s_btdm_allow_light_sleep = false;
#endif

    // set default sleep clock cycle and its fractional bits
    btdm_lpcycle_us_frac = RTC_CLK_CAL_FRACT;
    btdm_lpcycle_us = 2 << (btdm_lpcycle_us_frac);

#if CONFIG_BTDM_CTRL_MODEM_SLEEP_MODE_ORIG

    btdm_lpclk_sel = BTDM_LPCLK_SEL_XTAL; // set default value
#if CONFIG_BTDM_CTRL_LPCLK_SEL_EXT_32K_XTAL
    // check whether or not EXT_CRYS is working
    if (rtc_clk_slow_freq_get() == RTC_SLOW_FREQ_32K_XTAL) {
        btdm_lpclk_sel = BTDM_LPCLK_SEL_XTAL32K; // External 32kHz XTAL
#ifdef CONFIG_PM_ENABLE
        s_btdm_allow_light_sleep = true;
#endif
    } else {
        ESP_LOGW(BTDM_LOG_TAG, "32.768kHz XTAL not detected, fall back to main XTAL as Bluetooth sleep clock\n"
                 "light sleep mode will not be able to apply when bluetooth is enabled");
        btdm_lpclk_sel = BTDM_LPCLK_SEL_XTAL; // set default value
    }
#else
    btdm_lpclk_sel = BTDM_LPCLK_SEL_XTAL; // set default value
#endif

    bool select_src_ret __attribute__((unused));
    bool set_div_ret __attribute__((unused));
    if (btdm_lpclk_sel == BTDM_LPCLK_SEL_XTAL) {
        select_src_ret = btdm_lpclk_select_src(BTDM_LPCLK_SEL_XTAL);
        set_div_ret = btdm_lpclk_set_div(rtc_clk_xtal_freq_get() * 2 - 1);
        assert(select_src_ret && set_div_ret);
        btdm_lpcycle_us_frac = RTC_CLK_CAL_FRACT;
        btdm_lpcycle_us = 2 << (btdm_lpcycle_us_frac);
    } else { // btdm_lpclk_sel == BTDM_LPCLK_SEL_XTAL32K
        select_src_ret = btdm_lpclk_select_src(BTDM_LPCLK_SEL_XTAL32K);
        set_div_ret = btdm_lpclk_set_div(0);
        assert(select_src_ret && set_div_ret);
        btdm_lpcycle_us_frac = RTC_CLK_CAL_FRACT;
        btdm_lpcycle_us = (RTC_CLK_CAL_FRACT > 15) ? (1000000 << (RTC_CLK_CAL_FRACT - 15)) :
            (1000000 >> (15 - RTC_CLK_CAL_FRACT));
        assert(btdm_lpcycle_us != 0);
    }
    btdm_controller_set_sleep_mode(BTDM_MODEM_SLEEP_MODE_ORIG);

#elif CONFIG_BTDM_CTRL_MODEM_SLEEP_MODE_EVED
    btdm_controller_set_sleep_mode(BTDM_MODEM_SLEEP_MODE_EVED);
#else
    btdm_controller_set_sleep_mode(BTDM_MODEM_SLEEP_MODE_NONE);
#endif

#ifdef CONFIG_PM_ENABLE
    if (!s_btdm_allow_light_sleep) {
        if ((err = esp_pm_lock_create(ESP_PM_NO_LIGHT_SLEEP, 0, "btLS", &s_light_sleep_pm_lock)) != ESP_OK) {
            goto error;
        }
    }
    if ((err = esp_pm_lock_create(ESP_PM_APB_FREQ_MAX, 0, "bt", &s_pm_lock)) != ESP_OK) {
        goto error;
    }
    esp_timer_create_args_t create_args = {
        .callback = btdm_slp_tmr_callback,
        .arg = NULL,
        .name = "btSlp"
    };
    if ((err = esp_timer_create(&create_args, &s_btdm_slp_tmr)) != ESP_OK) {
        goto error;
    }

    s_pm_lock_acquired = true;
#endif

#if CONFIG_SW_COEXIST_ENABLE
    coex_init();
#endif

    btdm_cfg_mask = btdm_config_mask_load();

    if (btdm_controller_init(btdm_cfg_mask, cfg) != 0) {
        err = ESP_ERR_NO_MEM;
        goto error;
    }

    btdm_controller_status = ESP_BT_CONTROLLER_STATUS_INITED;

    return ESP_OK;

error:

    bt_controller_deinit_internal();

    return err;
}

esp_err_t esp_bt_controller_deinit(void)
{
    if (btdm_controller_status != ESP_BT_CONTROLLER_STATUS_INITED) {
        return ESP_ERR_INVALID_STATE;
    }

    btdm_controller_deinit();

    bt_controller_deinit_internal();

    return ESP_OK;
}

static void bt_controller_deinit_internal(void)
{
    periph_module_disable(PERIPH_BT_MODULE);

#ifdef CONFIG_PM_ENABLE
    if (!s_btdm_allow_light_sleep) {
        esp_pm_lock_delete(s_light_sleep_pm_lock);
        s_light_sleep_pm_lock = NULL;
    }

    if (s_pm_lock != NULL) {
        esp_pm_lock_delete(s_pm_lock);
        s_pm_lock = NULL;
    }

    if (s_btdm_slp_tmr != NULL) {
        esp_timer_stop(s_btdm_slp_tmr);
        esp_timer_delete(s_btdm_slp_tmr);
        s_btdm_slp_tmr = NULL;
    }

    s_pm_lock_acquired = false;
#endif

    if (s_wakeup_req_sem) {
        semphr_delete_wrapper(s_wakeup_req_sem);
        s_wakeup_req_sem = NULL;
    }

    if (osi_funcs_p) {
        free(osi_funcs_p);
        osi_funcs_p = NULL;
    }

    btdm_controller_status = ESP_BT_CONTROLLER_STATUS_IDLE;

    btdm_lpcycle_us = 0;
    btdm_controller_set_sleep_mode(BTDM_MODEM_SLEEP_MODE_NONE);

    esp_bt_power_domain_off();

    esp_phy_modem_deinit();
}


build test with ke_get_heap_free_size :

Linking .pio\build\smartdisplay_vesc_35v2_pcb210\firmware.elf
c:/users/koxx3/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio/build/smartdisplay_vesc_35v2_pcb210/src/main.o:(.literal._Z4loopv+0x2c): undefined reference to `ke_get_heap_free_size()'
c:/users/koxx3/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio/build/smartdisplay_vesc_35v2_pcb210/src/main.o: in function `loop()':
C:\Users\koxx3\Documents\Coding\SmartController_SmartDisplay_ESP32_priv3/src/main.cpp:1075: undefined reference to `ke_get_heap_free_size()'
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\smartdisplay_vesc_35v2_pcb210\firmware.elf] Error 1

@Koxx3
Copy link
Author

Koxx3 commented May 7, 2024

in debug level :

D (1299) BTDM_INIT: Release DRAM [0x3ffb2730] - [0x3ffb6388]
D (1300) intr_alloc: Connected src -5 to int 29 (cpu 1)
I (1300) BTDM_INIT: BT controller compile version [d166426]
D (1301) BTDM_INIT: .data initialise [0x3ffae6e0] <== [0x4000d890]
D (1301) BTDM_INIT: .bss initialise [0x3ffb0000] - [0x3ffb09a8]
D (1302) BTDM_INIT: .bss initialise [0x3ffb09a8] - [0x3ffb1ddc]
D (1303) BTDM_INIT: .bss initialise [0x3ffb1ddc] - [0x3ffb2730]
D (1304) BTDM_INIT: .bss initialise [0x3ffb8000] - [0x3ffb9a20]
D (1304) BTDM_INIT: .bss initialise [0x3ffbdb28] - [0x3ffbdb5c]
ESP_ERROR_CHECK failed: esp_err_t 0x101 (ESP_ERR_NO_MEM) at 0x40092ad4
file: ".pio/libdeps/smartdisplay_vesc_35v2_pcb210/nimble/src/NimBLEDevice.cpp" line 879
func: static void NimBLEDevice::init(const string&)
expression: esp_bt_controller_init(&bt_cfg)

abort() was called at PC 0x40092ad7 on core 1

@esp-zhp
Copy link
Collaborator

esp-zhp commented May 8, 2024

The reason for this issue is the mismatch between the "magic value" externally and internally in the controller. The external controller value is configured by ESP_BT_CONTROLLER_CONFIG_MAGIC_VAL and needs to be consistent internally.

It's worth noting that in version v4.4.4, the internal "magic value" is 0x20200622. If you encounter this problem, you need to verify whether you are using version v4.4.4.
image

@esp-zhp
Copy link
Collaborator

esp-zhp commented May 8, 2024

replace esp-idf/components/bt/controller/lib_esp32/esp32/libbtdm_app.a
and
extern uint16_t ke_get_heap_free_size(void);

make sure:BT controller compile version [d166426]
image

@Koxx3
Copy link
Author

Koxx3 commented May 11, 2024

I managed to remove Tasmota dependencies and work with "pure" packages now (thanks to Jason2866):

PACKAGES:
 - framework-arduinoespressif32 @ 3.20016.0 (2.0.16)
 - framework-espidf @ 3.40407.0 (4.4.7)
 - tool-cmake @ 3.16.4
 - tool-esptoolpy @ 1.40501.0 (4.5.1)
 - tool-idf @ 1.0.1
 - tool-mconf @ 1.4060000.20190628 (406.0.0)
 - tool-mkspiffs @ 2.230.0 (2.30)
 - tool-ninja @ 1.9.0
 - toolchain-esp32ulp @ 1.23500.220830 (2.35.0)
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5

here are the IDF 4.4.7 results with stock "libbtdm_app.a" :

r_assert at C:\Users\koxx3\.platformio\packages\framework-espidf\components\bt\controller\esp32/bt.c:1902
r_assert_param at ??:?
r_platform_reset at ??:?
?? ??:0
?? ??:0
r_llm_le_adv_report_ind at ??:?
r_llm_pdu_defer at ??:?
r_lld_pdu_check at ??:?
r_lld_evt_deffered_elt_handler at ??:?
?? ??:0
?? ??:0
r_rw_schedule at ??:?
btdm_controller_task at ??:?
vPortTaskWrapper at C:\Users\koxx3\.platformio\packages\framework-espidf\components\freertos\port\xtensa/port.c:142

board 1 crashed after 52 min, then 11h43m
board 2 crashed after 12h10m

I tried you patched "libbtdm_app.a" with IDF 4.4.7, but it doesn't work ;)

@esp-zhp
Copy link
Collaborator

esp-zhp commented May 11, 2024

@Koxx3
can you use ke_get_heap_free_size now?

@Koxx3
Copy link
Author

Koxx3 commented May 11, 2024

ok, I'll try to switch back to officiel 4.4.4 and use ke_get_heap_free_size

@esp-zhp
Copy link
Collaborator

esp-zhp commented May 11, 2024

I guess there might be a subtle memory leak in the controller. Perhaps some patterns could be discovered by using ke_get_heap_free_size... thanks for your testing.

@Koxx3
Copy link
Author

Koxx3 commented May 11, 2024

argh. I cleaned everything (build folder & cache).
I made sure only 1 framework-espidf remained, then patched
... but it still doesn't link.

image

Linking .pio\build\smartdisplay_vesc_35v2_pcb210\firmware.elf
c:/users/koxx3/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio/build/smartdisplay_vesc_35v2_pcb210/src/main.o:(.literal._Z4loopv+0x30): undefined reference to `ke_get_heap_free_size()'
c:/users/koxx3/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio/build/smartdisplay_vesc_35v2_pcb210/src/main.o: in function `loop()':
C:\Users\koxx3\Documents\Coding\SmartController_SmartDisplay_ESP32_priv3/src/main.cpp:1075: undefined reference to `ke_get_heap_free_size()'
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\smartdisplay_vesc_35v2_pcb210\firmware.elf] Error 1

then in main.cpp :

...
extern uint16_t ke_get_heap_free_size(void);
...

void loop()
{

  if (i_loopIdle % 1000 == 0)
  {
    uint16_t free_size = ke_get_heap_free_size();
    Serial.printf("main : free size = %d bytes\n", free_size);
  }
}

At execution (without using ke_get_heap_free_size), it clearly state I am using d166426 :
I (1553) BTDM_INIT: BT controller compile version [d166426]

@esp-zhp
Copy link
Collaborator

esp-zhp commented May 11, 2024

Can you provide me with your current commit ID? I'd like to perform some local testing.

@Koxx3
Copy link
Author

Koxx3 commented May 11, 2024

sorry updated too late :
At execution (without using ke_get_heap_free_size), it clearly state I am using d166426 :
I (1553) BTDM_INIT: BT controller compile version [d166426]

@Koxx3
Copy link
Author

Koxx3 commented May 11, 2024

Can you provide me with your current commit ID? I'd like to perform some local testing.

how do I do that ?

@Koxx3
Copy link
Author

Koxx3 commented May 11, 2024

; IDF 4.4.4 / arduino 2.0.16 / building fine
platform = espressif32 @ ^6.6.0
platform_packages = 
	tool-mkspiffs @ 2.230.0
	platformio/framework-espidf @ ~3.40404.0
	platformio/framework-arduinoespressif32 @ ~3.20016.0

framework = arduino, espidf
board = esp32dev

@esp-zhp
Copy link
Collaborator

esp-zhp commented May 11, 2024

If you don't call ke_get_heap_free_size, the compilation should still proceed without issues, right?

@Koxx3
Copy link
Author

Koxx3 commented May 11, 2024

If you don't call ke_get_heap_free_size, the compilation should still proceed without issues, right?

yes. and the app runs perfectly with BT

@Koxx3
Copy link
Author

Koxx3 commented May 11, 2024

running logs in debug level :
https://koxx3.fr.eu.org:8086/device-monitor-240511-095738.zip

@Koxx3
Copy link
Author

Koxx3 commented May 11, 2024

oh !!! you gave me an idea !
I forced the declaration in esp_bt.h.

and it works now !

image

10:54:16.786 > main : free size = 6760 bytes
10:54:22.126 > main : free size = 6760 bytes
10:54:27.461 > main : free size = 6760 bytes
10:54:32.778 > main : free size = 6748 bytes

@Koxx3
Copy link
Author

Koxx3 commented May 11, 2024

yes, it really seems to leak :

10:54:16.786 > main : free size = 6760 bytes
10:54:22.126 > main : free size = 6760 bytes
10:54:27.461 > main : free size = 6760 bytes
10:54:32.778 > main : free size = 6748 bytes
10:54:38.107 > main : free size = 6768 bytes
10:54:43.449 > main : free size = 6744 bytes
10:54:48.793 > main : free size = 6760 bytes
10:54:54.135 > main : free size = 6944 bytes
10:54:59.476 > main : free size = 6760 bytes
10:55:04.818 > main : free size = 6760 bytes
10:55:10.156 > main : free size = 6748 bytes
10:55:15.527 > main : free size = 6760 bytes
10:55:20.861 > main : free size = 6760 bytes
10:55:26.196 > main : free size = 6764 bytes
10:55:31.523 > main : free size = 6744 bytes
10:55:36.860 > main : free size = 6760 bytes
10:55:42.191 > main : free size = 6768 bytes
10:55:47.530 > main : free size = 6748 bytes
10:55:52.854 > main : free size = 6748 bytes
10:55:58.180 > main : free size = 6768 bytes
10:56:03.504 > main : free size = 6760 bytes
10:56:08.836 > main : free size = 6744 bytes
10:56:14.177 > main : free size = 6744 bytes
10:56:19.519 > main : free size = 6760 bytes
10:56:24.847 > main : free size = 6768 bytes
10:56:30.171 > main : free size = 6760 bytes
10:56:35.532 > main : free size = 6944 bytes
10:56:40.872 > main : free size = 6740 bytes
10:56:46.223 > main : free size = 6748 bytes
10:56:51.581 > main : free size = 6760 bytes
10:56:56.925 > main : free size = 6760 bytes
10:57:02.262 > main : free size = 6760 bytes
10:57:07.604 > main : free size = 6744 bytes
10:57:12.935 > main : free size = 6744 bytes
10:57:18.281 > main : free size = 6744 bytes
10:57:23.634 > main : free size = 6744 bytes
10:57:28.973 > main : free size = 6732 bytes
10:57:34.309 > main : free size = 6744 bytes
10:57:39.651 > main : free size = 6744 bytes
10:57:45.000 > main : free size = 6736 bytes
10:57:50.340 > main : free size = 6732 bytes
10:57:55.664 > main : free size = 6744 bytes
10:58:01.005 > main : free size = 6728 bytes
10:58:06.342 > main : free size = 6744 bytes
10:58:11.688 > main : free size = 6728 bytes
10:58:17.031 > main : free size = 6928 bytes
10:58:22.377 > main : free size = 6744 bytes
10:58:27.711 > main : free size = 6744 bytes
10:58:33.060 > main : free size = 6744 bytes
10:58:38.405 > main : free size = 6764 bytes
10:58:43.738 > main : free size = 6744 bytes
10:58:49.068 > main : free size = 6744 bytes
10:58:54.401 > main : free size = 6728 bytes
10:58:59.731 > main : free size = 6744 bytes
10:59:05.089 > main : free size = 6744 bytes
10:59:10.424 > main : free size = 6728 bytes
10:59:15.767 > main : free size = 6724 bytes
10:59:21.146 > main : free size = 6724 bytes
10:59:26.511 > main : free size = 6724 bytes
10:59:31.861 > main : free size = 6712 bytes

@Koxx3
Copy link
Author

Koxx3 commented May 11, 2024

also, disconnecting and reconnecting BLE doesn't release the memory.

11:01:46.296 > main : free size = 6736 bytes
11:01:51.729 > main : free size = 6724 bytes
11:01:57.162 > main : free size = 6692 bytes
11:02:02.586 > main : free size = 6704 bytes
11:02:08.002 > main : free size = 6676 bytes
11:02:13.441 > main : free size = 6692 bytes
11:02:18.865 > main : free size = 6692 bytes
11:02:21.880 > BLH : onDisconnect - BEGIN
11:02:21.880 > BLH : onDisconnect - getConnectedCount = 0
11:02:21.881 > BLH : onDisconnect - END
11:02:21.881 > W NimBLEAdvertising: Advertising already active
11:02:24.226 > main : free size = 6964 bytes
11:02:25.223 > BLH : onConnect1 - getConnectedCount() : 1
11:02:25.224 > BLH : onConnect1 - nbFailure : 0
11:02:25.224 > BLH : onConnect2 - getPeerMTU() : 23
11:02:25.224 > BLH : onConnect2 - mtuReal - 3 : 20
11:02:25.438 > BLH : onAuthenticationComplete - BEGIN
11:02:25.438 > BLH : onAuthenticationComplete : success
11:02:25.454 > BLH : onAuthenticationComplete - END
11:02:25.620 > BLH : onMTUChange : 255
11:02:27.901 > BLH : onRead : beb5483e-36e1-4688-b7f5-ea07361b26a3
11:02:27.990 > BLH : onWrite : beb5483e-36e1-4688-b7f5-ea07361b26b7
11:02:27.990 > BLH : dateBle = 1715418148
11:02:27.993 > Saturday, May 11 2024 11:02:28
11:02:28.530 > BLH : onRead : beb5483e-36e1-4688-b7f5-ea07361b26a2
11:02:28.530 > BLH : setEbFirmwaresDataPacket
11:02:28.620 > BLH : onRead : beb5483e-36e1-4688-b7f5-ea07361b26a5
11:02:29.429 > BLH : onRead : beb5483e-36e1-4688-b7f5-ea07361b26a7
11:02:29.429 > ErrorLogger - getHistoryBytes ind = 0
11:02:29.520 > BLH : onRead : beb5483e-36e1-4688-b7f5-ea07361b26a8
11:02:29.610 > BLH : onRead : beb5483e-36e1-4688-b7f5-ea07361b26fc
11:02:29.643 > main : free size = 6672 bytes
11:02:29.730 > BLH : onWrite : beb5483e-36e1-4688-b7f5-ea07361b26fe
11:02:29.734 > W NimBLECharacteristic: Sending indication to client subscribed to notification, sending notification instead
11:02:29.757 > W NimBLECharacteristic: Sending indication to client subscribed to notification, sending notification instead
11:02:29.777 > W NimBLECharacteristic: Sending indication to client subscribed to notification, sending notification instead
11:02:30.240 > BLH : onWrite : beb5483e-36e1-4688-b7f5-ea07361b26a5
11:02:35.155 > main : free size = 6692 bytes
11:02:40.610 > main : free size = 6692 bytes
11:02:46.045 > main : free size = 6676 bytes
11:02:51.475 > main : free size = 6692 bytes

@esp-zhp
Copy link
Collaborator

esp-zhp commented May 11, 2024

If you can analyze the scenarios of memory leaks (broadcasting, scanning, connecting, etc.), it would be very helpful in resolving the issue.
What operations trigger memory leaks?

@Koxx3
Copy link
Author

Koxx3 commented May 21, 2024

crash :

PS C:\Users\koxx3\Documents\Coding\IDFGH-12768_idf_nimble> C:\Users\koxx3\.platformio\packages\toolchain-xtensa-esp32\bin\xtensa-esp32-elf-addr2line.exe -i -p -fe  C:\Users\koxx3\Documents\Coding\IDFGH-12768_idf_nimble\.pio\build\IDFGH-12768\firmware.elf 0x40086617:0x3ffcb930 0x400d2d79:0x3ffcb950 0x400ea091:0x3ffcb970 0x40094dc5:0x3ffcb990             
ke_mem_dbg_dump at ??:?
_Z4loopv at C:\Users\koxx3\Documents\Coding\IDFGH-12768_idf_nimble/src/main.cpp:201
_Z8loopTaskPv at C:/Users/koxx3/.platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:50
vPortTaskWrapper at C:\Users\koxx3\.platformio\packages\framework-espidf\components\freertos\port\xtensa/port.c:142

Log :
https://koxx3.fr.eu.org:8086/device-monitor-240521-190914.zip

@Koxx3
Copy link
Author

Koxx3 commented May 21, 2024

just before the crash ...

lot of "s=12 t=1 in r_ke_malloc_hack 215"

main : btContrl / free size = 1568 bytes  / new lowest !
====== KE MEM DUMP START ======
mem 0 used 1136 total 1964
queue 0  0
node 0x3ffb2fa8 free 800
node 0x3ffb3318 free 12
node 0x3ffb3330 free 16
mem 1 used 848 total 892
queue 0  0
node 0x3ffb2c28 free 20
node 0x3ffb2c4c free 12
node 0x3ffb2d4c free 12
mem 2 used 3924 total 4620
queue 0  0
node 0x3ffb3758 free 504
node 0x3ffb3b7c free 12
node 0x3ffb3d5c free 12
node 0x3ffb3de4 free 12
node 0x3ffb3e34 free 12
node 0x3ffb3eb8 free 12
node 0x3ffb3f2c free 12
node 0x3ffb3fe0 free 12
node 0x3ffb40b0 free 12
node 0x3ffb41fc free 12
node 0x3ffb4410 free 12
node 0x3ffb46cc free 12
node 0x3ffb47c4 free 12
mem leak 266
p=0x3ffb3734 s=32 t=0 in r_ke_malloc_hack 215
p=0x3ffb3674 s=12 t=0 in r_llm_set_scan_param 1500
p=0x3ffb2f98 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2f84 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2f60 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2f50 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2eac s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2e74 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2ed4 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2f30 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2e50 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2da0 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2f10 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2de8 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2f00 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2d7c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2d18 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2db8 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2eec s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2ce0 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2e8c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2f40 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb34bc s=16 t=0 in r_ke_malloc_hack 215
p=0x3ffb2c8c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2ca0 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3418 s=160 t=0 in r_ke_malloc_hack 215
p=0x3ffb3400 s=20 t=0 in r_ke_malloc_hack 215
p=0x3ffb2cf0 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3344 s=184 t=0 in r_llc_start 122
p=0x3ffb2f74 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2cc8 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2d6c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2f20 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb490c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2ec4 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2e10 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2c5c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2dd8 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2e64 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4878 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2e9c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2dc8 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2e38 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb481c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2e28 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb484c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2d90 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4888 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2d08 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2e00 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4804 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2d40 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb47b8 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2c6c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb47e4 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4958 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4864 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4790 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb476c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb491c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2d30 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2c7c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4738 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb46c0 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2cb8 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb492c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb48fc s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb48c0 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb48b0 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2c40 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb48d0 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb2d5c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb46fc s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4678 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb47d4 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb48e4 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb48a0 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb47a8 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb463c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb46dc s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb482c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4688 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4940 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4720 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb462c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb483c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4660 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb47f4 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb45dc s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4618 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4604 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb45cc s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4780 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb45bc s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb45a8 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4534 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4698 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb451c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4710 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb44e4 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb475c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb474c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb44d0 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4464 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4404 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4440 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb43f0 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4378 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4650 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb43c4 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb46b0 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb46ec s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb45ec s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb439c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4388 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4308 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb43b0 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb42f4 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb44f8 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4590 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4568 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb431c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb42e0 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4548 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb44bc s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4558 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4580 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb42a8 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb42cc s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb424c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb42b8 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4454 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4508 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4274 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4430 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb423c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb425c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb448c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb421c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb41d8 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb44a4 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4368 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb43d8 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4164 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4174 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4188 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb447c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4358 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb413c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4420 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb432c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4108 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4340 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb41b0 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb420c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb41f0 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb40f4 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4298 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4288 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb40e0 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb40a4 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb408c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb422c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb41a0 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4030 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb40c0 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4000 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb41c8 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3ff0 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3f84 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4050 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3f70 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4118 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3f08 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3e9c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3f5c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3ed8 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4068 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4128 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3e74 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3e44 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb407c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4154 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3e28 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3ec8 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb40d0 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3fb4 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4040 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3f3c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3e14 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3e04 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4020 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3ef8 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3dc0 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3df4 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3d50 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3d28 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3f94 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3d10 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3f4c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb4010 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3fc4 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3d38 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3cd8 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3c70 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3d00 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3cec s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3fd4 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3cc4 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3fa4 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3c88 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3c38 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3f20 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3e64 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3e8c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3c20 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3db0 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3b9c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3ee8 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3bbc s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3b50 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3bec s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3c10 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3eac s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3da0 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3b8c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3b3c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3b28 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3b04 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3d6c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3cb0 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3dd8 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3d7c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3c4c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3d8c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3a94 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3b14 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3c98 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3c60 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3c00 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3a7c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3a34 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb39e4 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3b70 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3964 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3a5c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3718 s=8 t=0 in r_ke_malloc_hack 215
p=0x3ffb3e54 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb39b8 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3bcc s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3af0 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb39f4 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3b60 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3bdc s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3bac s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3ab4 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3aa4 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3998 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb39a8 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3ac4 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3a6c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3a14 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3a4c s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3a24 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3a04 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3954 s=12 t=1 in r_ke_malloc_hack 215
p=0x3ffb3988 s=12 t=1 in r_ke_malloc_hack 215
====== KE MEM DUMP END ======

@espressif-bot espressif-bot added Status: In Progress Work is in progress and removed Status: Opened Issue is new labels May 22, 2024
@esp-zhp
Copy link
Collaborator

esp-zhp commented May 23, 2024

Thank you for your feedback. I have identified the memory leak in the ROM code. We need to investigate further, Thank you.

@Koxx3
Copy link
Author

Koxx3 commented May 23, 2024

Thank you for your feedback. I have identified the memory leak in the ROM code. We need to investigate further, Thank you.

in the ROM ??? does it means you won't be able to patch/fix it ?

@esp-zhp
Copy link
Collaborator

esp-zhp commented May 24, 2024

@Koxx3
Even if a memory leak occurs in the ROM, we have ways to fix it. Now, I need to pinpoint the exact location of the memory leak in the ROM code.

Can you help test whether the memory can be recovered after a memory leak by closing all BLE activities (including ADV, SCAN, and connections)?

@Koxx3
Copy link
Author

Koxx3 commented May 24, 2024

When i used ble::deinit, yes, it frees the memory. I've posted some logs above.
Do you need more individual testing ?

@esp-zhp
Copy link
Collaborator

esp-zhp commented May 24, 2024

There's no need to disable or deinitialize the BLE host and controller. Simply disconnecting and stopping advertising and scanning.
I have set up the PlatformIO environment on the Windows platform and will conduct further testing.

@esp-zhp
Copy link
Collaborator

esp-zhp commented May 24, 2024

BT controller compile version [ffbff3e]
ffbff3e.zip

@Koxx3
Copy link
Author

Koxx3 commented May 24, 2024

test with ffbff3e :
crashed in a strange way
Core 0 panic'ed (Cache disabled but cached memory region accessed).

main : btContrl / free size = 6016 bytes  / new lowest !
====== KE MEM DUMP START ======
queue 0  0 22 4
mem leak 60, timer 30479
p=0x3ffb3734 s=32 t=0 in r_ke_malloc_hack 202
p=0x3ffb35d0 s=160 t=0 in r_ke_malloc_hack 202
p=0x3ffb3674 s=12 t=0 in r_llm_set_scan_param 1500
p=0x3ffb2f24 s=12 t=1 in r_ke_timer_set_hack 334
p=0x3ffb2f94 s=12 t=1 in r_ke_timer_set_hack 334
p=0x3ffb2f10 s=12 t=1 in r_ke_timer_set_hack 334
p=0x3ffb2e4c s=12 t=1 in r_ke_timer_set_hack 334
p=0x3ffb2e6c s=12 t=1 in r_ke_timer_set_hack 334
p=0x3ffb2f74 s=12 t=1 in r_ke_timer_set_hack 334
p=0x3ffb2ebc s=12 t=1 in r_ke_timer_set_hack 334
p=0x3ffb2f60 s=12 t=1 in r_ke_timer_set_hack 334
p=0x3ffb2e24 s=12 t=1 in r_ke_timer_set_hack 334
p=0x3ffb2e9c s=12 t=1 in r_ke_timer_set_hack 334
p=0x3ffb3558 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
p=0x3ffb3724 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
p=0x3ffb3708 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
p=0x3ffb36f8 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
p=0x3ffb34f0 s=16 t=0 in r_ke_malloc_hack 202
p=0x3ffb2e5c s=12 t=1 in r_ke_timer_set_hack 334
p=0x3ffb36ec s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
p=0x3ffb2eac s=12 t=1 in r_ke_timer_set_hack 334
p=0x3ffb344c s=160 t=0 in r_ke_malloc_hack 202
p=0x3ffb3434 s=20 t=0 in r_ke_malloc_hack 202
p=0x3ffb3718 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
p=0x3ffb3378 s=184 t=0 in r_llc_start 122
p=0x3ffb2f84 s=12 t=1 in r_ke_timer_set_hack 334
p=0x3ffb2e3c s=12 t=1 in r_ke_timer_set_hack 334
p=0x3ffb2e8c s=12 t=1 in r_ke_timer_set_hack 334
p=0x3ffb36dc s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
p=0x3ffb2f50 s=12 t=1 in r_ke_timer_set_hack 334
p=0x3ffb36cc s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
p=0x3ffb36a8 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
p=0x3ffb2f34 s=12 t=1 in r_ke_timer_set_hack 334
p=0x3ffb35c0 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
p=0x3ffb2ee4 s=12 t=1 in r_ke_timer_set_hack 334
p=0x3ffb3698 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
p=0x3ffb36b4 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
p=0x3ffb35b0 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
p=0x3ffb2e7c s=12 t=1 in r_ke_timer_set_hack 334
p=0x3ffb2dcc s=12 t=1 in r_ke_timer_set_hack 334
p=0x3ffb3530 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
p=0x3ffb2df4 s=12 t=1 in r_ke_timer_set_hack 334
p=0x3ffb36c0 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
p=0x3ffb3684 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
p=0x3ffb2e14 s=12 t=1 in r_ke_timer_set_hack 334
p=0x3ffb3504 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
p=0x3ffb2dbc s=12 t=1 in r_ke_timer_set_hack 334
p=0x3ffb2e04 s=12 t=1 in r_ke_timer_set_hack 334
p=0x3ffb2dac s=12 t=1 in r_ke_timer_set_hack 334
p=0x3ffb3520 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
p=0x3ffb3540 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
p=0x3ffb3568 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
p=0x3ffb3514 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
p=0x3ffb3594 s=8 t=0 in r_ke_malloc_hack 202
p=0x3ffb354c s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
====== KE MEM DUMP END ======
main : btContrl / free size = 6304 bytes 
main : btContrl / free size = 6272 bytes 
main : btContrl / free size = 6224 bytes 
main : btContrl / free size = 6284 bytes 
Guru Meditation Error: Core  0 panic'ed (Cache disabled but cached memory region accessed). 
Core  0 register dump:
PC      : 0x400fbd0c  PS      : 0x00060035  A0      : 0x80086bfc  A1      : 0x3ffc0c68  
A2      : 0x3ffb2f84  A3      : 0x400fbd0c  A4      : 0x002f0007  A5      : 0x3ffb93f4  
A6      : 0x00000000  A7      : 0x3ffb8360  A8      : 0x80055fe4  A9      : 0x3ffc0c38  
A10     : 0x3ffb2f84  A11     : 0x002f0007  A12     : 0x4008181a  A13     : 0x3ffc0d68  
A14     : 0x0000000f  A15     : 0x00008000  SAR     : 0x00000011  EXCCAUSE: 0x00000007  
EXCVADDR: 0x00000000  LBEG    : 0x40086594  LEND    : 0x400865d5  LCOUNT  : 0x000003db  

Backtrace: 0x400fbd09:0x3ffc0c68 |<-CORRUPTED

ELF file SHA256: afdae2904ca01e84
Rebooting...

Full log :
https://koxx3.fr.eu.org:8086/device-monitor-240524-184652_.zip

@Koxx3
Copy link
Author

Koxx3 commented May 24, 2024

Full log :
https://koxx3.fr.eu.org:8086/device-monitor-240524-191848.zip

@esp-zhp
Copy link
Collaborator

esp-zhp commented May 25, 2024

Based on your feedback,

The memory allocated by "r_ke_timer_set_hack" has not been released. However, I also noticed that there is still data in the queue that hasn't been processed in time.

I observed that our program sends a notify signal 4 times within 0.1 seconds, which is a very short interval. Could the reason for the unreleased memory be that the information in the queue hasn't been processed yet?

Have you verified whether the memory is released after stopping the scan and advertising, and disconnecting? If the memory is still not released after stopping advertising and scanning, and disconnecting, then we can confirm that there is a memory leak in the internal controller function "r_ke_timer_set_hack."

Could you run a test to check this?
image

@Koxx3
Copy link
Author

Koxx3 commented May 25, 2024

1/ The ffbff3e library has a serious issue/crashes !!
=> Cache disabled but cached memory region accessed. => my test app does some nvs/flash writing, it seems related, but it's mandatory for our final app.
=> some crashes without even a stack trace !

2/ My app doesn't advertise once a device is connected

3/ I don't think it's related to the number of messages because :

Test : 1 notif every 100ms + scan + no advertising
Log : https://koxx3.fr.eu.org:8086/device-monitor-240525-112245.log
Timing :

  • 11:22:45.532 start
  • 11:37:44.492 => mem leak 53
  • 11:53:53.102 => mem leak 59
  • 11:56:54.520 test end
    => Status : leak observed but slower

4/ Have you verified whether the memory is released after stopping the scan and advertising, and disconnecting?

  • stop advertising : already stopped once connected in my example
  • stop scan + disconnect + wait 10s + restart advertising : memory isn't fully released, lots of r_ke_timer_set_hack remaining

Full log with partial restart :
Log : https://koxx3.fr.eu.org:8086/device-monitor-240525-104411.log

Example of 'restart' :

10:50:43.778 > main : btContrl / free size = 5860 bytes  / new lowest !
10:50:43.779 > ====== KE MEM DUMP START ======
10:50:43.779 > queue 0  0 32 4
10:50:43.780 > mem leak 67, timer 23374
10:50:43.780 > p=0x3ffb3734 s=32 t=0 in r_ke_malloc_hack 202
10:50:43.781 > p=0x3ffb3690 s=160 t=0 in r_ke_malloc_hack 202
10:50:43.781 > p=0x3ffb3674 s=12 t=0 in r_llm_set_scan_param 1500
10:50:43.782 > p=0x3ffb2f70 s=12 t=1 in r_ke_timer_set_hack 334
10:50:43.782 > p=0x3ffb2f5c s=12 t=1 in r_ke_timer_set_hack 334
10:50:43.783 > p=0x3ffb2f44 s=12 t=1 in r_ke_timer_set_hack 334
10:50:43.783 > p=0x3ffb2f0c s=12 t=1 in r_ke_timer_set_hack 334
10:50:43.784 > p=0x3ffb2e88 s=12 t=1 in r_ke_timer_set_hack 334
10:50:43.784 > p=0x3ffb2ed0 s=12 t=1 in r_ke_timer_set_hack 334
10:50:43.785 > p=0x3ffb2e70 s=12 t=1 in r_ke_timer_set_hack 334
10:50:43.785 > p=0x3ffb2e14 s=12 t=1 in r_ke_timer_set_hack 334
10:50:43.786 > p=0x3ffb2ee0 s=12 t=1 in r_ke_timer_set_hack 334
10:50:43.786 > p=0x3ffb2e3c s=12 t=1 in r_ke_timer_set_hack 334
10:50:43.787 > p=0x3ffb2e24 s=12 t=1 in r_ke_timer_set_hack 334
10:50:43.788 > p=0x3ffb2e50 s=12 t=1 in r_ke_timer_set_hack 334
10:50:43.788 > p=0x3ffb3574 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
10:50:43.789 > p=0x3ffb2ec0 s=12 t=1 in r_ke_timer_set_hack 334
10:50:43.789 > p=0x3ffb3668 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
10:50:43.790 > p=0x3ffb2e60 s=12 t=1 in r_ke_timer_set_hack 334
10:50:43.791 > p=0x3ffb3658 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
10:50:43.791 > p=0x3ffb3648 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
10:50:43.792 > p=0x3ffb3638 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
10:50:43.793 > p=0x3ffb35c4 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
10:50:43.794 > p=0x3ffb2f30 s=12 t=1 in r_ke_timer_set_hack 334
10:50:43.794 > p=0x3ffb3684 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
10:50:43.795 > p=0x3ffb2ea8 s=12 t=1 in r_ke_timer_set_hack 334
10:50:43.795 > p=0x3ffb3498 s=16 t=0 in r_ke_malloc_hack 202
10:50:43.796 > p=0x3ffb3628 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
10:50:43.797 > p=0x3ffb33f4 s=160 t=0 in r_ke_malloc_hack 202
10:50:43.797 > p=0x3ffb33dc s=20 t=0 in r_ke_malloc_hack 202
10:50:43.798 > p=0x3ffb3568 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
10:50:43.798 > p=0x3ffb3320 s=184 t=0 in r_llc_start 122
10:50:43.799 > p=0x3ffb2f84 s=12 t=1 in r_ke_timer_set_hack 334
10:50:43.799 > p=0x3ffb35d4 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
10:50:43.800 > p=0x3ffb361c s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
10:50:43.801 > p=0x3ffb2f94 s=12 t=1 in r_ke_timer_set_hack 334
10:50:43.801 > p=0x3ffb2f20 s=12 t=1 in r_ke_timer_set_hack 334
10:50:43.802 > p=0x3ffb35a8 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
10:50:43.803 > p=0x3ffb35f4 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
10:50:43.803 > p=0x3ffb2e98 s=12 t=1 in r_ke_timer_set_hack 334
10:50:43.804 > p=0x3ffb2ef8 s=12 t=1 in r_ke_timer_set_hack 334
10:50:43.805 > p=0x3ffb360c s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
10:50:43.805 > p=0x3ffb3600 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
10:50:43.806 > p=0x3ffb3588 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
10:50:43.807 > p=0x3ffb35b8 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
10:50:43.807 > p=0x3ffb2dc4 s=12 t=1 in r_ke_timer_set_hack 334
10:50:43.808 > p=0x3ffb2e04 s=12 t=1 in r_ke_timer_set_hack 334
10:50:43.809 > p=0x3ffb3548 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
10:50:43.809 > p=0x3ffb35e4 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
10:50:43.809 > p=0x3ffb3598 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
10:50:43.810 > p=0x3ffb3538 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
10:50:43.811 > p=0x3ffb3558 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
10:50:43.811 > p=0x3ffb351c s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
10:50:43.812 > p=0x3ffb350c s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
10:50:43.814 > p=0x3ffb352c s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
10:50:43.815 > p=0x3ffb34f0 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
10:50:43.815 > p=0x3ffb34c0 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
10:50:43.816 > p=0x3ffb34e4 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
10:50:43.817 > p=0x3ffb3500 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
10:50:43.818 > p=0x3ffb34d8 s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
10:50:43.818 > p=0x3ffb34cc s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
10:50:43.819 > p=0x3ffb34ac s=8 t=0 in llm_util_check_adv_report_list_by_hash 279
10:50:43.820 > p=0x3ffb3304 s=8 t=0 in r_ke_malloc_hack 202
10:50:43.820 > ====== KE MEM DUMP END ======
terminal : No command received
10:50:46.314 >
10:50:46.318 >
10:50:47.548 > main : btContrl / free size = 6108 bytes 
BLH : stop scanning ...
10:50:52.459 > BLH : stop scanning ... done
10:50:52.469 > BLH : stop advertising ...
10:50:52.470 > BLH : force disconnect ...
10:50:52.521 > BLH : onDisconnect - BEGIN
10:50:52.523 > BLH : onDisconnect - getConnectedCount = 0
10:50:52.523 > BLH : onDisconnect - END
10:50:52.523 > W NimBLEAdvertising: Advertising already active
10:51:02.470 > W NimBLEAdvertising: Advertising already active
10:51:02.471 > watchdog => ignored
10:51:02.480 > BLH : restart ... done
10:51:02.481 > ====== KE MEM DUMP START ======
10:51:02.481 > queue 0  0 0 0
10:51:02.481 > mem leak 23, timer 23857
10:51:02.482 > p=0x3ffb3734 s=32 t=0 in r_ke_malloc_hack 202
10:51:02.482 > p=0x3ffb3690 s=160 t=0 in r_ke_malloc_hack 202
10:51:02.482 > p=0x3ffb3674 s=12 t=0 in r_llm_set_scan_param 1500
10:51:02.482 > p=0x3ffb2f70 s=12 t=1 in r_ke_timer_set_hack 334
10:51:02.483 > p=0x3ffb2f5c s=12 t=1 in r_ke_timer_set_hack 334
10:51:02.483 > p=0x3ffb2f44 s=12 t=1 in r_ke_timer_set_hack 334
10:51:02.485 > p=0x3ffb2f0c s=12 t=1 in r_ke_timer_set_hack 334
10:51:02.485 > p=0x3ffb2e88 s=12 t=1 in r_ke_timer_set_hack 334
10:51:02.486 > p=0x3ffb2ed0 s=12 t=1 in r_ke_timer_set_hack 334
10:51:02.486 > p=0x3ffb2e70 s=12 t=1 in r_ke_timer_set_hack 334
10:51:02.487 > p=0x3ffb2e14 s=12 t=1 in r_ke_timer_set_hack 334
10:51:02.488 > p=0x3ffb2ee0 s=12 t=1 in r_ke_timer_set_hack 334
10:51:02.488 > p=0x3ffb2e3c s=12 t=1 in r_ke_timer_set_hack 334
10:51:02.489 > p=0x3ffb2e24 s=12 t=1 in r_ke_timer_set_hack 334
10:51:02.489 > p=0x3ffb2e50 s=12 t=1 in r_ke_timer_set_hack 334
10:51:02.490 > p=0x3ffb2ec0 s=12 t=1 in r_ke_timer_set_hack 334
10:51:02.490 > p=0x3ffb2e60 s=12 t=1 in r_ke_timer_set_hack 334
10:51:02.491 > p=0x3ffb3684 s=8 t=0 in r_ke_malloc_hack 202
10:51:02.491 > p=0x3ffb2f30 s=12 t=1 in r_ke_timer_set_hack 334
10:51:02.492 > p=0x3ffb2ea8 s=12 t=1 in r_ke_timer_set_hack 334
10:51:02.492 > p=0x3ffb2e98 s=12 t=1 in r_ke_timer_set_hack 334
10:51:02.493 > p=0x3ffb2ef8 s=12 t=1 in r_ke_timer_set_hack 334
10:51:02.493 > p=0x3ffb2dc4 s=12 t=1 in r_ke_timer_set_hack 334
10:51:02.493 > ====== KE MEM DUMP END ======

@esp-zhp
Copy link
Collaborator

esp-zhp commented May 28, 2024

@Koxx3
Thank you for waiting.

1-"Cache disabled but cached memory region accessed."
I have fixed this issue. It was related to the debug code I added.
Both "ke_get_heap_free_size" and "ke_mem_dbg_dump" are now functioning correctly.
2-The memory leak issue has been preliminarily resolved.
The fixed library version is: "BT controller compile version [efade7a]."
Please note that this library is a debug version, intended to verify the effectiveness of the fixes. The debug version will consume more resources(flash and RAM)and may include some logging. If your testing confirms that the debug version works as expected, I will promptly provide you with the release version and update the latest IDF.

I look forward to your feedback. Thank you.

efade7a.zip

my test log:

device-monitor-240528-132617.log

some code change in my test:

image

@Koxx3
Copy link
Author

Koxx3 commented May 28, 2024

Thanks. Let's go for a test !

@esp-zhp
Copy link
Collaborator

esp-zhp commented May 29, 2024

@Koxx3
Do you have the test results on your end? I've conducted over 15 hours of testing, and everything is working fine. The new fix does not have any memory leaks or other issues.
in begin:
image

atfer 15 hours:
image

@Koxx3
Copy link
Author

Koxx3 commented May 29, 2024

24h tests with the example :

09:44:16.646 > main : btContrl / free size = 6392 bytes
09:46:48.280 > main : btContrl / free size = 6308 bytes
09:49:20.025 > main : btContrl / free size = 6336 bytes
09:51:51.707 > main : btContrl / free size = 6316 bytes
09:54:23.469 > main : btContrl / free size = 6324 bytes
09:56:55.159 > main : btContrl / free size = 6348 bytes
09:59:26.847 > main : btContrl / free size = 6348 bytes
10:01:58.471 > main : btContrl / free size = 6268 bytes 
10:04:30.094 > main : btContrl / free size = 6396 bytes 
10:07:01.830 > main : btContrl / free size = 6436 bytes 
10:09:33.560 > main : btContrl / free size = 6408 bytes 

stable at ~6400 bytes.
It seems a win ;)

I'll continue test within the final app now.

Could you please :

  • generate a release version for IDF 4.4.4 (but if possible keep ke_get_heap_free_size)
  • generate a release version for IDF 4.4.7 (but if possible keep ke_get_heap_free_size)

Thanks a lot !

@Koxx3
Copy link
Author

Koxx3 commented May 30, 2024

Unfortunatly, I still have a some crashes.
I don't see any memory decrease before the crash.

02:37:23.056 > ASSERT_PARAM(4 13), in llm_util.c at line 215
02:37:23.056 > Guru Meditation Error: Core  0 panic'ed (IllegalInstruction). Exception was unhandled.
02:37:23.084 > Memory dump at 0x40090f98: f01d020c 00004136 f01d0000
02:37:23.084 > Core  0 register dump:
02:37:23.084 > PC      : 0x40090f9f  PS      : 0x00060a30  A0      : 0x800865a1  A1      : 0x3ffb5cf0
02:37:23.084 > A2      : 0x00000000  A3      : 0x00000004  A4      : 0x0000000d  A5      : 0x3f435c64
02:37:23.084 > A6      : 0x000000d7  A7      : 0xfffffffc  A8      : 0x8000814b  A9      : 0x3ffb5c60
02:37:23.084 > A10     : 0x00000000  A11     : 0x3ffb5c83  A12     : 0x3ffb5c2f  A13     : 0x00000035
02:37:23.084 > A14     : 0x00000000  A15     : 0x3ffb5c34  SAR     : 0x00000004  EXCCAUSE: 0x00000000
02:37:23.084 > EXCVADDR: 0x00000000  LBEG    : 0x400864a9  LEND    : 0x400864b1  LCOUNT  : 0x00000000


PS C:\Users\koxx3\Documents\Coding\SmartController_SmartDisplay_ESP32_priv3> C:\Users\koxx3\.platformio\packages\toolchain-xtensa-esp32\bin\xtensa-esp32-elf-addr2line.exe -i -p -fe  C:\Users\koxx3\Documents\Coding\SmartController_SmartDisplay_ESP32_priv3\.pio\build\smartdisplay_vesc_35v2_pcb210\firmware.elf 0x40090f9c:0x3ffb5cf0 0x4008659e:0x3ffb5d10 0x401ae275:0x3ffb5d30 0x401ab1d3:0x3ffb5d80 0x401a83be:0x3ffb5dd0 0x40019d11:0x3ffb5e10 0x40055b4d:0x3ffb5e30 0x4019df23:0x3ffb5e50 0x4019e591:0x3ffb5e70 0x400970cd:0x3ffb5ea0                                                                                                                                                         
r_assert at C:\Users\koxx3\.platformio\packages\framework-espidf\components\bt\controller\esp32/bt.c:1871
r_assert_param at ??:?
r_llm_pdu_defer at ??:?
r_lld_pdu_check at ??:?
r_lld_evt_deffered_elt_handler at ??:?
?? ??:0
?? ??:0
r_rw_schedule at ??:?
btdm_controller_task at ??:?
vPortTaskWrapper at C:\Users\koxx3\.platformio\packages\framework-espidf\components\freertos\port\xtensa/port.c:142

@Koxx3
Copy link
Author

Koxx3 commented May 30, 2024

This crash was in my final app.
Here are the main differences :

            pBLEScan->setActiveScan(true);
            pBLEScan->setMaxResults(30);

            // NEW TEST - no improvement
            pBLEScan->clearResults();

            pBLEScan->setInterval(100);
            pBLEScan->setWindow(98); // less or equal setInterval value

and sdkconfig :

CONFIG_BTDM_BLE_DEFAULT_SCA_250PPM=y
CONFIG_BTDM_BLE_SLEEP_CLOCK_ACCURACY_INDEX_EFF=1
CONFIG_BTDM_BLE_SCAN_DUPL=y
CONFIG_BTDM_SCAN_DUPL_TYPE_DEVICE=y
# CONFIG_BTDM_SCAN_DUPL_TYPE_DATA is not set
# CONFIG_BTDM_SCAN_DUPL_TYPE_DATA_DEVICE is not set
CONFIG_BTDM_SCAN_DUPL_TYPE=0
CONFIG_BTDM_SCAN_DUPL_CACHE_SIZE=100
# CONFIG_BTDM_BLE_MESH_SCAN_DUPL_EN is not set
# CONFIG_BTDM_CTRL_FULL_SCAN_SUPPORTED is not set
# CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_SUPP is not set
CONFIG_BTDM_RESERVE_DRAM=0xdb5c
CONFIG_BTDM_CTRL_HLI=y
# end of Bluetooth controller

I'll retry with similar scan params than the example I provided you.

@Koxx3
Copy link
Author

Koxx3 commented May 30, 2024

Can the sdkcondig, active scan or scan param have such impacts ?

@esp-zhp
Copy link
Collaborator

esp-zhp commented May 30, 2024

ASSERT_PARAM(4 13), in llm_util.c at line 215 is a known issue,see:
#13516
and has been fixed.

@esp-zhp
Copy link
Collaborator

esp-zhp commented May 30, 2024

This is the release version,
which also includes the fix for 'ASSERT_PARAM(4 13), in llm_util.c at line 215.'
Version 4.4.4 has already been tested locally by me, and version 4.4.7 needs to be tested locally by you.
IDFGH_12768(20240530).zip

@Koxx3
Copy link
Author

Koxx3 commented May 30, 2024

Thanks, i'll be able to test in 8h.

@Koxx3
Copy link
Author

Koxx3 commented May 31, 2024

Running connected & scanning for 14h on 2 boards / 2 phones for now (with 4.4.4).
No leak, no crash for now.

@Koxx3
Copy link
Author

Koxx3 commented Jun 1, 2024

Running for 36h without trouble (with 4.4.4). I think we can consider this issue closed !
Thanks a lot for the fix.

@Koxx3 Koxx3 closed this as completed Jun 1, 2024
@espressif-bot espressif-bot added Status: Done Issue is done internally Resolution: NA Issue resolution is unavailable and removed Status: In Progress Work is in progress labels Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally
Projects
None yet
Development

No branches or pull requests

3 participants