# Strange behavior: semaphore deletes itself

**URL:** <https://forums.freertos.org/t/strange-behavior-semaphore-deletes-itself/14830>\
**Category:** Kernel\
**Tags:** debug\
**Created:** [April 10, 2022, 10:32am UTC](https://forums.freertos.org/t/strange-behavior-semaphore-deletes-itself/14830 "2022-04-10T10:32:37Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![hs2](https://avatars.discourse-cdn.com/v4/letter/h/a4c791/32.png) [@hs2](https://forums.freertos.org/u/hs2)\
**Post date:** [April 10, 2022, 11:00am UTC](https://forums.freertos.org/t/strange-behavior-semaphore-deletes-itself/14830/2 "2022-04-10T11:00:26Z")

</div>

Standard answer to questions describing weird application behavior 😉  
Did you define [configASSERT](https://www.freertos.org/a00110.html?_ga=2.213540052.1971135108.1609110559-800452554.1575115350#configASSERT)and also enable [stack overflow checking](https://www.freertos.org/Stacks-and-stack-overflow-checking.html)for development/debugging to catch possible fatal errors or data corruption ?  
Another issue might be wrong interrupt priorities for interrupts using FreeRTOS API in their corresponding ISRs resp. ISR callbacks.  
See e.g. [Understanding priority levels of ISR and FreeRTOS APIs - #16 by aggarg](https://forums.freertos.org/t/understanding-priority-levels-of-isr-and-freertos-apis/10453/16) for a pretty good explanation.

---

_[View the full topic](https://forums.freertos.org/t/strange-behavior-semaphore-deletes-itself/14830)._
