Skip to content

ci: a build-lock holder's reservation disappears mid-run, so the cleanup gate fails a clean leg #329

Description

Problem

A licensed Unity leg acquired the organization build lock, did its work, and then failed Require confirmed Unity cleanup because the release found the lock already free. The holder's own reservation had disappeared while it was working.

Evidence

Run 30645211053, job Unity 2021.3.45f1 playmode, on PR #326. The leg ran 16:01:03Z -> 16:02:54Z. Tests passed; the only failing step is the cleanup gate.

Acquire, at 16:00:57Z:

Lock repository: Ambiguous-Interactive/ambiguous-organization-build-lock
Holder: Ambiguous-Interactive/DxMessaging:30645211053:unity-tests:2021.3.45f1-playmode
Max concurrent holders: 2
Expired cooldown reservation fd74b0fb-ee46-45c6-9dd8-33c10cf21d94 for runner DAD-MACHINE.
Attempt 1: lock is free queue-position=1 max-holders=2
Acquired wallstop-organization-builds.

Release, roughly 68 seconds later at 16:02:05Z:

Release build lock wallstop-organization-builds
Lock is already free.
No release needed for wallstop-organization-builds.

Gate:

##[error]the central release did not report a safe holder-release result; the central
release did not confirm holder ownership removal acquired=true classification=true
cleanup=confirmed/healthy cleanup-reason=cleanup-confirmed release=success/noop
released=false release-health=healthy release-reason=cleanup-confirmed
reservation=missing/none incident=none

acquired=true and reservation=missing: the acquire succeeded and by release time the reservation was gone.

Why it is not the change under test

So this shape -- acquire succeeds, reservation vanishes, release no-ops -- is new and has one occurrence.

Leads

  • The acquire step expired a stale cooldown reservation belonging to a different runner (DAD-MACHINE) in the same call that took the lock, so the state was already carrying entries the sweep considered dead.
  • max-holders=2 and the lock is organization-wide. A concurrent acquirer from another repository running its own expiry sweep is the obvious candidate for removing this holder's reservation.
  • No other DxMessaging workflow held the lock: max-parallel: 1 serializes the matrix, and no Unity Benchmarks, Performance Numbers, or Release run was active in that window.
  • The preceding leg (2021.3.45f1 editmode) completed at 16:01:02Z, one second before this leg started. If the lock-state branch write for that release landed after this leg's acquire write, it would clobber the new reservation. That ordering is worth checking directly against the lock-state branch history.

Impact

A leg that did its work correctly and cleaned up correctly is reported red, and the red is on the cleanup gate -- the signal that must stay trustworthy, because the four-layer license-return guarantee depends on a reader believing it. A gate that can cry wolf trains people to re-run it.

Where the fix belongs

Ambiguous-Interactive/ambiguous-organization-build-lock, in the acquire/release state handling, not in this repository. Filed here so the DxMessaging-side evidence is not lost.

Acceptance criteria

  • A holder whose reservation is removed by another actor's sweep is distinguishable from a holder that never had one, and the gate reports the two differently.
  • Concurrent acquire and release against the lock-state branch cannot lose a reservation written by the other.
  • A leg whose tests passed and whose license was returned does not fail the cleanup gate because of lock bookkeeping alone.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions