Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sentry: panic.go:884: runtime error: invalid memory address or nil pointer dereference (1) attached stack trace -- stack trace: | runtime.gopanic | GOROOT/src/runtime/panic.go:884 | github.co... #105320

Closed
cockroach-sentry opened this issue Jun 21, 2023 · 1 comment

Comments

@cockroach-sentry
Copy link
Collaborator

cockroach-sentry commented Jun 21, 2023

This issue was auto filed by Sentry. It represents a crash or reported error on a live cluster with telemetry enabled.

Sentry Link: https://cockroach-labs.sentry.io/issues/4266666250/?referrer=webhooks_plugin

Panic Message:

panic.go:884: runtime error: invalid memory address or nil pointer dereference
(1) attached stack trace
  -- stack trace:
  | runtime.gopanic
  | 	GOROOT/src/runtime/panic.go:884
  | github.com/cockroachdb/cockroach/pkg/sql/colexecerror.CatchVectorizedRuntimeError.func1
  | 	github.com/cockroachdb/cockroach/pkg/sql/colexecerror/error.go:58
  | runtime.gopanic
  | 	GOROOT/src/runtime/panic.go:884
  | github.com/cockroachdb/cockroach/pkg/sql/colexecerror.CatchVectorizedRuntimeError.func1
  | 	github.com/cockroachdb/cockroach/pkg/sql/colexecerror/error.go:58
  | runtime.gopanic
  | 	GOROOT/src/runtime/panic.go:884
  | github.com/cockroachdb/cockroach/pkg/sql/colexecerror.CatchVectorizedRuntimeError.func1
  | 	github.com/cockroachdb/cockroach/pkg/sql/colexecerror/error.go:58
  | runtime.gopanic
  | 	GOROOT/src/runtime/panic.go:884
  | runtime.panicmem
  | 	GOROOT/src/runtime/panic.go:260
  | runtime.sigpanic
  | 	GOROOT/src/runtime/signal_unix.go:835
  | github.com/cockroachdb/cockroach/pkg/sql/sqlstats/persistedsqlstats.(*PersistedSQLStats).ComputeAggregatedTs
  | 	github.com/cockroachdb/cockroach/pkg/sql/sqlstats/persistedsqlstats/pkg/sql/sqlstats/persistedsqlstats/flush.go:332
  | github.com/cockroachdb/cockroach/pkg/sql.glob..func85
  | 	github.com/cockroachdb/cockroach/pkg/sql/crdb_internal.go:5644
  | github.com/cockroachdb/cockroach/pkg/sql.(*virtualDefEntry).getPlanInfo.func1
  | 	github.com/cockroachdb/cockroach/pkg/sql/virtual_schema.go:590
  | github.com/cockroachdb/cockroach/pkg/sql.constructVirtualScan.func1
  | 	github.com/cockroachdb/cockroach/pkg/sql/exec_factory_util.go:250
  | github.com/cockroachdb/cockroach/pkg/sql.(*delayedNode).startExec
  | 	github.com/cockroachdb/cockroach/pkg/sql/delayed.go:50
  | github.com/cockroachdb/cockroach/pkg/sql.startExec.func2
  | 	github.com/cockroachdb/cockroach/pkg/sql/plan.go:518
  | github.com/cockroachdb/cockroach/pkg/sql.(*planVisitor).visitInternal.func1
  | 	github.com/cockroachdb/cockroach/pkg/sql/walk.go:112
  | github.com/cockroachdb/cockroach/pkg/sql.(*planVisitor).visitInternal
  | 	github.com/cockroachdb/cockroach/pkg/sql/walk.go:297
  | github.com/cockroachdb/cockroach/pkg/sql.(*planVisitor).visit
  | 	github.com/cockroachdb/cockroach/pkg/sql/walk.go:79
  | github.com/cockroachdb/cockroach/pkg/sql.walkPlan
  | 	github.com/cockroachdb/cockroach/pkg/sql/walk.go:43
  | github.com/cockroachdb/cockroach/pkg/sql.startExec
  | 	github.com/cockroachdb/cockroach/pkg/sql/plan.go:521
  | github.com/cockroachdb/cockroach/pkg/sql.(*planNodeToRowSource).Start
  | 	github.com/cockroachdb/cockroach/pkg/sql/plan_node_to_row_source.go:163
  | github.com/cockroachdb/cockroach/pkg/sql/colexec.(*Columnarizer).Init
  | 	github.com/cockroachdb/cockroach/pkg/sql/colexec/columnarizer.go:187
  | github.com/cockroachdb/cockroach/pkg/sql/colexec.(*SerialUnorderedSynchronizer).Init
  | 	github.com/cockroachdb/cockroach/pkg/sql/colexec/serial_unordered_synchronizer.go:72
  | github.com/cockroachdb/cockroach/pkg/sql/colexecop.(*OneInputInitCloserHelper).Init
  | 	github.com/cockroachdb/cockroach/pkg/sql/colexecop/operator.go:375
  | github.com/cockroachdb/cockroach/pkg/sql/colexec.(*Materializer).Start.func1
  | 	github.com/cockroachdb/cockroach/pkg/sql/colexec/materializer.go:268
  | github.com/cockroachdb/cockroach/pkg/sql/colexecerror.CatchVectorizedRuntimeError
  | 	github.com/cockroachdb/cockroach/pkg/sql/colexecerror/error.go:92
  | github.com/cockroachdb/cockroach/pkg/sql/colexec.(*Materializer).Start
  | 	github.com/cockroachdb/cockroach/pkg/sql/colexec/materializer.go:267
  | github.com/cockroachdb/cockroach/pkg/sql.(*rowSourceToPlanNode).startExec
  | 	github.com/cockroachdb/cockroach/pkg/sql/row_source_to_plan_node.go:72
  | github.com/cockroachdb/cockroach/pkg/sql.startExec.func2
  | 	github.com/cockroachdb/cockroach/pkg/sql/plan.go:518
  | github.com/cockroachdb/cockroach/pkg/sql.(*planVisitor).visitInternal.func1
  | 	github.com/cockroachdb/cockroach/pkg/sql/walk.go:112
  | github.com/cockroachdb/cockroach/pkg/sql.(*planVisitor).visitInternal
  | 	github.com/cockroachdb/cockroach/pkg/sql/walk.go:297
  | github.com/cockroachdb/cockroach/pkg/sql.(*planVisitor).visit
  | 	github.com/cockroachdb/cockroach/pkg/sql/walk.go:79
