We experience that under some conditions at one moment an already bonded device causes that at the moment of BLE connection the MCU crashes. Possible solution is only to erase all bonding's which is not acceptable at the current stage in the field.
We use the latest 17.1.0 SDK
In debugging this issue we see that lowest we can track the problem is in sd_ble_gatts_sys_attr_get (components/ble/peer_manager/gatt_cache_manager.c) where the function returns NRF_ERROR_DATA_SIZE.
The structure which is inserted into the function has at the moment the following values:
peer_data.p_local_gatt_db.len = 62
peer_data.p_local_gatt_db.flags = 3
As we have noticed is not a phone specific problem, neither OS android/ios. The same phone can then also later normally connect to other devices