juicedata/juicefs · info

aborted

Error message

aborted

What it means

calPartChksum computes the CRC32 of a remote object part during sync comparison. Before doing work it selects on the abort channel; if the abort channel is closed (sync is being cancelled) it returns 'aborted'. This is a cooperative-cancellation error, not a malfunction.

Source

Thrown at pkg/sync/sync.go:476

	if !fi.IsSymlink() || !config.Links {
		// chmod needs to be executed after chown, because chown will change setuid setgid to be invalid.
		if err := dst.(object.FileSystem).Chown(key, fi.Owner(), fi.Group()); err != nil {
			logger.Warnf("Chown %s to (%s,%s): %s", key, fi.Owner(), fi.Group(), err)
		}
		if err := dst.(object.FileSystem).Chmod(key, fi.Mode()); err != nil {
			logger.Warnf("Chmod %s to %o: %s", key, fi.Mode(), err)
		}
	}
	logger.Debugf("Copied permissions (%s:%s:%s) for %s in %s", fi.Owner(), fi.Group(), fi.Mode(), key, time.Since(start))
}

func calPartChksum(objStor object.ObjectStorage, key string, abort chan struct{}, offset, length int64) (uint32, error) {
	if limiter != nil {
		limiter.Wait(length)
	}
	select {
	case <-abort:
		return 0, fmt.Errorf("aborted")
	case concurrent <- 1:
		defer func() {
			<-concurrent
		}()
	}
	in, err := objStor.Get(ctx, key, offset, length)
	if err != nil {
		return 0, fmt.Errorf("dest get: %s", err)
	}
	defer in.Close()

	buf := bufPool.Get().(*[]byte)
	defer bufPool.Put(buf)
	var chksum uint32
	for left := int(length); left > 0; left -= bufferSize {
		bs := bufferSize
		if left < bufferSize {
			bs = left

View on GitHub (pinned to c9a67b23e8)

Solutions

  1. No fix needed — this is expected during cancellation; treat it as a cancellation signal, not a failure
  2. If seen without user interruption, check logs above for the original error that triggered abort
  3. Re-run the sync to complete the checksum comparison
Defensive patterns

Strategy: try-catch

Try / catch

chksum, err := calPartChksum(stor, key, abort, off, length)
if err != nil {
	if err.Error() == "aborted" {
		return nil // expected cancellation, not a failure
	}
	return fmt.Errorf("checksum failed: %s", err)
}

Prevention

When it happens

Trigger: The sync's abort channel is closed (Ctrl-C, another goroutine detected a fatal error, or check-and-copy decided the comparison is moot) while calPartChksum is about to read a part; also triggered if abort fires between limiter.Wait and acquiring the concurrency slot.

Common situations: User interrupts a sync mid-checksum; a parallel worker failed causing global cancellation; shutdown of the process during large-file comparison.

Related errors


AI-assisted analysis of juicedata/juicefs@c9a67b23e8 (2026-09-06). Data as JSON: /api/errors/8af01acf17660e35. Report an issue: GitHub.