airvzxf / airvzxf/ftp-deployment-action

fix(acquire_lock): stale-lock threshold equals wait timeout — live holder lock stolen mid-mirror

オープン
#250 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
area:lib.sh audit bug pending-design pending-human priority:medium
主要言語
Shell
スター
37
フォーク
9
平均マージ
44分
マージ済み PR(30日)
47

説明

## Summary
In lib.sh::acquire_lock_with_recovery (line 1086) the staleness check is 'if [ "${_alwr_age}" -le "${_alwr_timeout}" ]; then ... respect'. The sentinel timestamp is written once (lib.sh:983) and never refreshed, so a mirror that legitimately runs longer than concurrency_lock_timeout (default 300 s — routine for a large site; LFTP_TIMEOUT is 5 h) is indistinguishable from a dead holder. Runner B deletes A lock and starts mirroring concurrently; when A finishes, its trap RMDs the lock dir now owned by B, so C enters too — the failure cascades rather than self-corrects.

## Suggested fix
Decouple staleness from the wait window, e.g. add concurrency_lock_stale_after (default > LFTP_TIMEOUT) and compare against that, or refresh the sentinel periodically.

## Source
F2 audit round (post-v2.11.3 release).

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。