opened
mspang
username_0
As of https://github.com/openthread/openthread/pull/5299 thread joiner initiated at boot results in unresponsive device. It takes several join attempts for this to occur.

Repro (fails):
```
  git checkout b15c292ee56a0505d3a3904eb295b38bac71cfc9
  git submodule update --init

  cd third_party/openthread/repo
  git checkout addb1936c3e7e14e59f617751e595596980e3ec8 # fails
  cd examples/lock-app/nrf5
  make flash
  
  # thread CLI
  factoryreset
```

  Boot and just wait. Device hangs after a few join attempts.

Repro: (stable)
```
  cd third_party/openthread/repo
  git revert HEAD

  cd examples/lock-app/nrf5
  make flash
```
  Boot and just wait. Device stable.

Log:
```
[00000000] <info> chip: [DL] Setup PIN discriminator not found; using default: f00
[00000000] <info> chip: [DL] Joiner Discerner: 3840
[00000000] <info> chip: [DL] Setup PIN code not found; using default: 12345678
[00000000] <info> chip: [DL] Joiner PSKd: 12345678
[00000000] <info> chip: [DL] Joiner start: No Error
[00000000] <debug> chip: [DL] Thread joiner timer triggered: No Error
<hung>
```

@lanyuwen @bukepo
nrf5 examples stop responding while attempting thread join
issue
created
mspang
username_0
Fault stack:

Level,Function,Stack Frame,Source,PC,Return Address,Stack Used
0,<HardFault Exception>,32 @ 0x2001FAE8,,0x00000A60,[0x2001FB00]: 0x0008FFC2,160
0,memcpy, 8 @ 0x2001FB08,,0x0008FFBE,[0x2001FB0C]: 0x0002CC32,128
0,xQueueReceive,48 @ 0x2001FB10,queue.c:1288:5,0x0002CC2E,[0x2001FB3C]: 0x0002DE38,120
0,prvProcessReceivedCommands, 0 @ 0x2001FB40,timers.c:696:7,0x0002DE34,<inline>: 0x0002DE98, 72
0,prvTimerTask,72 @ 0x2001FB40,timers.c:644:2,0x0002DE24,[0x2001FB84]: 0x03000000, 72
0,Top of stack - return address out of range: 0x3000000,,,,,
comment
created
mspang
username_0
This is a timer task stack overflow. The timer task uses 1k stack by default. Enabling configCHECK_FOR_STACK_OVERFLOW diagnoses this issue.
comment
created
mspang
username_0
@bukepo I believe we should move all of the code from `GenericThreadStackManagerImpl_FreeRTOS<ImplClass>::OnJoinerTimer` off the timer task. Logging uses a 256 byte stack buffer.

In the meantime I will post a patch to increase the stack size.
comment
closed
BroderickCarlin
username_1
issue