Crash on connect with NCS 2.6.0

You can find all information about the issue and how to produce it on GitHub: github.com/.../ncs-2.6.0-connect-crash

  • All I had to do was to change the nRF SDK version in west.yml and run `west update`.

    For the central, only 2.7.0 makes the bug disappear. With 2.6.0 and 2.6.2, it still happens.

  • I did some additional testing(and have updated the repository) and have some more info to share:

    - In my previous post I was testing with peripheral_hr(from my repo, not the original) but I missed that the problem disappeared from peripheral_hr_coded(from my repo, not the original). Enabling CONFIG_BT_HCI_CORE_LOG_LEVEL_DBG made the problem reappear. That further hints at a race condition.

    - While changing the UART timeout from 100us to 1000us makes the problem disappear from peripheral_hr it does NOT make it disappear from peripheral_hr_coded, which is interesting to say the least. That means that the suggested workaround does not work reliably, unfortunately.

    - I have never been able to reproduce this with CONFIG_BT_EXT_ADV enabled, so this might be the real workaround here. I'm a little too scared to rely on this though, given that this might just be making the race condition harder to trigger, like the other changes I made.

  • Hello,

    Sorry for the late replies. Someone in our SoftDevice team is looking into this, but they have not yet figured out the source of the issue. 

    Just wanted to let you know that this ticket is not forgotten or ignored. I will let you know as soon as I have more details.

    Best regards,

    Edvin

  • Hello,

    I have some good news! Our SoftDevice team have found the cause of this bug, and the fix is merged into our next release in v2.8.0. The issue was related to a lot of UART events being generated, which caused some issues with some internal buffers and parameters not being correctly cleared. 

    I believe v2.8.0 is right around the corner, so you can test the fix when it is released. (I am not certain it is part of the release candidates that are already available).

    Best regards,

    Edvin

  • I just tested it and it works great, thanks.

Related