Skip to content

Task sets: a create, rename or delete at the same time can replace or lose a set #818

Description

@harenome

Priority

P3

Components

app/nullius/standard/runner/sets.py (create, rename)

Evidence

On main f9f076a11, task sets are written without a lock:

  • create checks that the name is free, then writes (sets.py:465-497, check 490, write 496). Two creates with the same label both pass the check; the second replaces the first set.
  • rename writes the new file, then unlinks the old one (sets.py:509-525). A rename racing another rename or a delete can lose a set or leave it under both names.

Callers: the catalogue page (web/catalogue.py:398,428), the job page (web/runs.py:683), nullius standard set create/rename/delete (standard/cli.py:966,1027).

Reproduction

  1. Pause one create after its free-name check.
  2. Create a set with the same label through a second request.
  3. Resume the first.
  4. List the benchmark's sets.

Expected

The second create is refused or gets its own name; no set is replaced or lost.

Acceptance

  • create, rename and delete of one benchmark's sets run under one lock
  • Tests: two creates with one label; rename against rename; rename against delete

Dependencies and related

#770, #810

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P3bug

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions