Systemview broken on SDK 2.8.0/Kernel 3.7.99

With the recent release of SDK 2.8.0 enabling tracing with Segger Systemview locks up the system.

The offending issue is buf = net_buf_alloc(&hci_cmd_pool, K_FOREVER); which will block forever waiting for a buffer that will never become available. I am not sure if this is a NRF related change on other parts or a Zephyr but as I am using NCS I felt to report here first.

The following command builds on 2.8.0 and 2.7.0 without fail.

west build -b nrf5340dk/nrf5340/cpuapp --pristine=always nrf/samples/bluetooth/peripheral_bms

However only with 2.8.0 when tracing and systemview are enabled the LED no longer blinks and in Ozone I can trace and see it is stuck in the above line waiting.

west build -b nrf5340dk/nrf5340/cpuapp --pristine=always nrf/samples/bluetooth/peripheral_bms -- -DCONFIG_TRACING=y -DCONFIG_SEGGER_SYSTEMVIEW=y

Parents
  • Just compiled this for nrf5340dk_nrf5340_cpuapp and running the debugger shows that it is not stuck at the shown function call that you pointed out.

    Tested on v2.8.0,  Not sure what is different on your end by try increasing the main stack size in case the 1024 bytes might be a border without enabling trace and systemview and when you enable it, it might cross that usage and causing some stack corruption.

    Add this in your prj.conf and pristine build it.

    CONFIG_MAIN_STACK_SIZE=2048

Reply
  • Just compiled this for nrf5340dk_nrf5340_cpuapp and running the debugger shows that it is not stuck at the shown function call that you pointed out.

    Tested on v2.8.0,  Not sure what is different on your end by try increasing the main stack size in case the 1024 bytes might be a border without enabling trace and systemview and when you enable it, it might cross that usage and causing some stack corruption.

    Add this in your prj.conf and pristine build it.

    CONFIG_MAIN_STACK_SIZE=2048

Children
Related