Skip to content

[BUG] #1312

@Xxfore

Description

@Xxfore

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

  1. Implementation https://github.com/niesteszeck/FreeRTOS/blob/master/FreeRTOS-Plus/FreeRTOS-Plus-CLI and booting
  2. type 'enter' button serial times
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions