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: error.go:20: unexpected error: forecasted histogram had first bucket with non-zero NumRange or DistinctRange: [{"name":"__forecast__","created_at":"2024-11-15 17:38:40.3898025 +0000 UTC","colu... #135301

Closed
cockroach-sentry opened this issue Nov 15, 2024 · 2 comments
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. O-sentry Originated from an in-the-wild panic report. T-sql-queries SQL Queries Team X-blathers-triaged blathers was able to find an owner X-duplicate Closed as a duplicate of another issue.

Comments

@cockroach-sentry
Copy link
Collaborator

cockroach-sentry commented Nov 15, 2024

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/6067510710/?referrer=webhooks_plugin

Panic Message:

error.go:20: unexpected error: forecasted histogram had first bucket with non-zero NumRange or DistinctRange: [{"name":"__forecast__","created_at":"2024-11-15 17:38:40.3898025 +0000 UTC","columns":["1"],"row_count":1005,"distinct_count":1005,"null_count":0,"avg_size":4,"histo_col_type":"INT8","histo_buckets":[{"num_eq":1,"num_range":0,"distinct_range":5.684341886080801e-14,"upper_bound":"_cfcd208495d565ef66e7dff9f98764da"},{"num_eq":1,"num_range":333,"distinct_range":332.86900848068194,"upper_bound":"_7ea11c516d627c63f5bd57a87f2e65ba"},{"num_eq":1,"num_range":333,"distinct_range":333.26771485948984,"upper_bound":"_3b58e1ac8cd41f2241a453b705ab7a2c"},{"num_eq":1,"num_range":333,"distinct_range":333.5298335120023,"upper_bound":"_1cdbda87a7c4c27e24f053ccc2c66043"},{"num_eq":1,"num_range":0,"distinct_range":0.3334431478257564,"upper_bound":"_badd77cfba9a22aa47016e95b701e940"}],"histo_version":3},{"name":"__merged__","created_at":"2024-11-15 17:38:39.337031 +0000 UTC","columns":["1"],"row_count":1004,"distinct_count":1004,"null_count":0,"avg_size":4,"histo_col_type":"INT8","histo_buckets":[{"num_eq":1,"num_range":0,"distinct_range":5.684341886080801e-14,"upper_bound":"_cfcd208495d565ef66e7dff9f98764da"},{"num_eq":1,"num_range":333,"distinct_range":332.79472424322665,"upper_bound":"_7ea11c516d627c63f5bd57a87f2e65ba"},{"num_eq":1,"num_range":333,"distinct_range":333.04463962621674,"upper_bound":"_3b58e1ac8cd41f2241a453b705ab7a2c"},{"num_eq":1,"num_range":333,"distinct_range":333.1606361305565,"upper_bound":"_1cdbda87a7c4c27e24f053ccc2c66043"},{"num_eq":1,"num_range":0,"distinct_range":0,"upper_bound":"_badd77cfba9a22aa47016e95b701e940"}],"histo_version":3},{"name":"__auto__","created_at":"2024-11-15 17:38:37.296779 +0000 UTC","columns":["1"],"row_count":1003,"distinct_count":1003,"null_count":0,"avg_size":4,"histo_col_type":"INT8","histo_buckets":[{"num_eq":0,"num_range":0,"distinct_range":0,"upper_bound":"_e12c22bb0312e7872c49884f8304d882"},{"num_eq":1,"num_range":0,"distinct_range":5.684341886080802e-14,"upper_bound":"_cfcd208495d565ef66e7dff9f98764da"},{"num_eq":1,"num_range":333,"distinct_range":332.7947242432267,"upper_bound":"_7ea11c516d627c63f5bd57a87f2e65ba"},{"num_eq":1,"num_range":333,"distinct_range":333.0446396262168,"upper_bound":"_3b58e1ac8cd41f2241a453b705ab7a2c"},{"num_eq":1,"num_range":333,"distinct_range":333.16063613055655,"upper_bound":"_1cdbda87a7c4c27e24f053ccc2c66043"}],"histo_version":3},{"name":"__auto__","created_at":"2024-11-15 17:38:36.240863 +0000 UTC","columns":["1"],"row_count":1002,"distinct_count":1002,"null_count":0,"avg_size":4,"histo_col_type":"INT8","histo_buckets":[{"num_eq":1,"num_range":0,"distinct_range":0,"upper_bound":"_cfcd208495d565ef66e7dff9f98764da"},{"num_eq":1,"num_range":332,"distinct_range":331.7944820909316,"upper_bound":"_d5c780464eb09a86a786cc68a54c2161"},{"num_eq":1,"num_range":333,"distinct_range":333.0442332658522,"upper_bound":"_4045d0746b9fe39ce39c2d4f36df4266"},{"num_eq":1,"num_range":333,"distinct_range":333.16128464321633,"upper_bound":"_c10c5925ef2c9d51be9ec7dbafcb1e2f"}],"histo_version":3},{"name":"__auto__","created_at":"2024-11-15 17:38:35.191236 +0000 UTC","columns":["1"],"row_count":1001,"distinct_count":1001,"null_count":0,"avg_size":4,"histo_col_type":"INT8","histo_buckets":[{"num_eq":1,"num_range":0,"distinct_range":0,"upper_bound":"_cfcd208495d565ef66e7dff9f98764da"},{"num_eq":1,"num_range":332,"distinct_range":331.79445036468786,"upper_bound":"_d5c780464eb09a86a786cc68a54c2161"},{"num_eq":1,"num_range":332,"distinct_range":332.043798577731,"upper_bound":"_9a795bc703614d867f4bc53b56d3878a"},{"num_eq":1,"num_range":333,"distinct_range":333.16175105758106,"upper_bound":"_805f743866591cb5654b0462e0f5f304"}],"histo_version":3}]
(1) ×
Wraps: (2) issue #93892
Wraps: (3) attached stack trace
  -- stack trace:
  | github.com/cockroachdb/cockroach/pkg/util/errorutil.UnexpectedWithIssueErrorf
  | 	pkg/util/errorutil/error.go:21
  | [...repeated from below...]
Wraps: (4) unexpected error
Wraps: (5) attached stack trace
  -- stack trace:
  | github.com/cockroachdb/cockroach/pkg/util/errorutil.UnexpectedWithIssueErrorf
  | 	pkg/util/errorutil/error.go:20
  | github.com/cockroachdb/cockroach/pkg/sql/stats.forecastColumnStatistics
  | 	pkg/sql/stats/forecast.go:381
  | github.com/cockroachdb/cockroach/pkg/sql/stats.ForecastTableStatistics
  | 	pkg/sql/stats/forecast.go:148
  | github.com/cockroachdb/cockroach/pkg/sql.(*planner).ShowTableStats.func1
  | 	pkg/sql/show_stats.go:212
  | github.com/cockroachdb/cockroach/pkg/sql.(*delayedNode).startExec
  | 	pkg/sql/delayed.go:45
  | github.com/cockroachdb/cockroach/pkg/sql.startExec.func2
  | 	pkg/sql/plan.go:519
  | github.com/cockroachdb/cockroach/pkg/sql.(*planVisitor).visitInternal.func1
  | 	pkg/sql/walk.go:107
  | github.com/cockroachdb/cockroach/pkg/sql.(*planVisitor).visitInternal
  | 	pkg/sql/walk.go:294
  | github.com/cockroachdb/cockroach/pkg/sql.(*planVisitor).visit
  | 	pkg/sql/walk.go:74
  | github.com/cockroachdb/cockroach/pkg/sql.walkPlan
  | 	pkg/sql/walk.go:38
  | github.com/cockroachdb/cockroach/pkg/sql.startExec
  | 	pkg/sql/plan.go:522
  | github.com/cockroachdb/cockroach/pkg/sql.(*planNodeToRowSource).Start
  | 	pkg/sql/plan_node_to_row_source.go:166
  | github.com/cockroachdb/cockroach/pkg/sql/colexec.(*Columnarizer).Init
  | 	pkg/sql/colexec/columnarizer.go:178
  | github.com/cockroachdb/cockroach/pkg/sql/colflow.(*batchInfoCollector).init
  | 	pkg/sql/colflow/stats.go:89
  | github.com/cockroachdb/cockroach/pkg/sql/colexecerror.CatchVectorizedRuntimeError
  | 	pkg/sql/colexecerror/error.go:147
  | github.com/cockroachdb/cockroach/pkg/sql/colflow.(*batchInfoCollector).Init
  | 	pkg/sql/colflow/stats.go:98
  | github.com/cockroachdb/cockroach/pkg/sql/colexec.(*Materializer).Start.func1
  | 	pkg/sql/colexec/materializer.go:228
  | github.com/cockroachdb/cockroach/pkg/sql/colexecerror.CatchVectorizedRuntimeError
  | 	pkg/sql/colexecerror/error.go:147
  | github.com/cockroachdb/cockroach/pkg/sql/colexec.(*Materializer).Start
  | 	pkg/sql/colexec/materializer.go:227
  | github.com/cockroachdb/cockroach/pkg/sql/rowexec.(*projectSetProcessor).Start
  | 	pkg/sql/rowexec/project_set.go:143
  | github.com/cockroachdb/cockroach/pkg/sql/colexec.(*Columnarizer).Init
  | 	pkg/sql/colexec/columnarizer.go:178
  | github.com/cockroachdb/cockroach/pkg/sql/colflow.(*batchInfoCollector).init
  | 	pkg/sql/colflow/stats.go:89
  | github.com/cockroachdb/cockroach/pkg/sql/colexecerror.CatchVectorizedRuntimeError
  | 	pkg/sql/colexecerror/error.go:147
  | github.com/cockroachdb/cockroach/pkg/sql/colflow.(*batchInfoCollector).Init
  | 	pkg/sql/colflow/stats.go:98
  | github.com/cockroachdb/cockroach/pkg/sql/colexecop.(*OneInputInitCloserHelper).Init
  | 	pkg/sql/colexecop/operator.go:392
  | github.com/cockroachdb/cockroach/pkg/sql/colexecop.(*OneInputHelper).Init
  | 	pkg/sql/colexecop/operator.go:313
  | github.com/cockroachdb/cockroach/pkg/sql/colexecop.(*OneInputHelper).Init
  | 	pkg/sql/colexecop/operator.go:313
  | github.com/cockroachdb/cockroach/pkg/sql/colexecop.(*OneInputInitCloserHelper).Init
  | 	pkg/sql/colexecop/operator.go:392
  | github.com/cockroachdb/cockroach/pkg/sql/colexecop.(*OneInputInitCloserHelper).Init
  | 	pkg/sql/colexecop/operator.go:392
  | github.com/cockroachdb/cockroach/pkg/sql/colflow.(*batchInfoCollector).init
  | 	pkg/sql/colflow/stats.go:89
  | github.com/cockroachdb/cockroach/pkg/sql/colexecerror.CatchVectorizedRuntimeError
  | 	pkg/sql/colexecerror/error.go:147
  | github.com/cockroachdb/cockroach/pkg/sql/colflow.(*batchInfoCollector).Init
  | 	pkg/sql/colflow/stats.go:98
Wraps: (6) forecasted histogram had first bucket with non-zero NumRange or DistinctRange: [{"name":"__forecast__","created_at":"2024-11-15 17:38:40.3898025 +0000 UTC","columns":["1"],"row_count":1005,"distinct_count":1005,"null_count":0,"avg_size":4,"histo_col_type":"INT8","histo_buckets":[{"num_eq":1,"num_range":0,"distinct_range":5.684341886080801e-14,"upper_bound":"_cfcd208495d565ef66e7dff9f98764da"},{"num_eq":1,"num_range":333,"distinct_range":332.86900848068194,"upper_bound":"_7ea11c516d627c63f5bd57a87f2e65ba"},{"num_eq":1,"num_ran...
Stacktrace (expand for inline code snippets):

pkg/sql/colflow/stats.go#L97-L99
pkg/sql/colexecerror/error.go#L146-L148
pkg/sql/colflow/stats.go#L88-L90
pkg/sql/colexecop/operator.go#L391-L393
pkg/sql/colexecop/operator.go#L391-L393
pkg/sql/colexecop/operator.go#L312-L314
pkg/sql/colexecop/operator.go#L312-L314
pkg/sql/colexecop/operator.go#L391-L393
pkg/sql/colflow/stats.go#L97-L99
pkg/sql/colexecerror/error.go#L146-L148
pkg/sql/colflow/stats.go#L88-L90
pkg/sql/colexec/columnarizer.go#L177-L179
pkg/sql/rowexec/project_set.go#L142-L144
pkg/sql/colexec/materializer.go#L226-L228
pkg/sql/colexecerror/error.go#L146-L148
pkg/sql/colexec/materializer.go#L227-L229
pkg/sql/colflow/stats.go#L97-L99
pkg/sql/colexecerror/error.go#L146-L148
pkg/sql/colflow/stats.go#L88-L90
pkg/sql/colexec/columnarizer.go#L177-L179
pkg/sql/plan_node_to_row_source.go#L165-L167
pkg/sql/plan.go#L521-L523
pkg/sql/walk.go#L37-L39
pkg/sql/walk.go#L73-L75
pkg/sql/walk.go#L293-L295
pkg/sql/walk.go#L106-L108
pkg/sql/plan.go#L518-L520
pkg/sql/delayed.go#L44-L46
pkg/sql/show_stats.go#L211-L213
pkg/sql/stats/forecast.go#L147-L149
pkg/sql/stats/forecast.go#L380-L382
pkg/util/errorutil/error.go#L20-L22
pkg/sql/colflow/stats.go#L97-L99
pkg/sql/colexecerror/error.go#L146-L148
pkg/sql/colflow/stats.go#L88-L90
pkg/sql/colexecop/operator.go#L391-L393
pkg/sql/colexecop/operator.go#L391-L393
pkg/sql/colexecop/operator.go#L312-L314
pkg/sql/colexecop/operator.go#L312-L314
pkg/sql/colexecop/operator.go#L391-L393
pkg/sql/colflow/stats.go#L97-L99
pkg/sql/colexecerror/error.go#L146-L148
pkg/sql/colflow/stats.go#L88-L90
pkg/sql/colexec/columnarizer.go#L177-L179
pkg/sql/rowexec/project_set.go#L142-L144
pkg/sql/colexec/materializer.go#L226-L228
pkg/sql/colexecerror/error.go#L146-L148
pkg/sql/colexec/materializer.go#L227-L229
pkg/sql/colflow/stats.go#L97-L99
pkg/sql/colexecerror/error.go#L146-L148
pkg/sql/colflow/stats.go#L88-L90
pkg/sql/colexec/columnarizer.go#L177-L179
pkg/sql/plan_node_to_row_source.go#L165-L167
pkg/sql/plan.go#L521-L523
pkg/sql/walk.go#L37-L39
pkg/sql/walk.go#L73-L75
pkg/sql/walk.go#L293-L295
pkg/sql/walk.go#L106-L108
pkg/sql/plan.go#L518-L520
pkg/sql/delayed.go#L44-L46
pkg/sql/show_stats.go#L211-L213
pkg/sql/stats/forecast.go#L147-L149
pkg/sql/stats/forecast.go#L380-L382
pkg/util/errorutil/error.go#L19-L21

pkg/sql/colflow/stats.go in pkg/sql/colflow.(*batchInfoCollector).Init at line 98
pkg/sql/colexecerror/error.go in pkg/sql/colexecerror.CatchVectorizedRuntimeError at line 147
pkg/sql/colflow/stats.go in pkg/sql/colflow.(*batchInfoCollector).init at line 89
pkg/sql/colexecop/operator.go in pkg/sql/colexecop.(*OneInputInitCloserHelper).Init at line 392
pkg/sql/colexecop/operator.go in pkg/sql/colexecop.(*OneInputInitCloserHelper).Init at line 392
pkg/sql/colexecop/operator.go in pkg/sql/colexecop.(*OneInputHelper).Init at line 313
pkg/sql/colexecop/operator.go in pkg/sql/colexecop.(*OneInputHelper).Init at line 313
pkg/sql/colexecop/operator.go in pkg/sql/colexecop.(*OneInputInitCloserHelper).Init at line 392
pkg/sql/colflow/stats.go in pkg/sql/colflow.(*batchInfoCollector).Init at line 98
pkg/sql/colexecerror/error.go in pkg/sql/colexecerror.CatchVectorizedRuntimeError at line 147
pkg/sql/colflow/stats.go in pkg/sql/colflow.(*batchInfoCollector).init at line 89
pkg/sql/colexec/columnarizer.go in pkg/sql/colexec.(*Columnarizer).Init at line 178
pkg/sql/rowexec/project_set.go in pkg/sql/rowexec.(*projectSetProcessor).Start at line 143
pkg/sql/colexec/materializer.go in pkg/sql/colexec.(*Materializer).Start at line 227
pkg/sql/colexecerror/error.go in pkg/sql/colexecerror.CatchVectorizedRuntimeError at line 147
pkg/sql/colexec/materializer.go in pkg/sql/colexec.(*Materializer).Start.func1 at line 228
pkg/sql/colflow/stats.go in pkg/sql/colflow.(*batchInfoCollector).Init at line 98
pkg/sql/colexecerror/error.go in pkg/sql/colexecerror.CatchVectorizedRuntimeError at line 147
pkg/sql/colflow/stats.go in pkg/sql/colflow.(*batchInfoCollector).init at line 89
pkg/sql/colexec/columnarizer.go in pkg/sql/colexec.(*Columnarizer).Init at line 178
pkg/sql/plan_node_to_row_source.go in pkg/sql.(*planNodeToRowSource).Start at line 166
pkg/sql/plan.go in pkg/sql.startExec at line 522
pkg/sql/walk.go in pkg/sql.walkPlan at line 38
pkg/sql/walk.go in pkg/sql.(*planVisitor).visit at line 74
pkg/sql/walk.go in pkg/sql.(*planVisitor).visitInternal at line 294
pkg/sql/walk.go in pkg/sql.(*planVisitor).visitInternal.func1 at line 107
pkg/sql/plan.go in pkg/sql.startExec.func2 at line 519
pkg/sql/delayed.go in pkg/sql.(*delayedNode).startExec at line 45
pkg/sql/show_stats.go in pkg/sql.(*planner).ShowTableStats.func1 at line 212
pkg/sql/stats/forecast.go in pkg/sql/stats.ForecastTableStatistics at line 148
pkg/sql/stats/forecast.go in pkg/sql/stats.forecastColumnStatistics at line 381
pkg/util/errorutil/error.go in pkg/util/errorutil.UnexpectedWithIssueErrorf at line 21
pkg/sql/colflow/stats.go in pkg/sql/colflow.(*batchInfoCollector).Init at line 98
pkg/sql/colexecerror/error.go in pkg/sql/colexecerror.CatchVectorizedRuntimeError at line 147
pkg/sql/colflow/stats.go in pkg/sql/colflow.(*batchInfoCollector).init at line 89
pkg/sql/colexecop/operator.go in pkg/sql/colexecop.(*OneInputInitCloserHelper).Init at line 392
pkg/sql/colexecop/operator.go in pkg/sql/colexecop.(*OneInputInitCloserHelper).Init at line 392
pkg/sql/colexecop/operator.go in pkg/sql/colexecop.(*OneInputHelper).Init at line 313
pkg/sql/colexecop/operator.go in pkg/sql/colexecop.(*OneInputHelper).Init at line 313
pkg/sql/colexecop/operator.go in pkg/sql/colexecop.(*OneInputInitCloserHelper).Init at line 392
pkg/sql/colflow/stats.go in pkg/sql/colflow.(*batchInfoCollector).Init at line 98
pkg/sql/colexecerror/error.go in pkg/sql/colexecerror.CatchVectorizedRuntimeError at line 147
pkg/sql/colflow/stats.go in pkg/sql/colflow.(*batchInfoCollector).init at line 89
pkg/sql/colexec/columnarizer.go in pkg/sql/colexec.(*Columnarizer).Init at line 178
pkg/sql/rowexec/project_set.go in pkg/sql/rowexec.(*projectSetProcessor).Start at line 143
pkg/sql/colexec/materializer.go in pkg/sql/colexec.(*Materializer).Start at line 227
pkg/sql/colexecerror/error.go in pkg/sql/colexecerror.CatchVectorizedRuntimeError at line 147
pkg/sql/colexec/materializer.go in pkg/sql/colexec.(*Materializer).Start.func1 at line 228
pkg/sql/colflow/stats.go in pkg/sql/colflow.(*batchInfoCollector).Init at line 98
pkg/sql/colexecerror/error.go in pkg/sql/colexecerror.CatchVectorizedRuntimeError at line 147
pkg/sql/colflow/stats.go in pkg/sql/colflow.(*batchInfoCollector).init at line 89
pkg/sql/colexec/columnarizer.go in pkg/sql/colexec.(*Columnarizer).Init at line 178
pkg/sql/plan_node_to_row_source.go in pkg/sql.(*planNodeToRowSource).Start at line 166
pkg/sql/plan.go in pkg/sql.startExec at line 522
pkg/sql/walk.go in pkg/sql.walkPlan at line 38
pkg/sql/walk.go in pkg/sql.(*planVisitor).visit at line 74
pkg/sql/walk.go in pkg/sql.(*planVisitor).visitInternal at line 294
pkg/sql/walk.go in pkg/sql.(*planVisitor).visitInternal.func1 at line 107
pkg/sql/plan.go in pkg/sql.startExec.func2 at line 519
pkg/sql/delayed.go in pkg/sql.(*delayedNode).startExec at line 45
pkg/sql/show_stats.go in pkg/sql.(*planner).ShowTableStats.func1 at line 212
pkg/sql/stats/forecast.go in pkg/sql/stats.ForecastTableStatistics at line 148
pkg/sql/stats/forecast.go in pkg/sql/stats.forecastColumnStatistics at line 381
pkg/util/errorutil/error.go in pkg/util/errorutil.UnexpectedWithIssueErrorf at line 20

Tags

Tag Value
Command demo
Environment v24.3.0-beta.3
Go Version go1.22.5 X:nocoverageredesign
Platform darwin arm64
Distribution CCL
Cockroach Release v24.3.0-beta.3
Cockroach SHA c077ebf
# of CPUs 12
# of Goroutines 506

Jira issue: CRDB-44444

@cockroach-sentry cockroach-sentry added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. O-sentry Originated from an in-the-wild panic report. labels Nov 15, 2024
Copy link

blathers-crl bot commented Nov 15, 2024

CC'ing via the CODEOWNERS-based sentry heuristic:

  • @cockroachdb/sql-queries

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@blathers-crl blathers-crl bot added T-sql-queries SQL Queries Team X-blathers-triaged blathers was able to find an owner labels Nov 15, 2024
@github-project-automation github-project-automation bot moved this to Triage in SQL Queries Nov 15, 2024
@michae2
Copy link
Collaborator

michae2 commented Nov 15, 2024

Same cause as #134031

@michae2 michae2 closed this as completed Nov 15, 2024
@github-project-automation github-project-automation bot moved this from Triage to Done in SQL Queries Nov 15, 2024
@michae2 michae2 added the X-duplicate Closed as a duplicate of another issue. label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. O-sentry Originated from an in-the-wild panic report. T-sql-queries SQL Queries Team X-blathers-triaged blathers was able to find an owner X-duplicate Closed as a duplicate of another issue.
Projects
Archived in project
Development

No branches or pull requests

2 participants