Found testing v1.1.0-RC8-2-g23a2bb6 on A8 s/n 0498.
Repro
Install selector, then Backup, label claude-backup-test, then Backup, then Cancel after ~25 s.
What happens
The UI returns to idle. The server state is ERROR:
[info] Backup cancelled after 0 minutes and 27 seconds
[info] Mounting /dev/sda2 on /mnt/usb as ro
[error] [mount-unmount-usb mounted ro]: exit status 32: umount: /mnt/usb: target is busy.
[error] [backup-emmc /mnt/usb/images/claude-backup-test]: exit status 137:
[info] Mounting /dev/sda2 on /mnt/usb as ro
[error] Error encountered during backup: ...
get_progress: "state":"ERROR","error":"An error was encountered during backup. Check log for details".
The open tab had already stopped polling (it saw CANCELLED then IDLE), so the error surfaces later: on a page reload, or to STATUS on the control protocol (flasher-pi).
Why
cancelBackup sets CANCELLED before the kill, and goBackup checks for CANCELLED under the lock. But getProgress turns CANCELLED into IDLE on the next poll (unlocked). The killed pipeline takes longer than one 1 s poll to exit, so goBackup sees IDLE and records ERROR. The same getProgress transition also runs mountUsb(MODE_RO) while the backup still has the file open ("target is busy").
Suggested direction
Do not let getProgress consume CANCELLED while the worker goroutine is still running. Let the worker own the final transition, or track "worker done" separately.
Found testing v1.1.0-RC8-2-g23a2bb6 on A8 s/n 0498.
Repro
Install selector, then Backup, label
claude-backup-test, then Backup, then Cancel after ~25 s.What happens
The UI returns to idle. The server state is ERROR:
get_progress:"state":"ERROR","error":"An error was encountered during backup. Check log for details".The open tab had already stopped polling (it saw CANCELLED then IDLE), so the error surfaces later: on a page reload, or to
STATUSon the control protocol (flasher-pi).Why
cancelBackupsets CANCELLED before the kill, andgoBackupchecks for CANCELLED under the lock. ButgetProgressturns CANCELLED into IDLE on the next poll (unlocked). The killed pipeline takes longer than one 1 s poll to exit, sogoBackupsees IDLE and records ERROR. The samegetProgresstransition also runsmountUsb(MODE_RO)while the backup still has the file open ("target is busy").Suggested direction
Do not let
getProgressconsume CANCELLED while the worker goroutine is still running. Let the worker own the final transition, or track "worker done" separately.