-
Notifications
You must be signed in to change notification settings - Fork 4.1k
backupccl: v21.2.4-customer: nil pointer in restoreResumer.cleanupTempSystemTables #76720
Description
This issue was autofiled by Sentry. It represents a crash or reported error on a live cluster with telemetry enabled.
Sentry link: https://sentry.io/organizations/cockroach-labs/issues/3022515119/?referrer=webhooks_plugin
Panic message:
panic.go:965: runtime error: invalid memory address or nil pointer dereference
--
runtime.errorString
panic.go:965: *withstack.withStack (top exception)
Stacktrace (expand for inline code snippets):
/usr/local/go/src/runtime/panic.go#L964-L966 in runtime.gopanic
/usr/local/go/src/runtime/panic.go#L211-L213 in runtime.panicmem
/usr/local/go/src/runtime/signal_unix.go#L733-L735 in runtime.sigpanic
cockroach/pkg/ccl/backupccl/restore_job.go
Lines 2428 to 2430 in b4a27f3
| func (r *restoreResumer) cleanupTempSystemTables(ctx context.Context, txn *kv.Txn) error { | |
| executor := r.execCfg.InternalExecutor | |
| // Check if the temp system database has already been dropped. This can happen |
cockroach/pkg/ccl/backupccl/restore_job.go
Lines 1938 to 1940 in b4a27f3
| // in `dropDescriptors` but we still need to drop the temporary system db. | |
| return r.cleanupTempSystemTables(ctx, txn) | |
| } |
cockroach/pkg/sql/catalog/descs/txn.go
Lines 83 to 85 in b4a27f3
| } | |
| if err := f(ctx, txn, &descsCol); err != nil { | |
| return err |
Lines 835 to 837 in b4a27f3
| err := txn.exec(ctx, func(ctx context.Context, txn *Txn) error { | |
| return retryable(ctx, txn) | |
| }) |
Lines 907 to 909 in b4a27f3
| } | |
| err = fn(ctx, txn) | |
Lines 834 to 836 in b4a27f3
| func runTxn(ctx context.Context, txn *Txn, retryable func(context.Context, *Txn) error) error { | |
| err := txn.exec(ctx, func(ctx context.Context, txn *Txn) error { | |
| return retryable(ctx, txn) |
Lines 816 to 818 in b4a27f3
| txn.SetDebugName("unnamed") | |
| return runTxn(ctx, txn, retryable) | |
| } |
cockroach/pkg/sql/catalog/descs/txn.go
Lines 75 to 77 in b4a27f3
| var descsCol Collection | |
| if err := db.Txn(ctx, func(ctx context.Context, txn *kv.Txn) error { | |
| modifiedDescriptors = nil |
cockroach/pkg/sql/exec_util.go
Lines 3073 to 3075 in b4a27f3
| ) error { | |
| return execCfg.CollectionFactory.Txn(ctx, execCfg.InternalExecutor, execCfg.DB, f) | |
| } |
cockroach/pkg/ccl/backupccl/restore_job.go
Lines 1908 to 1910 in b4a27f3
| execCfg := execCtx.(sql.JobExecContext).ExecCfg() | |
| if err := sql.DescsTxn(ctx, execCfg, func( | |
| ctx context.Context, txn *kv.Txn, descsCol *descs.Collection, |
cockroach/pkg/jobs/registry.go
Lines 1269 to 1271 in b4a27f3
| defer jm.CurrentlyRunning.Dec(1) | |
| err = resumer.OnFailOrCancel(onFailOrCancelCtx, execCtx) | |
| }() |
cockroach/pkg/jobs/registry.go
Lines 1270 to 1272 in b4a27f3
| err = resumer.OnFailOrCancel(onFailOrCancelCtx, execCtx) | |
| }() | |
| if successOnFailOrCancel := err == nil; successOnFailOrCancel { |
Lines 414 to 416 in b4a27f3
| // Run the actual job. | |
| err := r.stepThroughStateMachine(ctx, execCtx, resumer, job, status, finalResumeError) | |
| // If the context has been canceled, disregard errors for the sake of logging |
Lines 335 to 337 in b4a27f3
| // was one it's been set in the job status already. | |
| _ = r.runJob(resumeCtx, resumer, job, status, job.taskName()) | |
| }); err != nil { |
cockroach/pkg/util/stop/stopper.go
Lines 441 to 443 in b4a27f3
| f(ctx) | |
| }() |
/usr/local/go/src/runtime/asm_amd64.s#L1370-L1372 in runtime.goexit
/usr/local/go/src/runtime/panic.go in runtime.gopanic at line 965
/usr/local/go/src/runtime/panic.go in runtime.panicmem at line 212
/usr/local/go/src/runtime/signal_unix.go in runtime.sigpanic at line 734
pkg/ccl/backupccl/restore_job.go in pkg/ccl/backupccl.(*restoreResumer).cleanupTempSystemTables at line 2429
pkg/ccl/backupccl/restore_job.go in pkg/ccl/backupccl.(*restoreResumer).OnFailOrCancel.func1 at line 1939
pkg/sql/catalog/descs/txn.go in pkg/sql/catalog/descs.(*CollectionFactory).Txn.func2 at line 84
pkg/kv/db.go in pkg/kv.runTxn.func1 at line 836
pkg/kv/txn.go in pkg/kv.(*Txn).exec at line 908
pkg/kv/db.go in pkg/kv.runTxn at line 835
pkg/kv/db.go in pkg/kv.(*DB).Txn at line 817
pkg/sql/catalog/descs/txn.go in pkg/sql/catalog/descs.(*CollectionFactory).Txn at line 76
pkg/sql/exec_util.go in pkg/sql.DescsTxn at line 3074
pkg/ccl/backupccl/restore_job.go in pkg/ccl/backupccl.(*restoreResumer).OnFailOrCancel at line 1909
pkg/jobs/registry.go in pkg/jobs.(*Registry).stepThroughStateMachine.func3 at line 1270
pkg/jobs/registry.go in pkg/jobs.(*Registry).stepThroughStateMachine at line 1271
pkg/jobs/adopt.go in pkg/jobs.(*Registry).runJob at line 415
pkg/jobs/adopt.go in pkg/jobs.(*Registry).resumeJob.func1 at line 336
pkg/util/stop/stopper.go in pkg/util/stop.(*Stopper).RunAsyncTaskEx.func2 at line 442
/usr/local/go/src/runtime/asm_amd64.s in runtime.goexit at line 1371
| Tag | Value |
|---|---|
| Cockroach Release | v21.2.4-53-gb4a27f3634 |
| Cockroach SHA: | b4a27f3 |
| Platform | linux amd64 |
| Distribution | CCL |
| Environment | development |
| Command | server |
| Go Version | `` |
| # of CPUs | |
| # of Goroutines |
Jira issue: CRDB-13247