apache / nuttx

Apache NuttX is a mature, real-time embedded operating system (RTOS)
https://nuttx.apache.org/
Apache License 2.0
2.91k stars 1.18k forks source link

CONFIG_SCHED_CPULOAD causes lockup #4684

Closed jarivanewijk closed 3 years ago

jarivanewijk commented 3 years ago

I just found that enabling the CONFIG_SCHED_CPULOAD option ("Enable CPU load monitoring") causes a lockup soon after the NuttShell initialization. If I'm quick a get less than a second to start typing some command, then it gets completely stuck. No more input is possible. No more output comes out. It's just dead. It seems no asserts are triggered and there's nothing being logged to the SYSLOG. I am not sure what's going on here.

I have checked this on a few boards with an NXP S32K144 MCU (single Arm Cortex-M4F core). I don't have boards with other MCUs at hand, but I don't think this is a MCU specific issue. I was able to trace this issue back to PR https://github.com/apache/incubator-nuttx/pull/4666, specifically commit https://github.com/apache/incubator-nuttx/commit/8b67944c75b81d17174bd207ad63acfa22da8983. There's no issues if I checkout an earlier commit from master.

@xiaoxiang781216, since you made the changes that seem to be causing the issue, would you be willing to have a look at this? Would be much appreciated.

Ouss4 commented 3 years ago

Isn't this addressed by https://github.com/apache/incubator-nuttx/pull/4682?

jarivanewijk commented 3 years ago

@Ouss4 You're right! I somehow missed that PR... It wasn't merged yet when I was debugging this issue. Thanks!