shtirlic commented on PR #16301:
URL: https://github.com/apache/nuttx/pull/16301#issuecomment-2857002919

   @jlaitine there is interesting observation
   
![image](https://github.com/user-attachments/assets/d4746103-2d50-48f2-8f74-921d5acec0e8)
    I ended up here 
   ```
   /* Check if the TCB to be removed is at the head of a running list.
      * For the case of SMP, there are two lists involved:  (1) the
      * g_readytorun list that holds non-running tasks that have not been
      * assigned to a CPU, and (2) and the g_assignedtasks[] lists which hold
      * tasks assigned a CPU, including the task that is currently running on
      * that CPU.  Only this latter list contains the currently active task
      * only removing the head of that list can result in a context switch.
      *
      * tcb->blink == NULL will tell us if the TCB is at the head of the
      * running list and, hence, a candidate for the new running task.
      *
      * If so, then the tasklist RUNNABLE attribute will inform us if the list
      * holds the currently executing task and, hence, if a context switch
      * should occur.
      */
   
     DEBUGASSERT(tcb->blink == NULL);
   ```
   in `nxsched_remove_running` in SMP version
   
   
![image](https://github.com/user-attachments/assets/887b37c2-70b7-41bc-b252-6dc4a51efda0)
   
   
   
   it looks like `&g_assignedtasks[cpu]` got head corrupted in some point 
   
    
   
   


-- 
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: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to