Wraps: (2) runtime error: invalid memory address or nil pointer dereference
Error types: (1) *withstack.withStack (2) runtime.errorString
-- report composition:
runtime.errorString
panic.go:884: *withstack.withStack (top exception)
Stacktrace (expand for inline code snippets):

}
v.visitInternal(plan, name)
return plan

cockroach/pkg/sql/walk.go

Lines 296 to 298 in d5a076f

}
}

cockroach/pkg/sql/walk.go

Lines 111 to 113 in d5a076f

}
v.err = v.observer.leaveNode(name, plan)
}()

cockroach/pkg/sql/plan.go

Lines 517 to 519 in d5a076f

}
return n.startExec(params)
},

func (r *rowSourceToPlanNode) startExec(params runParams) error {
r.source.Start(params.ctx)
return nil

// reached), so we need to wrap it with a catcher.
if err := colexecerror.CatchVectorizedRuntimeError(func() {
m.input.Init(ctx)

}()
operation()
return retErr

if err := colexecerror.CatchVectorizedRuntimeError(func() {
m.input.Init(ctx)
}); err != nil {

}
h.Input.Init(h.Ctx)
}

for _, input := range s.inputs {
input.Root.Init(s.Ctx)
}

ctx = c.StartInternal(ctx, "columnarizer" /* name */)
c.input.Start(ctx)
if execStatsHijacker, ok := c.input.(execinfra.ExecStatsForTraceHijacker); ok {

// This starts all of the nodes below this node.
if err := startExec(p.params, p.node); err != nil {
p.MoveToDraining(err)

cockroach/pkg/sql/plan.go

Lines 520 to 522 in d5a076f

}
return walkPlan(params.ctx, plan, o)
}

v := makePlanVisitor(ctx, observer)
v.visit(plan)
return v.err

}
v.visitInternal(plan, name)
return plan

cockroach/pkg/sql/walk.go

Lines 296 to 298 in d5a076f

}
}

cockroach/pkg/sql/walk.go

Lines 111 to 113 in d5a076f

}
v.err = v.observer.leaveNode(name, plan)
}()

cockroach/pkg/sql/plan.go

Lines 517 to 519 in d5a076f

}
return n.startExec(params)
},

plan, err := d.constructor(params.ctx, params.p)
if err != nil {

constructor: func(ctx context.Context, p *planner) (planNode, error) {
return constructor(ctx, p, tn.Catalog())
},

if def.generator != nil && !def.preferIndexOverGenerator(p, index, idxConstraint) {
next, cleanup, err := def.generator(ctx, p, dbDesc, stopper)
if err != nil {

s := p.extendedEvalCtx.statsProvider
curAggTs := s.ComputeAggregatedTs()
aggInterval := s.GetAggregationInterval()

https://github.com/cockroachdb/cockroach/blob/d5a076f2953c0712193b8cbe08bbb682563c5675/pkg/sql/sqlstats/persistedsqlstats/pkg/sql/sqlstats/persistedsqlstats/flush.go#L331-L333
GOROOT/src/runtime/signal_unix.go#L834-L836
GOROOT/src/runtime/panic.go#L259-L261
GOROOT/src/runtime/panic.go#L883-L885
if !shouldCatchPanic(panicEmittedFrom) {
panic(panicObj)
}

GOROOT/src/runtime/panic.go#L883-L885
if !shouldCatchPanic(panicEmittedFrom) {
panic(panicObj)
}

GOROOT/src/runtime/panic.go#L883-L885
if !shouldCatchPanic(panicEmittedFrom) {
panic(panicObj)
}

GOROOT/src/runtime/panic.go#L883-L885

pkg/sql/walk.go in pkg/sql.(*planVisitor).visit at line 79
pkg/sql/walk.go in pkg/sql.(*planVisitor).visitInternal at line 297
pkg/sql/walk.go in pkg/sql.(*planVisitor).visitInternal.func1 at line 112
pkg/sql/plan.go in pkg/sql.startExec.func2 at line 518
pkg/sql/row_source_to_plan_node.go in pkg/sql.(*rowSourceToPlanNode).startExec at line 72
pkg/sql/colexec/materializer.go in pkg/sql/colexec.(*Materializer).Start at line 267
pkg/sql/colexecerror/error.go in pkg/sql/colexecerror.CatchVectorizedRuntimeError at line 92
pkg/sql/colexec/materializer.go in pkg/sql/colexec.(*Materializer).Start.func1 at line 268
pkg/sql/colexecop/operator.go in pkg/sql/colexecop.(*OneInputInitCloserHelper).Init at line 375
pkg/sql/colexec/serial_unordered_synchronizer.go in pkg/sql/colexec.(*SerialUnorderedSynchronizer).Init at line 72
pkg/sql/colexec/columnarizer.go in pkg/sql/colexec.(*Columnarizer).Init at line 187
pkg/sql/plan_node_to_row_source.go in pkg/sql.(*planNodeToRowSource).Start at line 163
pkg/sql/plan.go in pkg/sql.startExec at line 521
pkg/sql/walk.go in pkg/sql.walkPlan at line 43
pkg/sql/walk.go in pkg/sql.(*planVisitor).visit at line 79
pkg/sql/walk.go in pkg/sql.(*planVisitor).visitInternal at line 297
pkg/sql/walk.go in pkg/sql.(*planVisitor).visitInternal.func1 at line 112
pkg/sql/plan.go in pkg/sql.startExec.func2 at line 518
pkg/sql/delayed.go in pkg/sql.(*delayedNode).startExec at line 50
pkg/sql/exec_factory_util.go in pkg/sql.constructVirtualScan.func1 at line 250
pkg/sql/virtual_schema.go in pkg/sql.(*virtualDefEntry).getPlanInfo.func1 at line 590
pkg/sql/crdb_internal.go in pkg/sql.glob..func85 at line 5644
pkg/sql/sqlstats/persistedsqlstats/pkg/sql/sqlstats/persistedsqlstats/flush.go in pkg/sql/sqlstats/persistedsqlstats.(*PersistedSQLStats).ComputeAggregatedTs at line 332
GOROOT/src/runtime/signal_unix.go in runtime.sigpanic at line 835
GOROOT/src/runtime/panic.go in runtime.panicmem at line 260
GOROOT/src/runtime/panic.go in runtime.gopanic at line 884
pkg/sql/colexecerror/error.go in pkg/sql/colexecerror.CatchVectorizedRuntimeError.func1 at line 58
GOROOT/src/runtime/panic.go in runtime.gopanic at line 884
pkg/sql/colexecerror/error.go in pkg/sql/colexecerror.CatchVectorizedRuntimeError.func1 at line 58
GOROOT/src/runtime/panic.go in runtime.gopanic at line 884
pkg/sql/colexecerror/error.go in pkg/sql/colexecerror.CatchVectorizedRuntimeError.func1 at line 58
GOROOT/src/runtime/panic.go in runtime.gopanic at line 884

Tags

Tag Value
Command demo
Environment v22.2.6
Go Version go1.19.4
Platform darwin amd64
Distribution CCL
Cockroach Release v22.2.6
Cockroach SHA d5a076f
# of CPUs 16
# of Goroutines 431

Jira issue: CRDB-28977

@yuzefovich
Copy link
Member

fixed by #105324

@exalate-issue-sync exalate-issue-sync bot changed the title Sentry: panic.go:884: runtime error: invalid memory address or nil pointer dereference (1) attached stack trace -- stack trace: | runtime.gopanic | GOROOT/src/runtime/panic.go:884 | github.co... Sentry: panic.go:884: runtime error: invalid memory address or nil pointer dereference (1) attached stack trace -- stack trace: | runtime.gopanic | GOROOT/src/runtime/panic.go:884 | github.co... Jun 22, 2023
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

No branches or pull requests

2 participants