Skip to content

Odmontowanie osieroconego montowania po padzie rclone - #29

Merged
mbeczynski merged 1 commit into
mainfrom
fix/osierocone-montowanie-po-padzie-rclone
Oct 27, 2026
Merged

mbeczynski merged 1 commit into
mainfrom
fix/osierocone-montowanie-po-padzie-rclone

Conversation

@mbeczynski

@mbeczynski mbeczynski commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Co

OrphanMount: gdy montowanie Drive jest w tablicy montowań, a żaden żywy rclone go nie trzyma, agenty robią umount -f.

  • buffer-guard sprawdza co 30 s w osobnym zadaniu (zawieszona sonda głównej pętli go nie blokuje); działa po 60 s, bo zwykły restart rclone przez launchd też ma chwilę bez procesu.
  • mount-drive robi to samo przy starcie, zanim uzna, że jest „Already mounted”.

Sprawdzenie nie dotyka systemu plików: tablica montowań przez getmntinfo(MNT_NOWAIT), procesy przez pgrep/ps (stan E/Z = nieżywy). Każda wątpliwość (nie da się odczytać) = nic nie robi.

Dlaczego

25.10 00:02 i 27.10 00:19, obie w trakcie kopii: rclone Mount failed / CRITICAL: failed to umount FUSE fs i wyjście, a martwe NFS fuse-t:/gdrive zostało. mount-drive widział „Already mounted”, wszystko, co robi stat montowania, wisiało. 27.10 trwało to 8 h, do restartu Maca. 25.10 ręczny umount -f wystarczył, rclone wrócił po 30 s. #28 (seria EAGAIN) tego nie łapie.

Testy

swift test: 436 zielonych (6 nowych w OrphanMountTests), lint --strict czysty. pgrep z tym wzorcem znajduje żywy rclone (stan S). Na prawdziwym osieroconym montowaniu niesprawdzone.

🤖 Generated with Claude Code

On 25.10 and 27.10 rclone ended with "Mount failed" / "failed to umount
FUSE fs" during a backup, but the FUSE-T NFS mount stayed in the mount
table. mount-drive then saw it as "Already mounted" and never started
rclone again, while every stat of the mount hung - 8 h on 27.10, until
the Mac was restarted.

OrphanMount checks the mount table (MNT_NOWAIT) and the process table
(pgrep/ps, exiting and zombie processes do not count), never the file
system. buffer-guard watches in its own task and runs `umount -f` after
60 s of a listed mount with no live rclone; mount-drive does the same at
start-up, before deciding the mount is already up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mbeczynski
mbeczynski merged commit 2e3a23c into main Oct 27, 2026
2 checks passed
@mbeczynski
mbeczynski deleted the fix/osierocone-montowanie-po-padzie-rclone branch October 27, 2026 08:48
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