peripheral uart sample: connecting causes permanent halting on background threads

When adding a low priority and delayed background thread to the peripheral uart sample, have issues where pairing with the device causes that background thread to halt and never run again.

In addition, whatever the advertising light is (LED1) never toggles again.

However, the system is still able to be paired with the nrf connect app, and still operates correctly. (UART to BLE, and BLE to UART)

It also still shows up as a connectable device after disconnecting when in this state, and can still be connected to and interfaced with.

When I attempted to debug by using the ncs debugger, the behavior is not replicable. (The system operates as intended)

Threads never get halted while attached to debugger. So I can't replicate the issue while attached to the debugger.

Logs in RTT didn't indicate anything was wrong either.

Unfortunately, I need some background threads to be able to run on top of this sample application.

Here is my thread insantiation and definintion

(500ms start delay, 1024 stack size, priority of 9.)

K_THREAD_DEFINE(some_thread_id, 1024, some_thread, NULL, NULL, NULL, 9, 0, 500);
The thread is simply
void some_thread(void)
{
  while(1)
  {
    toggle_led(LED4);
    uart_poll_out(uart1, 'e');
    k_msleep(K_1000_MS);
  }
}
using SDK 2.1.2 (also tried 2.1.0), and latest ncs.
Related