Skip to content

bug: two updates can run at the same time and corrupt things #26

Description

@Adityakk9031

what is issue: When you run codealmanac update, the tool tries to grab a lock file so only one update runs at a time. But there's a tiny gap between deleting the old lock file and creating a new one during that gap another process can sneak in and grab the lock too. Now both processes think they own the lock, so both run the update command (uv tool upgrade or pip install). That can break your installation.

root cause: The code does three separate steps (1) check if lock is stale, (2) delete it, (3) create a new one instead of doing it as a single atomic swap. Any other process running at the same time can step in between steps (2) and (3).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions