goharbor/harbor · error

panic during the process

Error message

panic during the process

What it means

Sentinel error used in the background replication goroutine's deferred recover: when the flow panics during adapter processing, the execution is marked in this error state so the execution record does not stay running forever.

Solutions

  1. Inspect logs for the recovered panic value logged just before this error
  2. Check the replication adapter (source/dest registry) for bugs causing panics
  3. Retry the replication after fixing the adapter or registry issue
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at src/controller/replication/execution.go:156 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of goharbor/harbor@7b2fd08cc5 (2026-08-16). Data as JSON: /api/errors/b5061001c4c54a7c. Report an issue: GitHub.

Appendix: source

Thrown at src/controller/replication/execution.go:156

			}
			return id, nil
		}
	}

	// start the replication flow in background
	// as the process runs inside a goroutine, the transaction in the outer ctx
	// may be submitted already when the process starts, so create an new context
	// with orm populated to the goroutine
	go func() {
		c.wp.GetWorker()
		defer c.wp.ReleaseWorker()

		ctx := orm.NewContext(context.Background(), c.ormCreator.Create())
		// recover in case panic during the adapter process
		defer func() {
			if err := recover(); err != nil {
				logger.Errorf("recovered from the panic: %v", err)
				c.markError(ctx, id, fmt.Errorf("panic during the process"))
			}
		}()

		// as we start a new transaction in the goroutine, the execution record may not
		// be inserted yet, wait until it is ready before continue
		if err := retry.Retry(func() error {
			_, err := c.execMgr.Get(ctx, id)
			return err
		}); err != nil {
			c.markError(ctx, id, fmt.Errorf(
				"failed to wait the execution record to be inserted: %v", err))
			return
		}

		err := c.flowCtl.Start(ctx, id, policy, resource)
		if err == nil {
			// no err, return directly
			return

View on GitHub (pinned to 7b2fd08cc5)