From 0c1ee33870d8fee18c850e283dfa7cfbd089550f Mon Sep 17 00:00:00 2001 From: igneum-labs <337424239+igneum-labs@users.noreply.github.com> Date: Thu, 8 Oct 2026 12:28:09 +0000 Subject: [PATCH] lease self-test: the non-memory cases read no live residents (three gates hung two hours at the ceiling on build-1) Co-Authored-By: Claude Fable 5.1 --- infra/build-server/lease.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/infra/build-server/lease.sh b/infra/build-server/lease.sh index 063f3564b..8bcd41f8b 100755 --- a/infra/build-server/lease.sh +++ b/infra/build-server/lease.sh @@ -239,7 +239,10 @@ self_test() { t=$(mktemp -d); trap 'rm -rf "$t"' EXIT # a PRIVATE lock directory (never the live _locks) and no pinning: the test is about the locks, and it must read the same on an # idle box and on one at load 120 (the horizon lane, 7 Oct 2026: one red on a full gate, green a minute later) - export IGNEUM_BUILD_SLOTS_DIR="$t/locks" IGNEUM_BUILD_LOG_DIR="$t/log" LEASE_REAP_S=2 LEASE_NO_PIN=1; mkdir -p "$t/locks"; echo 2 > "$t/locks/slots" + # LEASE_RESIDENT_GB=0: the memory rule reads the box's live igneumd and sccache residents from /proc, and on build-1 at 80 GB of hands + # every pool case of this test would wait at the ceiling for two hours (three gates hung on the box, 8 Oct 2026 13:0x BST); the + # memory case sets its own figure + export IGNEUM_BUILD_SLOTS_DIR="$t/locks" IGNEUM_BUILD_LOG_DIR="$t/log" LEASE_REAP_S=2 LEASE_NO_PIN=1 LEASE_RESIDENT_GB=0; mkdir -p "$t/locks"; echo 2 > "$t/locks/slots" local me="$0" fail=0 f() { echo "lease self-test: FAIL: $*"; fail=1; } # 1. two leases on disjoint cores run together; the same core waits @@ -324,7 +327,7 @@ self_test() { python3 -c "import sys; sys.exit(0 if float(open('$t/m3.start').read()) < float(open('$t/m1.start').read()) + 5.5 else 1)" || f "a lease inside the ceiling waited for an unrelated holder" bash "$me" pool 1 --min 1 --mem 4 --label M2 -- bash -c "date +%s.%N > '$t/m2.start'" 2>/dev/null python3 -c "import sys; sys.exit(0 if float(open('$t/m2.start').read()) >= float(open('$t/m1.end').read()) else 1)" || f "a lease past the ceiling started before the holder released its memory" - wait; unset LEASE_MEM_CEILING_GB LEASE_RESIDENT_GB LEASE_POOL_STEP_S + wait; unset LEASE_MEM_CEILING_GB LEASE_POOL_STEP_S; export LEASE_RESIDENT_GB=0 [ "$fail" = 0 ] && echo "lease self-test: disjoint leases run together, a shared core waits, quiet is refused beside a slot or a lease and capped, a stopped holder is reaped after the window, a running one is kept, a pool run takes the free pool cores and the next waits for them, a higher class is served before a lower one whatever the arrival order, a v5 waiter pre-empts adv holders at any size oldest first until its ask is met and leaves a small measure row alone, ca4 research is first among measure rows, a lease declares its memory and waits at the box ceiling" return $fail }