Skip to content

Queue get timout parameter does not use a monotonic timer #104509

Open
@fdirosa4188

Description

@fdirosa4188

It is clear looking at the source code that the Queue class uses time() and other non-monotonic timing sources. So if a queue get function is called with a timeout value and the system time is changed during that get it could end up waiting in the get for potentially days. The easiest way to reproduce is to set the timeout in the get to 5 minutes and which it is waiting on the queue to get an entry set the system clock back a few years. You will notice it will not exit the get.

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.11only security fixes3.12only security fixespendingThe issue will be closed if no feedback is providedstdlibPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions