From acf1cc214223164a4cb67296233b033246fc8774 Mon Sep 17 00:00:00 2001 From: Martin Vogel Date: Mon, 12 Oct 2026 06:03:54 +0200 Subject: [PATCH] fix(memwaste): index under one explicit budget on every venue scripts/memwaste.sh set no memory budget, so the daemon derived one from the machine's RAM: 1792 MB on the 7 GB macos-14 runner, about 4 GB on the 16 GB Linux and Windows runners. The event layer itself holds 0.5-1 GB, and on macOS the index stopped with over_memory_budget before it measured anything, in both full-mode runs since the lane was added (dry runs 37212102899 and 38186491924, peaks 3449 and 3111 MB at the stop). The script now passes CBM_MEM_BUDGET_MB=4096, what the larger runners already derived, unless the caller sets one. Checked on macOS arm64 with CBM_WORKERS=3, the macos-14 runner's core count: - budget 1792: over_memory_budget in parallel_extract (rss 3904 MB), the CI failure; - budget 4096: the index completes and the report is written; - the edited script with no budget in the environment: 4096 is applied, rc 0. Signed-off-by: Martin Vogel --- scripts/memwaste.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/scripts/memwaste.sh b/scripts/memwaste.sh index 8d1935d7e..706ca0ee8 100755 --- a/scripts/memwaste.sh +++ b/scripts/memwaste.sh @@ -131,8 +131,19 @@ cleanup() { } trap cleanup EXIT +# One explicit memory budget on every venue. Left to the daemon, the budget +# follows the machine's RAM: 1792 MB on the 7 GB macos-14 runner, about 4 GB on +# the 16 GB Linux and Windows runners. The event layer itself holds 0.5-1 GB, so +# on macOS the index stopped with over_memory_budget before it measured anything +# (dry runs 2026-10-04 and 2026-10-12). A venue's RAM must not decide whether +# the report exists. 4096 is what the larger runners already derived; the index +# completes under it on macOS with the runner's 3 workers. CBM_MEM_BUDGET_MB +# still overrides. +MEMWASTE_BUDGET_MB="${CBM_MEM_BUDGET_MB:-4096}" + INDEX_RC=0 -CBM_MEMWASTE=1 CBM_MEMWASTE_OUT="$DUMP_ENV" CBM_CACHE_DIR="$CACHE_DIR" CBM_RUNTIME_DIR="$RUNTIME" \ +CBM_MEM_BUDGET_MB="$MEMWASTE_BUDGET_MB" \ + CBM_MEMWASTE=1 CBM_MEMWASTE_OUT="$DUMP_ENV" CBM_CACHE_DIR="$CACHE_DIR" CBM_RUNTIME_DIR="$RUNTIME" \ CBM_LOG_LEVEL=error "$RUN_BIN" cli index_repository --repo-path "$REPO" --mode full \ >"$OUT/index.json" || INDEX_RC=$? if [ "$INDEX_RC" -ne 0 ]; then