Load Prohibited panic within BLE

etha890
Posts: 9
Joined: Tue Oct 23, 2018 2:27 am

Load Prohibited panic within BLE

Postby etha890 » Wed Oct 24, 2018 5:30 am

Using IDF 3.1

I am observing a Load Prohibited unhanded exception, whilst running some ble and wifi code. Analysing the core dump yields the following.

The crash takes some time to occur and seems that the function which is causing the crash is within the IDF (L2CA_CheckIsCongest).

Any ideas?

Code: Select all

===============================================================
==================== ESP32 CORE DUMP START ====================

================== CURRENT THREAD REGISTERS ===================
pc             0x4010562c       0x4010562c <L2CA_CheckIsCongest+24>
lbeg           0x0      0
lend           0x0      0
lcount         0x0      0
sar            0x0      0
ps             0x60730  395056
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             0x3ffb3f90       1073430416
a1             0x0      0
a2             0x0      0
a3             0x0      0
a4             0x0      0
a5             0x0      0
a6             0x0      0
a7             0x0      0
a8             0x0      0
a9             0x0      0
a10            0x0      0
a11            0x0      0
a12            0x0      0
a13            0x0      0
a14            0x0      0
a15            0x0      0

==================== CURRENT THREAD STACK =====================
#0  0x4010562c in L2CA_CheckIsCongest (fixed_cid=<optimized out>, handle=0) at C:/msys32/home/EthanA/esp-idf-v3.1/components/bt/bluedroid/stack/l2cap/l2c_api.c:1849

======================== THREADS INFO =========================
  Id   Target Id         Frame
  20   process 19        0x40091c3d in xQueueGenericReceive (xQueue=0x3ffd366c, pvBuffer=0x0, xTicksToWait=4294967295, xJustPeeking=0) at C:/msys32/home/EthanA/esp-idf-v3.1/compo                                                           nents/freertos/queue.c:1591
  19   process 18        0x40091c3d in xQueueGenericReceive (xQueue=0x3ffb5b30, pvBuffer=0x3ffb7010, xTicksToWait=4294967295, xJustPeeking=0) at C:/msys32/home/EthanA/esp-idf-v3.                                                           1/components/freertos/queue.c:1591
  18   process 17        0x40091c3d in xQueueGenericReceive (xQueue=0x3ffb4c78, pvBuffer=0x3ffb5640, xTicksToWait=4294967295, xJustPeeking=0) at C:/msys32/home/EthanA/esp-idf-v3.                                                           1/components/freertos/queue.c:1591
  17   process 16        0x40091c3d in xQueueGenericReceive (xQueue=0x3ffbd5b8, pvBuffer=0x3ffb4ae0, xTicksToWait=4294967295, xJustPeeking=0) at C:/msys32/home/EthanA/esp-idf-v3.                                                           1/components/freertos/queue.c:1591
  16   process 15        0x40091c3d in xQueueGenericReceive (xQueue=0x3ffbbb98, pvBuffer=0x3ffbcb60, xTicksToWait=4294967295, xJustPeeking=0) at C:/msys32/home/EthanA/esp-idf-v3.                                                           1/components/freertos/queue.c:1591
  15   process 14        0x40091c3d in xQueueGenericReceive (xQueue=0x3ffd9b30, pvBuffer=0x3ffdaf80, xTicksToWait=4294967295, xJustPeeking=0) at C:/msys32/home/EthanA/esp-idf-v3.                                                           1/components/freertos/queue.c:1591
  14   process 13        0x40091c3d in xQueueGenericReceive (xQueue=0x3ffd22f4, pvBuffer=0x0, xTicksToWait=4294967295, xJustPeeking=0) at C:/msys32/home/EthanA/esp-idf-v3.1/compo                                                           nents/freertos/queue.c:1591
  13   process 12        0x40091c3d in xQueueGenericReceive (xQueue=0x3ffd87ac, pvBuffer=0x3ffd9840, xTicksToWait=4294967295, xJustPeeking=0) at C:/msys32/home/EthanA/esp-idf-v3.                                                           1/components/freertos/queue.c:1591
  12   process 11        0x40091c3d in xQueueGenericReceive (xQueue=0x3ffd3c2c, pvBuffer=0x0, xTicksToWait=4294967295, xJustPeeking=0) at C:/msys32/home/EthanA/esp-idf-v3.1/compo                                                           nents/freertos/queue.c:1591
  11   process 10        0x400923d4 in prvProcessTimerOrBlockTask (xNextExpireTime=<optimized out>, xListWasEmpty=<optimized out>) at C:/msys32/home/EthanA/esp-idf-v3.1/component                                                           s/freertos/timers.c:588
  10   process 9         0x40091c3d in xQueueGenericReceive (xQueue=0x3ffd7a4c, pvBuffer=0x3ffd84e0, xTicksToWait=56, xJustPeeking=0) at C:/msys32/home/EthanA/esp-idf-v3.1/compon                                                           ents/freertos/queue.c:1591
  9    process 8         0x400907b2 in vTaskDelay (xTicksToDelay=<optimized out>) at C:/msys32/home/EthanA/esp-idf-v3.1/components/freertos/tasks.c:1491
  8    process 7         0x400907b2 in vTaskDelay (xTicksToDelay=<optimized out>) at C:/msys32/home/EthanA/esp-idf-v3.1/components/freertos/tasks.c:1491
  7    process 6         0x400907b2 in vTaskDelay (xTicksToDelay=<optimized out>) at C:/msys32/home/EthanA/esp-idf-v3.1/components/freertos/tasks.c:1491
  6    process 5         0x400907b2 in vTaskDelay (xTicksToDelay=<optimized out>) at C:/msys32/home/EthanA/esp-idf-v3.1/components/freertos/tasks.c:1491
  5    process 4         0x400907b2 in vTaskDelay (xTicksToDelay=<optimized out>) at C:/msys32/home/EthanA/esp-idf-v3.1/components/freertos/tasks.c:1491
  4    process 3         0x40190d2e in esp_vApplicationWaitiHook () at C:/msys32/home/EthanA/esp-idf-v3.1/components/esp32/freertos_hooks.c:66
  3    process 2         0x40190d2e in esp_vApplicationWaitiHook () at C:/msys32/home/EthanA/esp-idf-v3.1/components/esp32/freertos_hooks.c:66
  2    process 1         0x400907b2 in vTaskDelay (xTicksToDelay=<optimized out>) at C:/msys32/home/EthanA/esp-idf-v3.1/components/freertos/tasks.c:1491
