Skip to content

Restart montowania po serii odmów EAGAIN przy podpinaniu obrazu - #28

Merged
mbeczynski merged 1 commit into
mainfrom
fix/restart-mountu-po-serii-eagain
Oct 26, 2026
Merged

mbeczynski merged 1 commit into
mainfrom
fix/restart-mountu-po-serii-eagain

Conversation

@mbeczynski

Copy link
Copy Markdown
Contributor

24–26.10.2026 przez 26 h każde podpięcie obrazu kończyło się hdiutil: attach failed - Resource temporarily unavailable, choć rclone był bezczynny (kolejka 0) i odpowiadał. Pomógł dopiero restart Maca, czyli świeży rclone. W sumie 37 h bez kopii.

Zmiana

  • AttachStall: liczy odmowy EAGAIN w obrębie jednego uruchomienia Maca. Po 3 z rzędu, rozciągniętych na co najmniej 30 min, odpala MountRestart, z jego zabezpieczeniami: nie w trakcie kopii i nie przed opróżnieniem kolejki.
  • Najwyżej jeden restart na 6 h. Odmowa restartu (didNotRun) nie uruchamia tej przerwy.
  • EAGAIN rozpoznawany raz, tam gdzie działa hdiutil (CMActionResult.attachTemporarilyUnavailable). Wywołujący nie dopasowują tekstu komunikatu.

Testy

  • 430/430, lint zielony.
  • 12 nowych testów. Mutacje progu czasu, przerwy, liczenia odmowy i obsługi „busy” każda wywala co najmniej jeden test.

Niezweryfikowane na żywo: zachowanie przy prawdziwej serii EAGAIN. Nie umiem jej wywołać na żądanie.

🤖 Generated with Claude Code

24-26 Oct 2026: after the mount wedged during a backup, every attach of
the gdrive-attach agent failed with "hdiutil: attach failed - Resource
temporarily unavailable" for 26 h, while rclone sat idle (queue 0) and
answered about its queue. Only a restart of the Mac - a fresh rclone -
let the image attach. 37 h without a backup.

AttachStall counts EAGAIN refusals per boot session and, after 3 in a
row spanning at least 30 min, runs MountRestart (same refusals as the
button: not during a backup, not before the queue drains). At most one
restart per 6 h; a refused restart (didNotRun) does not start the
cooldown. hdiutil's EAGAIN is recognized once, where it runs, and
carried as CMActionResult.attachTemporarilyUnavailable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mbeczynski
mbeczynski merged commit df488bd into main Oct 26, 2026
2 checks passed
@mbeczynski
mbeczynski deleted the fix/restart-mountu-po-serii-eagain branch October 26, 2026 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant