tmedicci commented on PR #13863: URL: https://github.com/apache/nuttx/pull/13863#issuecomment-2450726983
> > Hi @hujun260 , > > `esp32s3-devkit:sta_softap` eventually asserts at `DEBUGASSERT(tcb->cpu == this_cpu` (https://github.com/apache/incubator-nuttx/blob/a56714888868399b5148ab84f8a100505bd3e974/sched/sched/sched_removereadytorun.c#L291) when running iPerf server for a while (some minutes). Do you have any idea why? (or what should we look for to solve this problem?) > > `DEBUGASSERT(tcb->cpu == this_cpu)` means that the logic should be running on tcb->cpu but instead is running on some other CPU. This means that the critical section is broken and unmanaged context switches are occurring. One fix is to revert these commit(s) that remove the required SMP support from `enter_critical_section()`. > > Try it. > > Removing that SMP support allows context switches to occur in the middle of a critical section and completely breaks the critical section logic. A variety of unpredictable bad results will occur occasionally. > > I am not sure why that is. I suspect that this is caused beccause with this change, interrupts are no longer disabled on the other CPUs and there are probably ways that interrupt activity can force context switches. Thanks for your comment, Greg. The assertion started triggering after these commits were added. Checking out to the revision just before them being merged works as expected -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
