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... #135302

Closed
cockroach-sentry opened this issue Nov 15, 2024 · 2 comments
Assignees
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/6067510721/?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/colflow.(*FlowCoordinator).Start.func1
  | 	pkg/sql/colflow/flow_coordinator.go:111
  | github.com/cockroachdb/cockroach/pkg/sql/colexecerror.CatchVectorizedRuntimeError
  | 	pkg/sql/colexecerror/error.go:147
  | github.com/cockroachdb/cockroach/pkg/sql/colflow.(*FlowCoordinator).Start
  | 	pkg/sql/colflow/flow_coordinator.go:110
  | github.com/cockroachdb/cockroach/pkg/sql/execinfra.(*ProcessorBaseNoHelper).Run
  | 	pkg/sql/execinfra/processorsbase.go:726
  | github.com/cockroachdb/cockroach/pkg/sql/flowinfra.(*FlowBase).Run
  | 	pkg/sql/flowinfra/flow.go:574
  | github.com/cockroachdb/cockroach/pkg/sql/colflow.(*vectorizedFlow).Run
  | 	pkg/sql/colflow/vectorized_flow.go:300
  | github.com/cockroachdb/cockroach/pkg/sql.(*DistSQLPlanner).Run
  | 	pkg/sql/distsql_running.go:923
  | github.com/cockroachdb/cockroach/pkg/sql.(*DistSQLPlanner).PlanAndRun
  | 	pkg/sql/distsql_running.go:1985
  | github.com/cockroachdb/cockroach/pkg/sql.(*DistSQLPlanner).PlanAndRunAll.func3
  | 	pkg/sql/distsql_running.go:1699
  | github.com/cockroachdb/cockroach/pkg/sql.(*DistSQLPlanner).PlanAndRunAll
  | 	pkg/sql/distsql_running.go:1702
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execWithDistSQLEngine
  | 	pkg/sql/conn_executor_exec.go:2433
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).dispatchToExecutionEngine
  | 	pkg/sql/conn_executor_exec.go:1980
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmtInOpenState
  | 	pkg/sql/conn_executor_exec.go:1187
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt.func1
  | 	pkg/sql/conn_executor_exec.go:141
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execWithProfiling
  | 	pkg/sql/conn_executor_exec.go:3449
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt
  | 	pkg/sql/conn_executor_exec.go:140
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd.func1
  | 	pkg/sql/conn_executor.go:2341
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd
  | 	pkg/sql/conn_executor.go:2346
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).run
  | 	pkg/sql/conn_executor.go:2263
  | github.com/cockroachdb/cockroach/pkg/sql.(*Server).ServeConn
  | 	pkg/sql/conn_executor.go:963
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_range":333,"distinct_range":333.26771485948984,"upper_bound":"_3b58e1ac8cd41f224...
Stacktrace (expand for inline code snippets):

pkg/sql/conn_executor.go#L962-L964
pkg/sql/conn_executor.go#L2262-L2264
pkg/sql/conn_executor.go#L2345-L2347
pkg/sql/conn_executor.go#L2340-L2342
pkg/sql/conn_executor_exec.go#L139-L141
pkg/sql/conn_executor_exec.go#L3448-L3450
pkg/sql/conn_executor_exec.go#L140-L142
pkg/sql/conn_executor_exec.go#L1186-L1188
pkg/sql/conn_executor_exec.go#L1979-L1981
pkg/sql/conn_executor_exec.go#L2432-L2434
pkg/sql/distsql_running.go#L1701-L1703
pkg/sql/distsql_running.go#L1698-L1700
pkg/sql/distsql_running.go#L1984-L1986
pkg/sql/distsql_running.go#L922-L924
pkg/sql/colflow/vectorized_flow.go#L299-L301
pkg/sql/flowinfra/flow.go#L573-L575
pkg/sql/execinfra/processorsbase.go#L725-L727
pkg/sql/colflow/flow_coordinator.go#L109-L111
pkg/sql/colexecerror/error.go#L146-L148
pkg/sql/colflow/flow_coordinator.go#L110-L112
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/conn_executor.go#L962-L964
pkg/sql/conn_executor.go#L2262-L2264
pkg/sql/conn_executor.go#L2345-L2347
pkg/sql/conn_executor.go#L2340-L2342
pkg/sql/conn_executor_exec.go#L139-L141
pkg/sql/conn_executor_exec.go#L3448-L3450
pkg/sql/conn_executor_exec.go#L140-L142
pkg/sql/conn_executor_exec.go#L1186-L1188
pkg/sql/conn_executor_exec.go#L1979-L1981
pkg/sql/conn_executor_exec.go#L2432-L2434
pkg/sql/distsql_running.go#L1701-L1703
pkg/sql/distsql_running.go#L1698-L1700
pkg/sql/distsql_running.go#L1984-L1986
pkg/sql/distsql_running.go#L922-L924
pkg/sql/colflow/vectorized_flow.go#L299-L301
pkg/sql/flowinfra/flow.go#L573-L575
pkg/sql/execinfra/processorsbase.go#L725-L727
pkg/sql/colflow/flow_coordinator.go#L109-L111
pkg/sql/colexecerror/error.go#L146-L148
pkg/sql/colflow/flow_coordinator.go#L110-L112
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/conn_executor.go in pkg/sql.(*Server).ServeConn at line 963
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).run at line 2263
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).execCmd at line 2346
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).execCmd.func1 at line 2341
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).execStmt at line 140
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).execWithProfiling at line 3449
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).execStmt.func1 at line 141
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).execStmtInOpenState at line 1187
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).dispatchToExecutionEngine at line 1980
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).execWithDistSQLEngine at line 2433
pkg/sql/distsql_running.go in pkg/sql.(*DistSQLPlanner).PlanAndRunAll at line 1702
pkg/sql/distsql_running.go in pkg/sql.(*DistSQLPlanner).PlanAndRunAll.func3 at line 1699
pkg/sql/distsql_running.go in pkg/sql.(*DistSQLPlanner).PlanAndRun at line 1985
pkg/sql/distsql_running.go in pkg/sql.(*DistSQLPlanner).Run at line 923
pkg/sql/colflow/vectorized_flow.go in pkg/sql/colflow.(*vectorizedFlow).Run at line 300
pkg/sql/flowinfra/flow.go in pkg/sql/flowinfra.(*FlowBase).Run at line 574
pkg/sql/execinfra/processorsbase.go in pkg/sql/execinfra.(*ProcessorBaseNoHelper).Run at line 726
pkg/sql/colflow/flow_coordinator.go in pkg/sql/colflow.(*FlowCoordinator).Start at line 110
pkg/sql/colexecerror/error.go in pkg/sql/colexecerror.CatchVectorizedRuntimeError at line 147
pkg/sql/colflow/flow_coordinator.go in pkg/sql/colflow.(*FlowCoordinator).Start.func1 at line 111
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/conn_executor.go in pkg/sql.(*Server).ServeConn at line 963
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).run at line 2263
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).execCmd at line 2346
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).execCmd.func1 at line 2341
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).execStmt at line 140
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).execWithProfiling at line 3449
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).execStmt.func1 at line 141
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).execStmtInOpenState at line 1187
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).dispatchToExecutionEngine at line 1980
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).execWithDistSQLEngine at line 2433
pkg/sql/distsql_running.go in pkg/sql.(*DistSQLPlanner).PlanAndRunAll at line 1702
pkg/sql/distsql_running.go in pkg/sql.(*DistSQLPlanner).PlanAndRunAll.func3 at line 1699
pkg/sql/distsql_running.go in pkg/sql.(*DistSQLPlanner).PlanAndRun at line 1985
pkg/sql/distsql_running.go in pkg/sql.(*DistSQLPlanner).Run at line 923
pkg/sql/colflow/vectorized_flow.go in pkg/sql/colflow.(*vectorizedFlow).Run at line 300
pkg/sql/flowinfra/flow.go in pkg/sql/flowinfra.(*FlowBase).Run at line 574
pkg/sql/execinfra/processorsbase.go in pkg/sql/execinfra.(*ProcessorBaseNoHelper).Run at line 726
pkg/sql/colflow/flow_coordinator.go in pkg/sql/colflow.(*FlowCoordinator).Start at line 110
pkg/sql/colexecerror/error.go in pkg/sql/colexecerror.CatchVectorizedRuntimeError at line 147
pkg/sql/colflow/flow_coordinator.go in pkg/sql/colflow.(*FlowCoordinator).Start.func1 at line 111
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-44445

@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 michae2 self-assigned this Nov 15, 2024
@michae2 michae2 moved this from Triage to Active 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 Active 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