# Assert in taskSELECT\_HIGHEST\_PRIORITY\_TASK

**URL:** <https://forums.freertos.org/t/assert-in-taskselect-highest-priority-task/24823>\
**Category:** Kernel\
**Created:** [January 14, 2026, 11:19am UTC](https://forums.freertos.org/t/assert-in-taskselect-highest-priority-task/24823 "2026-01-14T11:19:24Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![rasty1](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rasty1/32/5886_2.png) [@rasty1](https://forums.freertos.org/u/rasty1)\
**Post date:** [January 14, 2026, 11:19am UTC](https://forums.freertos.org/t/assert-in-taskselect-highest-priority-task/24823/1 "2026-01-14T11:19:24Z")

</div>

Hi  
I’m getting consistent assert in taskSELECT\_HIGHEST\_PRIORITY\_TASK. Triggered by communication traffic , but not directly related to it.  
Communications are polling based (Ethernet emulation over shared memory, no interrupts)  
Current task is IdleTask, happens when idle task is running.  
Tried CPU trace - nothing that eye can catch just a long trace of housekeeping work.

Please look pxReadyTasksLists (memory). Does it look normal?

Need some fresh idea.  
Thanks  
Rasty

 ![image](https://d2v6vdsk2p900z.cloudfront.net/original/2X/a/ac029983d98d6f5f68f7c62706e8343f6889f0db.png)

---

<div class="post-metadata">

**Author:** ![richard-damon](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/richard-damon/32/38_2.png) [@richard-damon](https://forums.freertos.org/u/richard-damon)\
**Post date:** [January 14, 2026, 3:10pm UTC](https://forums.freertos.org/t/assert-in-taskselect-highest-priority-task/24823/2 "2026-01-14T15:10:01Z")

</div>

First glance, that sort of problem indicates that somehow no tasks are ready, like if an IdleHook does something to block.

It could also happen if some ISR corrupts the ready list.

---

<div class="post-metadata">

**Author:** ![rasty1](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rasty1/32/5886_2.png) [@rasty1](https://forums.freertos.org/u/rasty1)\
**Post date:** [January 14, 2026, 3:22pm UTC](https://forums.freertos.org/t/assert-in-taskselect-highest-priority-task/24823/3 "2026-01-14T15:22:10Z")

</div>

Another bit of information.  
normall pxReadyTasksLists[0] is 1. System can run for hours.  
I put h/w watchpint to pxReadyTasksLists[0], the trigger the problem.  
IdleTask writes 0 to pxReadyTasksLists[0] (was 1) by itself(!) and then Asserts error.

 ![image](https://d2v6vdsk2p900z.cloudfront.net/original/2X/8/827208e94bb1125c6b9748989b38e47fe97c2bc8.png)

---

<div class="post-metadata">

**Author:** ![richard-damon](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/richard-damon/32/38_2.png) [@richard-damon](https://forums.freertos.org/u/richard-damon)\
**Post date:** [January 14, 2026, 3:27pm UTC](https://forums.freertos.org/t/assert-in-taskselect-highest-priority-task/24823/4 "2026-01-14T15:27:02Z")

</div>

You are in a call to xQueueSemaphoreTake, which appears to have been called with a non-zero wait time. That isn’t allowed to be done in the Idle task.

As I said, you appear to have something in your IdleHook that sometimes blocks, which isn’t allowed.

You may need to create your own Idle Priority task instead of using the IdleHook if you are needing to do something that has any possibility of blocking.

I will add that the trace back to the call to xQueueSemaphoreTake looks funny, so perhaps there is something else going wrong there.

---

<div class="post-metadata">

**Author:** ![rasty1](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rasty1/32/5886_2.png) [@rasty1](https://forums.freertos.org/u/rasty1)\
**Post date:** [January 14, 2026, 3:35pm UTC](https://forums.freertos.org/t/assert-in-taskselect-highest-priority-task/24823/5 "2026-01-14T15:35:24Z")

</div>

> [@richard-damon](#):
>
> IdleHook

configUSE\_IDLE\_HOOK is defined as “0”, breakpoint in vApplicationLoadHook is not hit

---

<div class="post-metadata">

**Author:** ![rasty1](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rasty1/32/5886_2.png) [@rasty1](https://forums.freertos.org/u/rasty1)\
**Post date:** [January 14, 2026, 3:38pm UTC](https://forums.freertos.org/t/assert-in-taskselect-highest-priority-task/24823/6 "2026-01-14T15:38:43Z")

</div>

> [@richard-damon](#):
>
> I will add that the trace back to the call to xQueueSemaphoreTake looks funny,

Everything is compiled with -O3 so things/stack may look a bit unusual due to optimization.

---

<div class="post-metadata">

**Author:** ![RAc](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rac/32/1389_2.png) [@RAc](https://forums.freertos.org/u/RAc)\
**Post date:** [January 14, 2026, 3:43pm UTC](https://forums.freertos.org/t/assert-in-taskselect-highest-priority-task/24823/7 "2026-01-14T15:43:23Z")

</div>

can we see your code?

---

<div class="post-metadata">

**Author:** ![rasty1](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rasty1/32/5886_2.png) [@rasty1](https://forums.freertos.org/u/rasty1)\
**Post date:** [January 14, 2026, 4:37pm UTC](https://forums.freertos.org/t/assert-in-taskselect-highest-priority-task/24823/8 "2026-01-14T16:37:28Z")

</div>

we have a lot of code. Executable is apx 8 mbytes.  
If you’re interested in specific part and it does not contain any confidential info I can share.  
As I mentioned it is pretty strange problem.  
No DMA, No interrupts.  
But there 2 cores that share memory (I double checked for overlapping memories). Unfortunately I cannot stop the second core.  
[crash1\_short.zip](https://forums.freertos.org/uploads/short-url/zfjFaWh3tgSA6M85k3d6T65nAlh.zip) (15.7 KB)  
This is trace (ARM embedded trace is awesome) , read from top to bottom.  
It is stopped 1300+ lines away from the any application code (for clarity I filtered out instructions that belong to the same line) before it fail into Assert.

Why Idle task would consistently decide to write 0 into pxReadyTasksLists[0]?

---

<div class="post-metadata">

**Author:** ![RAc](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rac/32/1389_2.png) [@RAc](https://forums.freertos.org/u/RAc)\
**Post date:** [January 14, 2026, 7:18pm UTC](https://forums.freertos.org/t/assert-in-taskselect-highest-priority-task/24823/9 "2026-01-14T19:18:00Z")

</div>

can you obtain more information about this here debug assert? It looks suspicious:

> 123720,0x802D7AA2,0x0000BF00,123719,\_DebugP\_assert,DebugP\_log.c:111  
> 123717,0x802D7A2E,0x000068FB,123716,\_DebugP\_assert,DebugP\_log.c:93  
> 123710,0x802D7A20,0x0000B5B0,123709,\_DebugP\_assert,DebugP\_log.c:92  
> 123709,0x70183D6C,0xE51FF004,123708,\_\_\_DebugP\_assert\_from\_arm,:?  
> 123695,0x700F1C86,0xF64241E8,123694,vTaskExitCritical,tasks.c:7050  
> 123691,0x802D7AA2,0x0000BF00,123690,\_DebugP\_assert,DebugP\_log.c:111  
> 123688,0x802D7A2E,0x000068FB,123687,\_DebugP\_assert,DebugP\_log.c:93  
> 123681,0x802D7A20,0x0000B5B0,123680,\_DebugP\_assert,DebugP\_log.c:92  
> 123679,0x70183D6C,0xE51FF004,123678,\_\_\_DebugP\_assert\_from\_arm,:?

---

<div class="post-metadata">

**Author:** ![richard-damon](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/richard-damon/32/38_2.png) [@richard-damon](https://forums.freertos.org/u/richard-damon)\
**Post date:** [January 14, 2026, 9:54pm UTC](https://forums.freertos.org/t/assert-in-taskselect-highest-priority-task/24823/10 "2026-01-14T21:54:24Z")

</div>

> [@rasty1](#):
>
> Everything is compiled with -O3 so things/stack may look a bit unusual due to optimization.

O3 doesn’t affect the call stack so that the trace goes like that. Some functions in the chain might not show up, but not like what your stack trace shows.

Your likely problem is memory corruption which means it is very hard to know what is the cause.

I will note that the “Idle Task” won’t write the 0, it is that SOMETHING has gotten into the system to make something call AddCurrentTaskToDelayList in the context of the Idle task. The fact that the trace can’t go past that call is the suspicious thing. As well as the copysignf at 0xFFFFFFFE in the module dd3s\_v0\_core.

I will also add that NO interrupts seems strange, as under an RTOS you do most things with interrupts, and at least you need a time base.

---

<div class="post-metadata">

**Author:** ![rasty1](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rasty1/32/5886_2.png) [@rasty1](https://forums.freertos.org/u/rasty1)\
**Post date:** [January 15, 2026, 8:07am UTC](https://forums.freertos.org/t/assert-in-taskselect-highest-priority-task/24823/11 "2026-01-15T08:07:42Z")

</div>

I compared to “happy” case. Stack trace looks the same - weird.

 ![image](https://d2v6vdsk2p900z.cloudfront.net/original/2X/3/36b2c9d7b8c4d453d0003823d3360e8f207b097f.png)

---

<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:** [January 15, 2026, 9:15am UTC](https://forums.freertos.org/t/assert-in-taskselect-highest-priority-task/24823/12 "2026-01-15T09:15:07Z")

</div>

One thing you could do is to change application tasks priority from 0 to 1. This will ensure that only priority 0 task is idle task. Then the watchpoint `pxReadyTasksLists[0]->uxNumberOfItems` would be more helpful. Also, consider removing O3 for debugging.

---

<div class="post-metadata">

**Author:** ![rasty1](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rasty1/32/5886_2.png) [@rasty1](https://forums.freertos.org/u/rasty1)\
**Post date:** [January 15, 2026, 12:58pm UTC](https://forums.freertos.org/t/assert-in-taskselect-highest-priority-task/24823/13 "2026-01-15T12:58:56Z")

</div>

[full\_trace\_short.zip](https://forums.freertos.org/uploads/short-url/96FI3CO0mOuEDd4PeOMohCyJfth.zip) (37.2 KB)  
Here is unfiltered trace and location of breakpoint  
What I normally see is  
123890,0x802D7A2E,0x000068FB,123889,\_DebugP\_assert,DebugP\_log.c:93  
123889,0x802D7A2C,0x0000603B,123888,\_DebugP\_assert,DebugP\_log.c:92  
It reaches breakpoint at line #95 when something wrong happens

 ![image](https://d2v6vdsk2p900z.cloudfront.net/original/2X/8/83c0e3ca24502c0758eeebb00843dd18254c2341.png)

---

<div class="post-metadata">

**Author:** ![richard-damon](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/richard-damon/32/38_2.png) [@richard-damon](https://forums.freertos.org/u/richard-damon)\
**Post date:** [January 15, 2026, 2:11pm UTC](https://forums.freertos.org/t/assert-in-taskselect-highest-priority-task/24823/14 "2026-01-15T14:11:55Z")

</div>

I want to put a reminder that the problem isn’t were the ASSERT got triggered, but when the Idle task got blocked. The ASSERT is just the point when the problem gets notices.

The stack trace of where the watchpoint on pxReadyTasksLists[0] is what needs to be explained.

This shows that a call to xQueueSemaphoreTake was called that decided to block.

The Idle task never makes such a call.

The call chain leading to that call looks corrupted.

THIS is what needs to be determined. Has some task corrupted the Idle task stack to make something like this happen, or has something corrupted the system so it just looks like this has happened.

This sort of error tends to be hard to find, as it could be almost anywhere in the code doing a “wild write” to memory that shouldn’t be being written.

---

<div class="post-metadata">

**Author:** ![rasty1](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rasty1/32/5886_2.png) [@rasty1](https://forums.freertos.org/u/rasty1)\
**Post date:** [January 15, 2026, 2:46pm UTC](https://forums.freertos.org/t/assert-in-taskselect-highest-priority-task/24823/15 "2026-01-15T14:46:21Z")

</div>

I found something suspicious  
I see that the same DMA and IRQ are assigned to 2 cores via TI sysconfig and I cannot change it.  
I’m curious how it is going to work.  
I go to TI support.  
Thank you meanwhile.

---

<div class="post-metadata">

**Author:** ![rasty1](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rasty1/32/5886_2.png) [@rasty1](https://forums.freertos.org/u/rasty1)\
**Post date:** [January 21, 2026, 4:45pm UTC](https://forums.freertos.org/t/assert-in-taskselect-highest-priority-task/24823/16 "2026-01-21T16:45:22Z")

</div>

update:  
I was able to narrow down the problem to shutdown of communication server tasks under heavy stress load.  
We ported our aplication from TI-RTOS (SysBIOS) to FreeRTOS. problem was introduced in porting layers due to minor differences in API, such as attachment and deletion of thread storage and task name (FreeRTOS copies it into TCB, while TI-RTOS stores only pointer that has to be handled (freed) by application).

---

<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:** [January 22, 2026, 5:51am UTC](https://forums.freertos.org/t/assert-in-taskselect-highest-priority-task/24823/17 "2026-01-22T05:51:52Z")

</div>

Thank you for reporting back!

---

<div class="post-metadata">

**Author:** ![rasty1](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rasty1/32/5886_2.png) [@rasty1](https://forums.freertos.org/u/rasty1)\
**Post date:** [February 4, 2026, 9:48am UTC](https://forums.freertos.org/t/assert-in-taskselect-highest-priority-task/24823/18 "2026-02-04T09:48:03Z")

</div>

follow up question  
I do not see anything that looks like  
#if ( configUSE\_NEWLIB\_REENTRANT == 1 )  
struct \_reent xNewLib\_reent;  
#endif

inside this

typedef struct xSTATIC\_TCB  
{  
void \* pxDummy1;  
#if ( portUSING\_MPU\_WRAPPERS == 1 )  
xMPU\_SETTINGS xDummy2;  
#endif  
#if ( configUSE\_CORE\_AFFINITY == 1 ) && ( configNUMBER\_OF\_CORES \> 1 )  
UBaseType\_t uxDummy26;  
#endif  
StaticListItem\_t xDummy3[2];  
UBaseType\_t uxDummy5;  
void \* pxDummy6;  
#if ( configNUMBER\_OF\_CORES \> 1 )  
BaseType\_t xDummy23;  
UBaseType\_t uxDummy24;  
#endif  
uint8\_t ucDummy7[configMAX\_TASK\_NAME\_LEN];  
#if ( configUSE\_TASK\_PREEMPTION\_DISABLE == 1 )  
BaseType\_t xDummy25;  
#endif  
#if ( ( portSTACK\_GROWTH \> 0 ) || ( configRECORD\_STACK\_HIGH\_ADDRESS == 1 ) )  
void \* pxDummy8;  
#endif  
#if ( portCRITICAL\_NESTING\_IN\_TCB == 1 )  
UBaseType\_t uxDummy9;  
#endif  
#if ( configUSE\_TRACE\_FACILITY == 1 )  
UBaseType\_t uxDummy10[2];  
#endif  
#if ( configUSE\_MUTEXES == 1 )  
UBaseType\_t uxDummy12[2];  
#endif  
#if ( configUSE\_APPLICATION\_TASK\_TAG == 1 )  
void \* pxDummy14;  
#endif  
#if ( configNUM\_THREAD\_LOCAL\_STORAGE\_POINTERS \> 0 )  
void \* pvDummy15[configNUM\_THREAD\_LOCAL\_STORAGE\_POINTERS];  
#endif  
#if ( configGENERATE\_RUN\_TIME\_STATS == 1 )  
configRUN\_TIME\_COUNTER\_TYPE ulDummy16;  
#endif  
#if ( configUSE\_C\_RUNTIME\_TLS\_SUPPORT == 1 )  
configTLS\_BLOCK\_TYPE xDummy17;  
#endif  
#if ( configUSE\_TASK\_NOTIFICATIONS == 1 )  
uint32\_t ulDummy18[configTASK\_NOTIFICATION\_ARRAY\_ENTRIES];  
uint8\_t ucDummy19[configTASK\_NOTIFICATION\_ARRAY\_ENTRIES];  
#endif  
#if ( tskSTATIC\_AND\_DYNAMIC\_ALLOCATION\_POSSIBLE != 0 )  
uint8\_t uxDummy20;  
#endif

```
#if ( INCLUDE_xTaskAbortDelay == 1 )
    uint8_t ucDummy21;
#endif
#if ( configUSE_POSIX_ERRNO == 1 )
    int iDummy22;
#endif
    UBaseType_t stackdepth;

```

} StaticTask\_t;

---

<div class="post-metadata">

**Author:** ![rasty1](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rasty1/32/5886_2.png) [@rasty1](https://forums.freertos.org/u/rasty1)\
**Post date:** [February 4, 2026, 10:10am UTC](https://forums.freertos.org/t/assert-in-taskselect-highest-priority-task/24823/19 "2026-02-04T10:10:55Z")

</div>

> [@rasty1](#):
>
> configTLS\_BLOCK\_TYPE

OK. I see it is defined via configUSE\_C\_RUNTIME\_TLS\_SUPPORT
