# Critical Nesting issue in SMP port

**URL:** <https://forums.freertos.org/t/critical-nesting-issue-in-smp-port/19142>\
**Category:** Kernel\
**Created:** [February 8, 2024, 11:39am UTC](https://forums.freertos.org/t/critical-nesting-issue-in-smp-port/19142 "2024-02-08T11:39:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Krishna](https://avatars.discourse-cdn.com/v4/letter/k/71c47a/32.png) [@Krishna](https://forums.freertos.org/u/Krishna)\
**Post date:** [February 8, 2024, 11:39am UTC](https://forums.freertos.org/t/critical-nesting-issue-in-smp-port/19142/1 "2024-02-08T11:39:12Z")

</div>

Hello Team,

In my project I am using FreeRTOS with SMP port which we have developed for MPC5777 Power PC micro controller.

Recently we started using Freertos MUTEXes for IPC and after this we have got issue with task preemption.

When we use preemption feature with configUSE\_PREEMPTION 1 code hits this assert **configASSERT( pxCurrentTCB-\>uxCriticalNesting == 0 );** from **tasks.c** and halts the execution of the code. If we run the debug session again it runs for sometime and again hits this assert and halts.

This issue is not seen if we disable the preemption feature by making configUSE\_PREEMPTION to 0.

Could you please some inputs on what is causing this issue.

Thank you very much in advance!!

Best regards,  
Krishna.

---

<div class="post-metadata">

**Author:** ![aggarg](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/aggarg/32/4245_2.png) [@aggarg](https://forums.freertos.org/u/aggarg)\
**Post date:** [February 9, 2024, 2:32pm UTC](https://forums.freertos.org/t/critical-nesting-issue-in-smp-port/19142/2 "2024-02-09T14:32:39Z")

</div>

> [@Krishna](#):
>
> **configASSERT( pxCurrentTCB-\>uxCriticalNesting == 0 );** from **tasks.c** a

I do not see this assert in tasks.c - [FreeRTOS-Kernel/tasks.c at main · FreeRTOS/FreeRTOS-Kernel · GitHub](https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/tasks.c). Which version of the code are you using? Can you try the latest version and let us know if you still see the issue?
