dbinfrago / libpax

Apache License 2.0
21 stars 13 forks source link

stop_BLE_scan() sometimes causes crash #5

Closed cyberman54 closed 2 years ago

cyberman54 commented 3 years ago

Looks like some problem caused by Bluedroid stack. Experiment showed 12 crashes in ~12 hours, while the device cycled between run and deep sleep, causing the Bluedroid stack stopping and starting each cycle. If the device does run continuously, without sleep, the issue does not appear.

[I][blescan.cpp:306] stop_BLE_scan(): Shutting down bluetooth scanner ...

/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/queue.c:1442 (xQueueGenericReceive)- assert failed!

abort() was called at PC 0x4009669d on core 0

ELF file SHA256: 0000000000000000

Backtrace: 0x400956f4:0x3ffe9650 0x4009596d:0x3ffe9670 0x4009669d:0x3ffe9690 0x401345dd:0x3ffe96d0 0x40163002:0x3ffe96f0 0x40178bd5:0x3ffe9710 0x40149175:0x3ffe9730 0x40151aae:0x3ffe9750 0x4019996d:0x3ffe9770 0x40199a24:0x3ffe9790 0x40199a54:0x3ffe97b0 0x401632fb:0x3ffe97d0 0x40199775:0x3ffe97f0 0x400969d6:0x3ffe9820

  #0  0x400956f4:0x3ffe9650 in invoke_abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:715
  #1  0x4009596d:0x3ffe9670 in abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:715
  #2  0x4009669d:0x3ffe9690 in xQueueGenericReceive at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/queue.c:2520
  #3  0x401345dd:0x3ffe96d0 in osi_sem_take at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/bt/common/osi/semaphore.c:60
  #4  0x40163002:0x3ffe96f0 in fixed_queue_enqueue at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/bt/common/osi/fixed_queue.c:137
  #5  0x40178bd5:0x3ffe9710 in transmit_command at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/bt/bluedroid/hci/hci_layer.c:273
  #6  0x40149175:0x3ffe9730 in btu_hcif_send_cmd at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/bt/bluedroid/stack/btu/btu_hcif.c:418
  #7  0x40151aae:0x3ffe9750 in btsnd_hcic_ble_update_adv_report_flow_control at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/bt/bluedroid/stack/hcic/hciblecmds.c:1020
  #8  0x4019996d:0x3ffe9770 in hci_update_adv_report_flow_control at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/bt/bluedroid/hci/hci_hal_h4.c:252
  #9  0x40199a24:0x3ffe9790 in hci_hal_h4_hdl_rx_packet at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/bt/bluedroid/hci/hci_hal_h4.c:319
  #10 0x40199a54:0x3ffe97b0 in event_uart_has_bytes at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/bt/bluedroid/hci/hci_hal_h4.c:338
  #11 0x401632fb:0x3ffe97d0 in fixed_queue_process at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/bt/common/osi/fixed_queue.c:289
  #12 0x40199775:0x3ffe97f0 in hci_hal_h4_rx_handler at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/bt/bluedroid/hci/hci_hal_h4.c:177
  #13 0x400969d6:0x3ffe9820 in vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c:355 (discriminator 1)

Rebooting...
cyberman54 commented 3 years ago

opened issue at arduino-esp32: https://github.com/espressif/arduino-esp32/issues/5024

oliverbrandmueller commented 2 years ago

@cyberman54 may this issue be closed with 1.0.0 RC2 BLE stackless change or are you still experiencing problems?

cyberman54 commented 2 years ago

Yes, it's no longer relevant. Closed.