You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Control scripts: a restart longer than one minute lets a second call take the lock #4
take_lock treats a lock directory older than one minute as abandoned and removes it. A legitimate call can hold the lock longer than that:
stop waits up to 30 s per runner for TERM (scripts/gh-runners-ctl.sh L46), and the script loops over every id (L96), so restart with two slow runners already passes a minute.
Since f9faf14, start also runs check-repo.sh for each runner (L60-L65), which makes network calls, so a restart over a slow link takes longer still.
A second call at that moment (Termux:Boot and an SSH session, the case the lock exists for) removes the lock and starts runners the first call is still stopping, which leads to the "A session for this runner already exists" loop the README describes under Migrating.
Write the holder's pid into the lock directory (echo $$ > "$LOCK/pid") and treat the lock as stale only when that pid is no longer alive, instead of going by its age.
Activity
fix(scripts): treat a process in the middle of an exec as running
fix(scripts): do not start a second copy while the first is in the mi…
agent-kit-startup commentedon Nov 30, 2026
Thanks, @vidalc2. Fixed across three PRs, released in v0.2.1:
startno longer starts another copy while the first copy is still in the middle of an exec.mkdir's exit status, which somemkdirimplementations report as success to racing calls.