fix: start core_probe one way from every probe

pack_probe and region_check run core_probe through probes.host.run_when_idle:
a busy refusal is retried until the wait runs out, a timeout kills the
run's whole process group, and pack_probe takes core_probe's own probe
lock, which honours RETROBIOS_PROBE_LOCK_HELD. core_probe names its busy
exit status EXIT_BUSY.
This commit is contained in:
Abdessamad Derraz committed 2026-11-21 06:04:23 +01:00
1 parent 922d60807f
commit d2984bc466
7 files changed
+49 -60

No files matched your search

+3 -1
View File
@@ -90,6 +90,8 @@ PRINTF_SPEC = re.compile(r"%(?P<flags>[-+ #0]*)(?P<width>\*|\d+)?(?:\.(?P<prec>\
PROBE_LOCK_ENV = "RETROBIOS_PROBE_LOCK"
PROBE_LOCK_HELD_ENV = "RETROBIOS_PROBE_LOCK_HELD"
DEFAULT_PROBE_LOCK = Path.home() / ".local" / "state" / "retrobios" / "probe.lock"
# The exit status of a run refused on a busy host: nothing was recorded.
EXIT_BUSY = 3
def probe_lock_path() -> Path:
@@ -1585,7 +1587,7 @@ def _probe(args: argparse.Namespace) -> int:
if args.record and load_before and load_before[0] > max_load:
print(f"ERROR: load average {load_before[0]} exceeds {max_load}: the machine is busy, "
f"nothing recorded (raise --max-load to override)", file=sys.stderr)
return 3
return EXIT_BUSY
repetitions = args.repeat
base = {dest: Path(src) for dest, src in args.system_file}
args.oracle_data, oracle_identity = load_oracle(Path(args.oracle) if args.oracle else DEFAULT_ORACLE)