Bluetooth crash dump trace

imtiaz
Posts: 106
Joined: Wed Oct 26, 2016 1:34 am

Bluetooth crash dump trace

Postby imtiaz » Thu Mar 30, 2017 12:26 am

Hi Espressif,

FYI : Ive been doing some bluetooth work and got this crash ..
  • Guru Meditation Error of type StoreProhibited occurred on core 0. Exception was unhandled.
    Register dump:
    PC : 0x4010aa36 PS : 0x00060a30 A0 : 0x800ef04a A1 : 0x3ffdc7d0
    0x4010aa36: GKI_getbuf_func at C:/esp32/esp-idf/components/bt/bluedroid/gki/gki_buffer.c:184
    A2 : 0x00000262 A3 : 0x00000001 A4 : 0x00060620 A5 : 0x00000015
    A6 : 0x00000000 A7 : 0x00000000 A8 : 0x00000001 A9 : 0x3ffdc7b0
    A10 : 0x00000000 A11 : 0x0000026e A12 : 0x400815b4 A13 : 0x3ffc0590
    0x400815b4: _calloc_r at C:/esp32/esp-idf/components/newlib/syscalls.c:55
    A14 : 0x00000001 A15 : 0x3ffc05d0 SAR : 0x00000008 EXCCAUSE: 0x0000001d
    EXCVADDR: 0x00000005 LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0x00000000

    Backtrace: 0x4010aa36:0x3ffdc7d0 0x400ef04a:0x3ffdc7f0 0x400f138b:0x3ffdc810 0x401192f9:0x3ffdcab0 0x40119f5d:0x3ffdcb00 0x4010a3e9:0x3ffdcb20 0x400ed523:0x3ffdcb40 0x4014e6fe:0x3ffdcb60 0x400ed68c:0x3ffdcb80
    0x4010aa36: GKI_getbuf_func at C:/esp32/esp-idf/components/bt/bluedroid/gki/gki_buffer.c:184
    0x400ef04a: gatt_add_pending_ind at C:/esp32/esp-idf/components/bt/bluedroid/stack/gatt/gatt_utils.c:1679
    0x400f138b: GATTS_HandleValueIndication at C:/esp32/esp-idf/components/bt/bluedroid/stack/gatt/gatt_api.c:757
    0x401192f9: bta_gatts_indicate_handle at C:/esp32/esp-idf/components/bt/bluedroid/bta/gatt/bta_gatts_act.c:665
    0x40119f5d: bta_gatts_hdl_event at C:/esp32/esp-idf/components/bt/bluedroid/bta/gatt/bta_gatts_main.c:90
    0x4010a3e9: bta_sys_event at C:/esp32/esp-idf/components/bt/bluedroid/bta/sys/bta_sys_main.c:505
    0x400ed523: btu_bta_msg_ready at C:/esp32/esp-idf/components/bt/bluedroid/stack/btu/btu_task.c:204
    0x4014e6fe: fixed_queue_process at C:/esp32/esp-idf/components/bt/bluedroid/osi/fixed_queue.c:195
    0x400ed68c: btu_task_thread_handler at C:/esp32/esp-idf/components/bt/bluedroid/stack/btu/btu_task.c:321

dave111
Posts: 45
Joined: Fri Mar 03, 2017 1:37 am

Re: Bluetooth crash dump trace

Postby dave111 » Fri Mar 31, 2017 1:07 am

I'm getting a similar one, also while working with Bluetooth.

Guru Meditation Error of type LoadProhibited occurred on core 0. Exception was unhandled.
Register dump:
PC : 0x400014fd PS : 0x00060230 A0 : 0x8004f20f A1 : 0x3ffd0400
A2 : 0x00000000 A3 : 0xfffffffc A4 : 0x000000ff A5 : 0x0000ff00
A6 : 0x00ff0000 A7 : 0xff000000 A8 : 0x00000000 A9 : 0x3ffd0400
A10 : 0x00000003 A11 : 0x00060223 A12 : 0x00060223 A13 : 0x3ffb93e0
A14 : 0x00000000 A15 : 0x3ffbb7b0 SAR : 0x0000001d EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xffffffff

Backtrace: 0x400014fd:0x3ffd0400 0x4004f20f:0x3ffd0410 0x400250a1:0x3ffd0430 0x40027d30:0x3ffd0470 0x4001a63a:0x3ffd0490 0x40019d14:0x3ffd04c0 0x40055b50:0x3ffd04e0 0x4012c3ee:0x3ffd0500 0x4012c446:0x3ffd0520 0x400df33d:0x3ffd0540

Rebooting...

dave111
Posts: 45
Joined: Fri Mar 03, 2017 1:37 am

Re: Bluetooth crash dump trace

Postby dave111 » Sun Apr 02, 2017 4:38 pm

Finding:

The more log categories I raise (from WARN to DEBUG) in bluedroid/include/bt_trace.h, the more random "LoadProhibited" crashes do occur at runtime.

When I bring everything back down to the original WARN level, this appears to solve the issue. But I think this may be only because WARN and ERROR messages occur far less often than INFO and DEBUG statements do (if enabled).

There are a lot of active WARN and ERROR statements in the Bluedroid code base. And my impression is that with the current implementation, every one of them is able to cause a crash by chance.

Who is online

Users browsing this forum: No registered users and 194 guests