* 1    <main task>       0x4010562c in L2CA_CheckIsCongest (fixed_cid=<optimized out>, handle=0) at C:/msys32/home/EthanA/esp-idf-v3.1/components/bt/bluedroid/stack/l2cap/l2c_api                                                           .c:1849

======================= ALL MEMORY REGIONS ========================
Name   Address   Size   Attrs
.rtc.text 0x400c0000 0x0 RW
.rtc_noinit 0x50000000 0x0 RW
.iram0.vectors 0x40080000 0x400 R XA
.iram0.text 0x40080400 0x15acc RWXA
.dram0.data 0x3ffc0000 0x3c90 RW A
.noinit 0x3ffc3c90 0x0 RW
.flash.rodata 0x3f400020 0x21a94 RW A
.flash.text 0x400d0018 0xc3b50 R XA
.coredump.tasks 0x3ffbd0d4 0x164 RW
.coredump.tasks 0x3ffb3ed0 0x2a0 RW
.coredump.tasks 0x3ffed938 0x164 RW
.coredump.tasks 0x3ffed7a0 0x190 RW
.coredump.tasks 0x3ffd660c 0x164 RW
.coredump.tasks 0x3ffd64a0 0x164 RW
.coredump.tasks 0x3ffd5ea0 0x164 RW
.coredump.tasks 0x3ffd5d30 0x168 RW
.coredump.tasks 0x3ffee830 0x164 RW
.coredump.tasks 0x3ffee6c0 0x168 RW
.coredump.tasks 0x3ffe3c60 0x164 RW
.coredump.tasks 0x3ffecdb0 0x160 RW
.coredump.tasks 0x3ffef29c 0x164 RW
.coredump.tasks 0x3ffef120 0x174 RW
.coredump.tasks 0x3ffe24b4 0x164 RW
.coredump.tasks 0x3ffe1990 0xb1c RW
.coredump.tasks 0x3ffee3a4 0x164 RW
.coredump.tasks 0x3ffee220 0x17c RW
.coredump.tasks 0x3ffd8578 0x164 RW
.coredump.tasks 0x3ffd8390 0x1e0 RW
.coredump.tasks 0x3ffd706c 0x164 RW
.coredump.tasks 0x3ffd6ee0 0x184 RW
.coredump.tasks 0x3ffd4084 0x164 RW
.coredump.tasks 0x3ffd3ef0 0x18c RW
.coredump.tasks 0x3ffd9904 0x164 RW
.coredump.tasks 0x3ffd9740 0x1bc RW
.coredump.tasks 0x3ffd334c 0x164 RW
.coredump.tasks 0x3ffd31c0 0x184 RW
.coredump.tasks 0x3ffdb01c 0x164 RW
.coredump.tasks 0x3ffdae50 0x1c4 RW
.coredump.tasks 0x3ffbcbf8 0x164 RW
.coredump.tasks 0x3ffbca40 0x1b0 RW
.coredump.tasks 0x3ffbd88c 0x164 RW
.coredump.tasks 0x3ffb49e0 0x194 RW
.coredump.tasks 0x3ffb56e0 0x164 RW
.coredump.tasks 0x3ffb5540 0x198 RW
.coredump.tasks 0x3ffb70a8 0x164 RW
.coredump.tasks 0x3ffb6f10 0x190 RW
.coredump.tasks 0x3ffd3ac4 0x164 RW
.coredump.tasks 0x3ffd3930 0x18c RW

