I have observed, that BLE (BT?) stack can enter a deadlock, when it received a lot of BLE advertisements and ESP32 is busy (eg. using Console heavily).
When enabling "CONFIG_BLE_HOST_QUEUE_CONGESTION_CHECK" the issue only occurs very seldom, but it is still happens.
When the issue happens, the error message about congestion is reported "forever", and the BLE never recovers.
It is pretty easy to trigger the issue, if you change the "BT_QUEUE_CONGEST_SIZE" to 3 in file "bt_common.h".
What I see is, that the task handling BTU ("btuT") never runs, and the BTU queue is never processed.
When I change priority of "hciH4T", "btuT" and "BTC_TASK" tasks to use same priority, the BLE does recover.
I am aware of possibilities to use filtering etc. but I think it is not good, that something ends up in a deadlock - no matter what...
I believe some issues regarding stalled BLE stack - reported by other users (#4001) - might be related to this finding.
I have observed, that BLE (BT?) stack can enter a deadlock, when it received a lot of BLE advertisements and ESP32 is busy (eg. using Console heavily).
When enabling "CONFIG_BLE_HOST_QUEUE_CONGESTION_CHECK" the issue only occurs very seldom, but it is still happens.
When the issue happens, the error message about congestion is reported "forever", and the BLE never recovers.
It is pretty easy to trigger the issue, if you change the "BT_QUEUE_CONGEST_SIZE" to 3 in file "bt_common.h".
What I see is, that the task handling BTU ("btuT") never runs, and the BTU queue is never processed.
When I change priority of "hciH4T", "btuT" and "BTC_TASK" tasks to use same priority, the BLE does recover.
I am aware of possibilities to use filtering etc. but I think it is not good, that something ends up in a deadlock - no matter what...
I believe some issues regarding stalled BLE stack - reported by other users (#4001) - might be related to this finding.