Skip to content

Constant assert in ble_hs_id_addr() #121

@kenh-sq

Description

@kenh-sq

Checklist

  • Checked the issue tracker for similar issues to ensure this is not a duplicate
  • Read the documentation to confirm the issue is not addressed there and your configuration is set correctly
  • Tested with the latest version to ensure the issue hasn't been fixed

How often does this bug occurs?

always

Expected behavior

No asserts during initialization.

Actual behavior (suspected bug)

Attempted migration from ESP-IDF v5.5.3 to v5.5.4.

BLE_HS_DBG_ASSERT(ble_hs_locked_by_cur_task()); is always getting hit at init.

Error logs or terminal output

gdb backtrace:


#0  panic_abort (details=details@entry=0x408512a8 "assert failed: ble_hs_id_addr ble_hs_id.c:295 (ble_hs_locked_by_cur_task())") at C:\Users\yournamehere\esp\v5.5.4\esp-idf\components\esp_system\panic.c:491
#1  0x4080e324 in esp_system_abort (details=details@entry=0x408512a8 "assert failed: ble_hs_id_addr ble_hs_id.c:295 (ble_hs_locked_by_cur_task())") at C:\Users\yournamehere\esp\v5.5.4\esp-idf\components\esp_system\port\esp_system_chip.c:87
#2  0x40812ff6 in __assert_func (file=<optimized out>, file@entry=0x420a8ea3 "ble_hs_id.c", line=line@entry=295, func=<optimized out>, func@entry=0x420b92f4 <__func__.2> "ble_hs_id_addr", expr=<optimized out>, expr@entry=0x420a8e50 "ble_hs_locked_by_cur_task()") at C:\Users\yournamehere\esp\v5.5.4\esp-idf\components\newlib\src\assert.c:81
#3  0x4201e2fc in ble_hs_id_addr (id_addr_type=id_addr_type@entry=0 '\000', out_id_addr=out_id_addr@entry=0x408513cc, out_is_nrpa=out_is_nrpa@entry=0x0) at C:\Users\yournamehere\esp\v5.5.4\esp-idf\components\bt\host\nimble\nimble\nimble\host\src\ble_hs_id.c:295
#4  0x420288a2 in ble_hs_pvcy_set_default_irk () at C:\Users\yournamehere\esp\v5.5.4\esp-idf\components\bt\host\nimble\nimble\nimble\host\src\ble_hs_pvcy.c:308
#5  0x42023fa4 in ble_hs_startup_go () at C:\Users\yournamehere\esp\v5.5.4\esp-idf\components\bt\host\nimble\nimble\nimble\host\src\ble_hs_startup.c:575
#6  0x4201e640 in ble_hs_sync () at C:\Users\yournamehere\esp\v5.5.4\esp-idf\components\bt\host\nimble\nimble\nimble\host\src\ble_hs.c:476
#7  0x4201eb92 in ble_hs_start () at C:\Users\yournamehere\esp\v5.5.4\esp-idf\components\bt\host\nimble\nimble\nimble\host\src\ble_hs.c:814
#8  ble_hs_start () at C:\Users\yournamehere\esp\v5.5.4\esp-idf\components\bt\host\nimble\nimble\nimble\host\src\ble_hs.c:765
#9  0x4201ebd8 in ble_hs_event_start_stage2 (ev=<optimized out>) at C:\Users\yournamehere\esp\v5.5.4\esp-idf\components\bt\host\nimble\nimble\nimble\host\src\ble_hs.c:707
#10 0x40802916 in ble_npl_event_run (ev=0x408372e4 <ble_hs_ev_start_stage2>) at C:\Users\yournamehere\esp\v5.5.4\esp-idf\components\bt\porting\npl\freertos\include\nimble\nimble_npl_os.h:175
#11 nimble_port_run () at C:\Users\yournamehere\esp\v5.5.4\esp-idf\components\bt\host\nimble\nimble\porting\nimble\src\nimble_port.c:422
#12 0x4201b136 in spBleHostTask (cx=<optimized out>) at C:\esp\projects\sptv3-esp32-c6\main\spble.c:483
#13 0x00000000 in ?? ()

Steps to reproduce the behavior

  1. Build and download.
  2. Attempt to start NimBLE (nimble_port_run()).

Project release version

ESP-IDF v5.5.4; esp-nimble @ 5c1a43ca3d205c3d5183e57dedce335fb6a81155

System architecture

Intel/AMD 64-bit (modern PC, older Mac)

Operating system

Windows

Operating system version

Win 11

Shell

Bash

Additional context

sdkconfig.txt if needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions