-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Describe the bug
As we test Cortex-M3 project on FPGA, sometimes it enter endless loop in xTaskIncrementTick().
after debug with gdb, seems pxTCB->xStateListItem has already insert into pxReadyTasksLists(pxContainer also changed), but uxNumberOfItems of pxDelayedTaskList still 1, so that enter endless loop of below code
for( ; ; ) { if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE ) { /* The delayed list is empty. Set xNextTaskUnblockTime * to the maximum possible value so it is extremely * unlikely that the * if( xTickCount >= xNextTaskUnblockTime ) test will pass * next time through. */ xNextTaskUnblockTime = portMAX_DELAY; /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ break; } else { .... /* Place the unblocked task into the appropriate ready * list. */ prvAddTaskToReadyList( pxTCB );
Target
- Development board: Cortex-M3 FPGA
- Instruction Set Architecture: Armv7m
- IDE and version: Eclipse
- Toolchain and version: gcc version 9.2.1 20191025
Host
- Host OS: Ubuntu
- Version: 22.04
To Reproduce
- Implementation https://github.com/niesteszeck/FreeRTOS/blob/master/FreeRTOS-Plus/FreeRTOS-Plus-CLI and booting
- type 'enter' button serial times
- cli dont have response and check gdb backtrace
Expected behavior
CLI not hang.
Additional context
By the way, it only 100% reproduce on FPGA platform, qemu cant reproduce with same code.