Repository navigation
Description
Reported by the snakemake adapter's beta tester in snakemake-executor-plugin-spawn#16, with console evidence. Filing it here as they framed it — an observation with evidence, not a confident TTL bug claim — because the box was in a state nothing is promised for.
What was observed
t4g.small-class probe, actually sized tot4g.nano(0.5 GiB), TTL 6m- The job wedged during a Docker install: console shows
Amazon Linux 2023 repository 56 MB/s | 80 MB, thenWaiting for process with pid 2213 to finish, then nothing - At 12 minutes — double the TTL — the instance was still
running - No
completion.jsonand nocommand.login the results prefix - Force-terminated by hand
The likely reading, and why it is not surprising
spored enforces TTL, idle and cost limits in-instance. A box too degraded to make progress under dnf on 0.5 GiB is also too degraded to run its own enforcement loop — so the mechanism that should have killed it is the mechanism that was starved. This is the same constraint #640 names for FSx, and it is the stated reason the out-of-band reaper exists at all (the lifecycle invariant: "lifetime is enforced in-instance by spored, so it needs an out-of-band reaper backstop").
So I do not think this is a defect in the TTL logic. It is the in-instance enforcement model meeting its documented limit, demonstrated live.
Why it is still worth an issue
Three things this sharpens:
- It is the cleanest real-world demonstration of why the reaper is not optional. Until now the argument for the backstop has been structural. Here is an instance that outlived its TTL by 2× in an account with no reaper, and the only thing that stopped the bill was a human noticing. Worth citing in the reaper docs.
- Nothing warned. From the outside this is indistinguishable from a long-running job. There is no signal that
sporednever reached its ticker, which is the spored#65 shape (never block the ticker startup path) in a new guise — not blocked by code this time, but starved by the box. Aspored-has-not-checked-in signal would make this visible; today the absence of a heartbeat is silent. - It argues for a floor. The adapter side is snakemake-executor-plugin-spawn#18 (don't size a container job onto 0.5 GiB). The spawn side is whether
spawnshould refuse, or warn about, an instance type too small to runsporedplus whatever the launch is also asking it to install. There is a precedent for failing closed here —--mpion a non-cluster-capable type is refused up front, before spending.
What I am NOT claiming
That TTL is broken. On the same reporter's 4 GiB runs everything behaved: correct non-zero exit codes in completion.json, full command.log, and self-termination on on_complete without intervention. The failure is specific to a box with too little memory to function.
Suggested next step
Not a code change yet — a decision on (2) and (3). My inclination: a minimum-viable-instance guard (refuse or warn, following the --mpi precedent) is cheap and prevents the class; a spored heartbeat is a bigger piece of work but is the only thing that makes a starved instance visible rather than merely preventable. Both are properly part of the "who reaps the reapers" thread rather than a quick fix here.
Activity
feat(launch): warn when an instance is too small to enforce its own T…
feat(launch): warn when an instance is too small to enforce its own T…
feat(launch): warn when an instance is too small to enforce its own T…
chore(release): v0.121.0
feat(reaper): report when spored has stopped checking in (#682)
feat(reaper): report when spored has stopped checking in (#682) (#729)