Trevor PaughSystems engineer
Trevor PaughProject Chronicles

Chronicles / The Factory

A lock that stays held

Progress

One lock keeps two full test suites from running on the PC at once. On 28 November it let a second suite start beside a running one, and made a merge wait 56 minutes and give up.

The owner’s PC can run one full test suite well and two badly. A machine-wide lock is supposed to see that only one runs at a time, across every project.

What went wrong

The lock could go stale while its suite was still running. Three merges in another project failed because a second suite started beside theirs. A factory merge waited 56 minutes and gave up, while one project’s merges took the lock again and again ahead of it.

Held, and in order

The lock now stays held for as long as its suite runs, and waiting merges take their turn in the order they arrived. A second gap closed the same day: a build step longer than five minutes also let the lock go stale, so the merger now keeps it fresh while a repo builds.