===================== ESP32 CORE DUMP END =====================
===============================================================

etha890
Posts: 9
Joined: Tue Oct 23, 2018 2:27 am

Re: Load Prohibited panic within BLE

Postby etha890 » Wed Oct 31, 2018 9:46 pm

I am still suffering from this issue, I do however have a better thread trace which has pointed me into the place were the crashing is always occurring.

When calling the function esp_ble_gattc_write_char_descr() in the callback to ESP_GATTC_REG_FOR_NOTIFY_EVT the data which is passed through to this function is correct as I have confirmed with a log message, however the data which it is actually pulling in is somehow corrupt as shown by;

#1 0x400e94c6 in esp_ble_gattc_write_char_descr (gattc_if=3 '\\003', conn_id=0, handle=38086, value_len=16304, value=0x0, write_type=(unknown: 0), auth_req=auth_req@entry=ESP_GATT_AUTH_REQ_NONE) at C:/msys32/home/EthanA/esp-idf-

The handle should be 16 and the length should be 2 and value 1.

In some cases it takes up to 12 hours for this corruption to occur, which is making it quite troublesome to debug.

Code: Select all

===============================================================
==================== ESP32 CORE DUMP START ====================

================== CURRENT THREAD REGISTERS ===================
pc             0x40100fd4       0x40100fd4 <L2CA_CheckIsCongest+24>
lbeg           0x400014fd       1073747197
lend           0x4000150d       1073747213
lcount         0xfffffffc       4294967292
sar            0x4      4
ps             0x60520  394528
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             0x400e94c6       1074697414
a1             0x3ffb3fb0       1073430448
a2             0x0      0
a3             0x0      0
a4             0x3ffb3fe0       1073430496
a5             0xc      12
a6             0x0      0
a7             0x3ffb4032       1073430578
a8             0x80100fc8       -2146431032
a9             0x3ffb3f90       1073430416
a10            0x3ffcf1c4       1073541572
a11            0x3ffd3e60       1073561184
a12            0x1      1
a13            0x3ffb3ca0       1073429664
a14            0x3ffb3ca0       1073429664
a15            0x3      3

==================== CURRENT THREAD STACK =====================
#0  0x40100fd4 in L2CA_CheckIsCongest (fixed_cid=<optimized out>, handle=0) at C:/msys32/home/EthanA/esp-idf-v3.1/components/bt/bluedroid/stack/l2cap/l2c_api.c:1849
#1  0x400e94c6 in esp_ble_gattc_write_char_descr (gattc_if=3 '\\003', conn_id=0, handle=38086, value_len=16304, value=0x0, write_type=(unknown: 0), auth_req=auth_req@entry=ESP_GATT_AUTH_REQ_NONE) at C:/msys32/home/EthanA/esp-idf-v3.1/components/bt/bluedroid/api/esp_gattc_api.c:450
#2  0x400e7ddc in gattc_profile_PROBE_event_handler (event=<optimized out>, gattc_if=<optimized out>, param=<optimized out>) at Z:/ProbeTest/components/BLE/ble_multiPeripheral.c:385
#3  0x400e7b06 in esp_gattc_cb (event=ESP_GATTC_REG_FOR_NOTIFY_EVT, gattc_if=3 '\\003', param=0x3ffb4080) at Z:/ProbeTest/components/BLE/ble_multiPeripheral.c:758
#4  0x400ee8f0 in btc_gattc_cb_to_app (param=0x3ffb4080, gattc_if=3 '\\003', event=ESP_GATTC_REG_FOR_NOTIFY_EVT) at C:/msys32/home/EthanA/esp-idf-v3.1/components/bt/bluedroid/btc/profile/std/gatt/btc_gattc.c:31
#5  btc_gattc_reg_for_notify (arg=<optimized out>) at C:/msys32/home/EthanA/esp-idf-v3.1/components/bt/bluedroid/btc/profile/std/gatt/btc_gattc.c:678
#6  0x400eec5a in btc_gattc_call_handler (msg=0x3ffb40e0) at C:/msys32/home/EthanA/esp-idf-v3.1/components/bt/bluedroid/btc/profile/std/gatt/btc_gattc.c:743
#7  0x400ec4b4 in btc_task (arg=<optimized out>) at C:/msys32/home/EthanA/esp-idf-v3.1/components/bt/bluedroid/btc/core/btc_task.c:107

======================== THREADS INFO =========================
  Id   Target Id         Frame
  20   process 19        0x40091c11 in xQueueGenericReceive (xQueue=0x3ffd53d4, pvBuffer=0x0, xTicksToWait=4294967295, xJustPeeking=0) at C:/msys32/home/EthanA/esp-idf-v3.1/components/freertos/queue.c:1591
  19   process 18        0x40091c11 in xQueueGenericReceive (xQueue=0x3ffbbb98, pvBuffer=0x3ffbcb60, xTicksToWait=4294967295, xJustPeeking=0) at C:/msys32/home/EthanA/esp-idf-v3.1/components/freertos/queue.c:1591
  18   process 17        0x40091c11 in xQueueGenericReceive (xQueue=0x3ffb5b54, pvBuffer=0x3ffb7030, xTicksToWait=4294967295, xJustPeeking=0) at C:/msys32/home/EthanA/esp-idf-v3.1/components/freertos/queue.c:1591
  17   process 16        0x40091c11 in xQueueGenericReceive (xQueue=0x3ffb4c78, pvBuffer=0x3ffb5640, xTicksToWait=4294967295, xJustPeeking=0) at C:/msys32/home/EthanA/esp-idf-v3.1/components/freertos/queue.c:1591
  16   process 15        0x40091c11 in xQueueGenericReceive (xQueue=0x3ffbd5e0, pvBuffer=0x3ffb4ae0, xTicksToWait=4294967295, xJustPeeking=0) at C:/msys32/home/EthanA/esp-idf-v3.1/components/freertos/queue.c:1591
  15   process 14        0x400821ea in esp_crosscore_int_send_yield (core_id=0) at C:/msys32/home/EthanA/esp-idf-v3.1/components/esp32/crosscore_int.c:112
  14   process 13        0x40091c11 in xQueueGenericReceive (xQueue=0x3ffdb6b8, pvBuffer=0x3ffdcb00, xTicksToWait=4294967295, xJustPeeking=0) at C:/msys32/home/EthanA/esp-idf-v3.1/components/freertos/queue.c:1591
  13   process 12        0x40091c11 in xQueueGenericReceive (xQueue=0x3ffd5994, pvBuffer=0x0, xTicksToWait=4294967295, xJustPeeking=0) at C:/msys32/home/EthanA/esp-idf-v3.1/components/freertos/queue.c:1591
  12   process 11        0x40091c11 in xQueueGenericReceive (xQueue=0x3ffda358, pvBuffer=0x3ffdb3f0, xTicksToWait=4294967295, xJustPeeking=0) at C:/msys32/home/EthanA/esp-idf-v3.1/components/freertos/queue.c:1591
  11   process 10        0x400923a8 in prvProcessTimerOrBlockTask (xNextExpireTime=<optimized out>, xListWasEmpty=<optimized out>) at C:/msys32/home/EthanA/esp-idf-v3.1/components/freertos/timers.c:588
  10   process 9         0x40090786 in vTaskDelay (xTicksToDelay=<optimized out>) at C:/msys32/home/EthanA/esp-idf-v3.1/components/freertos/tasks.c:1491
  9    process 8         0x40090786 in vTaskDelay (xTicksToDelay=<optimized out>) at C:/msys32/home/EthanA/esp-idf-v3.1/components/freertos/tasks.c:1491
  8    process 7         0x40090786 in vTaskDelay (xTicksToDelay=<optimized out>) at C:/msys32/home/EthanA/esp-idf-v3.1/components/freertos/tasks.c:1491
  7    process 6         0x40091c11 in xQueueGenericReceive (xQueue=0x3ffd61a0, pvBuffer=0x3ffda150, xTicksToWait=62, xJustPeeking=0) at C:/msys32/home/EthanA/esp-idf-v3.1/components/freertos/queue.c:1591
  6    process 5         0x40090786 in vTaskDelay (xTicksToDelay=<optimized out>) at C:/msys32/home/EthanA/esp-idf-v3.1/components/freertos/tasks.c:1491
  5    process 4         0x40090786 in vTaskDelay (xTicksToDelay=<optimized out>) at C:/msys32/home/EthanA/esp-idf-v3.1/components/freertos/tasks.c:1491
  4    process 3         0x4017fb96 in esp_vApplicationWaitiHook () at C:/msys32/home/EthanA/esp-idf-v3.1/components/esp32/freertos_hooks.c:66
  3    process 2         0x4017fb96 in esp_vApplicationWaitiHook () at C:/msys32/home/EthanA/esp-idf-v3.1/components/esp32/freertos_hooks.c:66
  2    process 1         0x40090786 in vTaskDelay (xTicksToDelay=<optimized out>) at C:/msys32/home/EthanA/esp-idf-v3.1/components/freertos/tasks.c:1491
* 1    <main task>       0x40100fd4 in L2CA_CheckIsCongest (fixed_cid=<optimized out>, handle=0) at C:/msys32/home/EthanA/esp-idf-v3.1/components/bt/bluedroid/stack/l2cap/l2c_api.c:1849

======================= ALL MEMORY REGIONS ========================
Name   Address   Size   Attrs
.rtc.text 0x400c0000 0x0 RW
.rtc_noinit 0x50000000 0x0 RW
.iram0.vectors 0x40080000 0x400 R XA
.iram0.text 0x40080400 0x15a90 R XA
.dram0.data 0x3ffc0000 0x3ca0 RW A
.noinit 0x3ffc3ca0 0x0 RW
.flash.rodata 0x3f400020 0x21800 RW A
.flash.text 0x400d0018 0xb2524 R XA
.coredump.tasks 0x3ffbd074 0x164 RW
.coredump.tasks 0x3ffb3ef0 0x280 RW
.coredump.tasks 0x3ffe30f8 0x164 RW
.coredump.tasks 0x3fff1fc0 0x160 RW
.coredump.tasks 0x3ffd8374 0x164 RW
.coredump.tasks 0x3ffd8200 0x16c RW
.coredump.tasks 0x3ffd7c08 0x164 RW
.coredump.tasks 0x3ffd7aa0 0x160 RW
.coredump.tasks 0x3fff2a2c 0x164 RW
.coredump.tasks 0x3fff28b0 0x174 RW
.coredump.tasks 0x3ffe2e28 0x164 RW
.coredump.tasks 0x3ffef680 0x198 RW
.coredump.tasks 0x3ffda1f0 0x164 RW
.coredump.tasks 0x3ffda000 0x1e8 RW
.coredump.tasks 0x3ffe2150 0x164 RW
.coredump.tasks 0x3ffe5840 0xb28 RW
.coredump.tasks 0x3ffe2f90 0x164 RW
.coredump.tasks 0x3ffeffa0 0x17c RW
.coredump.tasks 0x3ffe2428 0x164 RW
.coredump.tasks 0x3ffeedb0 0x164 RW
.coredump.tasks 0x3ffd8dd4 0x164 RW
.coredump.tasks 0x3ffd8c40 0x18c RW
.coredump.tasks 0x3ffdb4b0 0x164 RW
.coredump.tasks 0x3ffdb2f0 0x1b8 RW
.coredump.tasks 0x3ffd5dec 0x164 RW
.coredump.tasks 0x3ffd5c60 0x184 RW
.coredump.tasks 0x3ffdcba4 0x164 RW
.coredump.tasks 0x3ffdc9d0 0x1cc RW
.coredump.tasks 0x3ffd4ff4 0x164 RW
.coredump.tasks 0x3ffd4e40 0x1ac RW
.coredump.tasks 0x3ffbd8b4 0x164 RW
.coredump.tasks 0x3ffb49e0 0x194 RW
.coredump.tasks 0x3ffb56e0 0x164 RW
.coredump.tasks 0x3ffb5540 0x198 RW
.coredump.tasks 0x3ffb70cc 0x164 RW
.coredump.tasks 0x3ffb6f30 0x194 RW
.coredump.tasks 0x3ffbcbf8 0x164 RW
.coredump.tasks 0x3ffbca40 0x1b0 RW
.coredump.tasks 0x3ffd582c 0x164 RW
.coredump.tasks 0x3ffd56a0 0x184 RW

===================== ESP32 CORE DUMP END =====================
===============================================================
Done!

Who is online

Users browsing this forum: No registered users and 110 guests