cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
30.11k stars 3.81k forks source link

pkg/sql/logictest/tests/local-vec-off/local-vec-off_test: TestLogic_builtin_function failed #118894

Closed cockroach-teamcity closed 9 months ago

cockroach-teamcity commented 9 months ago

pkg/sql/logictest/tests/local-vec-off/local-vec-off_test.TestLogic_builtin_function failed with artifacts on master @ 6ba0e6c6018138300647f9394d539e4272a399de:

      github.com/cockroachdb/cockroach/pkg/spanconfig/spanconfigsqlwatcher/sqlwatcher.go:91 +0x5c
  github.com/cockroachdb/cockroach/pkg/spanconfig/spanconfigreconciler.(*incrementalReconciler).reconcile()
      github.com/cockroachdb/cockroach/pkg/spanconfig/spanconfigreconciler/reconciler.go:497 +0x73b
  github.com/cockroachdb/cockroach/pkg/spanconfig/spanconfigreconciler.(*Reconciler).Reconcile()
      github.com/cockroachdb/cockroach/pkg/spanconfig/spanconfigreconciler/reconciler.go:188 +0x57e
  github.com/cockroachdb/cockroach/pkg/spanconfig/spanconfigjob.(*resumer).Resume()
      github.com/cockroachdb/cockroach/pkg/spanconfig/spanconfigjob/job.go:162 +0x1216
  github.com/cockroachdb/cockroach/pkg/jobs.(*Registry).stepThroughStateMachine.func2()
      github.com/cockroachdb/cockroach/pkg/jobs/registry.go:1621 +0x1bd
  github.com/cockroachdb/cockroach/pkg/jobs.(*Registry).stepThroughStateMachine()
      github.com/cockroachdb/cockroach/pkg/jobs/registry.go:1622 +0xe91
  github.com/cockroachdb/cockroach/pkg/jobs.(*Registry).runJob()
      github.com/cockroachdb/cockroach/pkg/jobs/adopt.go:456 +0x693
  github.com/cockroachdb/cockroach/pkg/jobs.(*Registry).resumeJob.func1()
      github.com/cockroachdb/cockroach/pkg/jobs/adopt.go:290 +0x1ae
  github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunAsyncTaskEx.func2()
      github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:484 +0x278

Goroutine 3287701 (running) created at:
  github.com/cockroachdb/cockroach/pkg/sql/pgwire.(*Server).serveImpl()
      github.com/cockroachdb/cockroach/pkg/sql/pgwire/server.go:996 +0xa4f
  github.com/cockroachdb/cockroach/pkg/sql/pgwire.(*Server).ServeConn()
      github.com/cockroachdb/cockroach/pkg/sql/pgwire/server.go:812 +0xe24
  github.com/cockroachdb/cockroach/pkg/server.(*systemServerWrapper).serveConn()
      github.com/cockroachdb/cockroach/pkg/server/server_controller_sql.go:164 +0x1d7
  github.com/cockroachdb/cockroach/pkg/server.(*serverController).sqlMux()
      github.com/cockroachdb/cockroach/pkg/server/server_controller_sql.go:84 +0x5c9
  github.com/cockroachdb/cockroach/pkg/server.(*serverController).sqlMux-fm()
      <autogenerated>:1 +0xc4
  github.com/cockroachdb/cockroach/pkg/server.startServeSQL.func1.1()
      github.com/cockroachdb/cockroach/pkg/server/server_sql.go:1925 +0x26b
  github.com/cockroachdb/cockroach/pkg/util/netutil.(*TCPServer).ServeWith.func1()
      github.com/cockroachdb/cockroach/pkg/util/netutil/net.go:191 +0x1c6
  github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunAsyncTaskEx.func2()
      github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:484 +0x278

Goroutine 3285050 (running) created at:
  github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunAsyncTaskEx()
      github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:475 +0x638
  github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunAsyncTask()
      github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:346 +0x605
  github.com/cockroachdb/cockroach/pkg/jobs.(*Registry).resumeJob()
      github.com/cockroachdb/cockroach/pkg/jobs/adopt.go:284 +0x1cd
  github.com/cockroachdb/cockroach/pkg/jobs.(*Registry).resumeClaimedJobs.func3()
      github.com/cockroachdb/cockroach/pkg/jobs/adopt.go:215 +0xbe
  github.com/cockroachdb/cockroach/pkg/jobs.(*Registry).resumeClaimedJobs.func4()
      github.com/cockroachdb/cockroach/pkg/jobs/adopt.go:218 +0x41
==================
=== RUN   TestLogic_builtin_function/other_tests
=== RUN   TestLogic_builtin_function/round_low_prec

Parameters:

See also: How To Investigate a Go Test Failure (internal)

/cc @cockroachdb/sql-queries

This test on roachdash | Improve this report!

Jira issue: CRDB-35950

rafiss commented 9 months ago

There's a data race. But the even weirder part is that there seems to be some odd behavior where the makeOptimizerPlan/execStmt code path is called recursively 18 times.

WARNING: DATA RACE
Write at 0x00c003542b20 by goroutine 3287701:
  github.com/cockroachdb/cockroach/pkg/sql/catalog/typedesc.ensureTypeMetadataIsHydrated()
      github.com/cockroachdb/cockroach/pkg/sql/catalog/typedesc/hydrate.go:125 +0x325
  github.com/cockroachdb/cockroach/pkg/sql/catalog/typedesc.ensureTypeIsHydratedRecursive()
      github.com/cockroachdb/cockroach/pkg/sql/catalog/typedesc/hydrate.go:106 +0x3cd
  github.com/cockroachdb/cockroach/pkg/sql/catalog/typedesc.ensureTypeIsHydratedRecursive()
      github.com/cockroachdb/cockroach/pkg/sql/catalog/typedesc/hydrate.go:83 +0x464
  github.com/cockroachdb/cockroach/pkg/sql/catalog/typedesc.HydratedTFromDesc()
      github.com/cockroachdb/cockroach/pkg/sql/catalog/typedesc/hydrate.go:55 +0xa6
  github.com/cockroachdb/cockroach/pkg/sql/catalog/typedesc.ResolveHydratedTByOID()
      github.com/cockroachdb/cockroach/pkg/sql/catalog/typedesc/hydrate.go:43 +0x184
  github.com/cockroachdb/cockroach/pkg/sql.(*schemaResolver).ResolveTypeByOID()
      github.com/cockroachdb/cockroach/pkg/sql/schema_resolver.go:361 +0x58
  github.com/cockroachdb/cockroach/pkg/sql.(*planner).ResolveTypeByOID()
      <autogenerated>:1 +0x1b
  github.com/cockroachdb/cockroach/pkg/sql/sem/builtins.glob..func757()
      github.com/cockroachdb/cockroach/pkg/sql/sem/builtins/pg_builtins.go:1043 +0x1e1
  github.com/cockroachdb/cockroach/pkg/sql/sem/eval.(*evaluator).EvalFuncExpr()
      github.com/cockroachdb/cockroach/pkg/sql/sem/eval/expr.go:483 +0x287
  github.com/cockroachdb/cockroach/pkg/sql/sem/tree.(*FuncExpr).Eval()
      github.com/cockroachdb/cockroach/bazel-out/k8-fastbuild/bin/pkg/sql/sem/tree/eval_expr_generated.go:281 +0x59
  github.com/cockroachdb/cockroach/pkg/sql/sem/eval.Expr()
      github.com/cockroachdb/cockroach/pkg/sql/sem/eval/expr.go:26 +0x2e1
  github.com/cockroachdb/cockroach/pkg/sql/execinfrapb.(*exprHelper).eval()
      github.com/cockroachdb/cockroach/pkg/sql/execinfrapb/pkg/sql/execinfrapb/expr.go:353 +0x2a4
  github.com/cockroachdb/cockroach/pkg/sql/execinfrapb.(*MultiExprHelper).EvalExpr()
      github.com/cockroachdb/cockroach/pkg/sql/execinfrapb/pkg/sql/execinfrapb/expr.go:243 +0x3d6
  github.com/cockroachdb/cockroach/pkg/sql/execinfra.(*ProcOutputHelper).ProcessRow()
      github.com/cockroachdb/cockroach/pkg/sql/execinfra/processorsbase.go:281 +0x343
  github.com/cockroachdb/cockroach/pkg/sql/execinfra.(*ProcessorBase).ProcessRowHelper()
      github.com/cockroachdb/cockroach/pkg/sql/execinfra/processorsbase.go:701 +0x9e
  github.com/cockroachdb/cockroach/pkg/sql/rowexec.(*noopProcessor).Next()
      github.com/cockroachdb/cockroach/pkg/sql/rowexec/noop.go:101 +0x8c
  github.com/cockroachdb/cockroach/pkg/sql/execinfra.Run()
      github.com/cockroachdb/cockroach/pkg/sql/execinfra/base.go:198 +0x54
  github.com/cockroachdb/cockroach/pkg/sql/execinfra.(*ProcessorBaseNoHelper).Run()
      github.com/cockroachdb/cockroach/pkg/sql/execinfra/processorsbase.go:723 +0xcc
  github.com/cockroachdb/cockroach/pkg/sql/rowexec.(*noopProcessor).Run()
      <autogenerated>:1 +0x5d
  github.com/cockroachdb/cockroach/pkg/sql/flowinfra.(*FlowBase).Run()
      github.com/cockroachdb/cockroach/pkg/sql/flowinfra/flow.go:579 +0x77c
  github.com/cockroachdb/cockroach/pkg/sql/rowflow.(*rowBasedFlow).Run()
      <autogenerated>:1 +0x64
  github.com/cockroachdb/cockroach/pkg/sql.(*DistSQLPlanner).Run()
      github.com/cockroachdb/cockroach/pkg/sql/distsql_running.go:909 +0x16d5
  github.com/cockroachdb/cockroach/pkg/sql.(*DistSQLPlanner).PlanAndRun()
      github.com/cockroachdb/cockroach/pkg/sql/distsql_running.go:1970 +0x328
  github.com/cockroachdb/cockroach/pkg/sql.(*DistSQLPlanner).PlanAndRunAll.func3()
      github.com/cockroachdb/cockroach/pkg/sql/distsql_running.go:1685 +0x1b0
  github.com/cockroachdb/cockroach/pkg/sql.(*DistSQLPlanner).PlanAndRunAll()
      github.com/cockroachdb/cockroach/pkg/sql/distsql_running.go:1688 +0x373
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execWithDistSQLEngine()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:2420 +0xa70
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).dispatchToExecutionEngine()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1949 +0x2315
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmtInOpenState()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1125 +0x7be7
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt.func1()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:146 +0x184
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execWithProfiling()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:3427 +0x579
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:145 +0x75d
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd.func1()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2236 +0x7e4
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2241 +0x22f2
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).run()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2158 +0x3d5
  github.com/cockroachdb/cockroach/pkg/sql.(*optPlanningCtx).buildExecMemo()
      github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:593 +0xba5
  github.com/cockroachdb/cockroach/pkg/sql.(*planner).makeOptimizerPlan()
      github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:250 +0x204
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).makeExecPlan()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:2295 +0x125
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).dispatchToExecutionEngine()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1762 +0xcb2
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmtInOpenState()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1125 +0x7be7
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt.func1()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:146 +0x184
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execWithProfiling()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:3427 +0x579
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:145 +0x75d
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd.func1()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2236 +0x7e4
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2241 +0x22f2
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).run()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2158 +0x3d5
  github.com/cockroachdb/cockroach/pkg/sql.(*optPlanningCtx).buildExecMemo()
      github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:593 +0xba5
  github.com/cockroachdb/cockroach/pkg/sql.(*planner).makeOptimizerPlan()
      github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:250 +0x204
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).makeExecPlan()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:2295 +0x125
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).dispatchToExecutionEngine()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1762 +0xcb2
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmtInOpenState()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1125 +0x7be7
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt.func1()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:146 +0x184
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execWithProfiling()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:3427 +0x579
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:145 +0x75d
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd.func1()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2236 +0x7e4
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2241 +0x22f2
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).run()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2158 +0x3d5
  github.com/cockroachdb/cockroach/pkg/sql.(*optPlanningCtx).buildExecMemo()
      github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:593 +0xba5
  github.com/cockroachdb/cockroach/pkg/sql.(*planner).makeOptimizerPlan()
      github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:250 +0x204
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).makeExecPlan()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:2295 +0x125
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).dispatchToExecutionEngine()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1762 +0xcb2
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmtInOpenState()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1125 +0x7be7
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt.func1()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:146 +0x184
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execWithProfiling()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:3427 +0x579
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:145 +0x75d
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd.func1()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2236 +0x7e4
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2241 +0x22f2
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).run()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2158 +0x3d5
  github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).processWiths()
      github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/with.go:116 +0xc4
  github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildSelect()
      github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/select.go:1112 +0x626
  github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildStmt()
      github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/builder.go:346 +0x476
  github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildStmtAtRootWithScope()
      github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/builder.go:290 +0x2fa
  github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildStmtAtRoot()
      github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/builder.go:271 +0x1ea
  github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).Build()
      github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/builder.go:250 +0x66e
  github.com/cockroachdb/cockroach/pkg/sql.(*optPlanningCtx).buildExecMemo()
      github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:593 +0xba5
  github.com/cockroachdb/cockroach/pkg/sql.(*planner).makeOptimizerPlan()
      github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:250 +0x204
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).makeExecPlan()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:2295 +0x125
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).dispatchToExecutionEngine()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1762 +0xcb2
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmtInOpenState()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1125 +0x7be7
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt.func1()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:146 +0x184
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execWithProfiling()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:3427 +0x579
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:145 +0x75d
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd.func1()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2236 +0x7e4
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2241 +0x22f2
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).run()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2158 +0x3d5
  github.com/cockroachdb/cockroach/pkg/sql.(*optPlanningCtx).buildExecMemo()
      github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:593 +0xba5
  github.com/cockroachdb/cockroach/pkg/sql.(*planner).makeOptimizerPlan()
      github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:250 +0x204
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).makeExecPlan()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:2295 +0x125
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).dispatchToExecutionEngine()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1762 +0xcb2
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmtInOpenState()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1125 +0x7be7
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt.func1()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:146 +0x184
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execWithProfiling()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:3427 +0x579
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:145 +0x75d
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd.func1()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2236 +0x7e4
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2241 +0x22f2
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).run()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2158 +0x3d5
  github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildSelect.func1()
      github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/select.go:1113 +0x1e4
  github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).processWiths()
      github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/with.go:116 +0xc4
  github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildSelect()
      github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/select.go:1112 +0x626
  github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildStmt()
      github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/builder.go:346 +0x476
  github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildStmtAtRootWithScope()
      github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/builder.go:290 +0x2fa
  github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildStmtAtRoot()
      github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/builder.go:271 +0x1ea
  github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).Build()
      github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/builder.go:250 +0x66e
  github.com/cockroachdb/cockroach/pkg/sql.(*optPlanningCtx).buildExecMemo()
      github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:593 +0xba5
  github.com/cockroachdb/cockroach/pkg/sql.(*planner).makeOptimizerPlan()
      github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:250 +0x204
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).makeExecPlan()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:2295 +0x125
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).dispatchToExecutionEngine()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1762 +0xcb2
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmtInOpenState()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1125 +0x7be7
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt.func1()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:146 +0x184
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execWithProfiling()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:3427 +0x579
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:145 +0x75d
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd.func1()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2236 +0x7e4
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2241 +0x22f2
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).run()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2158 +0x3d5
  github.com/cockroachdb/cockroach/pkg/sql.(*optPlanningCtx).buildExecMemo()
      github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:593 +0xba5
  github.com/cockroachdb/cockroach/pkg/sql.(*planner).makeOptimizerPlan()
      github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:250 +0x204
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).makeExecPlan()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:2295 +0x125
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).dispatchToExecutionEngine()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1762 +0xcb2
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmtInOpenState()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1125 +0x7be7
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt.func1()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:146 +0x184
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execWithProfiling()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:3427 +0x579
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:145 +0x75d
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd.func1()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2236 +0x7e4
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2241 +0x22f2
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).run()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2158 +0x3d5
  github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildSelectClause()
      github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/select.go:1230 +0x425
  github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildSelectStmtWithoutParens()
      github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/select.go:1155 +0x52c
  github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildSelect.func1()
      github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/select.go:1113 +0x1e4
  github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).processWiths()
      github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/with.go:116 +0xc4
  github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildSelect()
      github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/select.go:1112 +0x626
  github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildStmt()
      github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/builder.go:346 +0x476
  github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildStmtAtRootWithScope()
      github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/builder.go:290 +0x2fa
  github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildStmtAtRoot()
      github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/builder.go:271 +0x1ea
  github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).Build()
      github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/builder.go:250 +0x66e
  github.com/cockroachdb/cockroach/pkg/sql.(*optPlanningCtx).buildExecMemo()
      github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:593 +0xba5
  github.com/cockroachdb/cockroach/pkg/sql.(*planner).makeOptimizerPlan()
      github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:250 +0x204
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).makeExecPlan()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:2295 +0x125
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).dispatchToExecutionEngine()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1762 +0xcb2
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmtInOpenState()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1125 +0x7be7
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt.func1()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:146 +0x184
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execWithProfiling()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:3427 +0x579
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:145 +0x75d
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd.func1()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2236 +0x7e4
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2241 +0x22f2
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).run()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2158 +0x3d5
  github.com/cockroachdb/cockroach/pkg/sql.(*optPlanningCtx).buildExecMemo()
      github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:593 +0xba5
  github.com/cockroachdb/cockroach/pkg/sql.(*planner).makeOptimizerPlan()
      github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:250 +0x204
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).makeExecPlan()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:2295 +0x125
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).dispatchToExecutionEngine()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1762 +0xcb2
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmtInOpenState()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1125 +0x7be7
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt.func1()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:146 +0x184
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execWithProfiling()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:3427 +0x579
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:145 +0x75d
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd.func1()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2236 +0x7e4
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2241 +0x22f2
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).run()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2158 +0x3d5
  github.com/cockroachdb/cockroach/pkg/sql.(*optPlanningCtx).buildExecMemo()
      github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:593 +0xba5
  github.com/cockroachdb/cockroach/pkg/sql.(*planner).makeOptimizerPlan()
      github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:250 +0x204
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).makeExecPlan()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:2295 +0x125
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).dispatchToExecutionEngine()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1762 +0xcb2
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmtInOpenState()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1125 +0x7be7
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt.func1()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:146 +0x184
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execWithProfiling()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:3427 +0x579
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:145 +0x75d
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd.func1()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2236 +0x7e4
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2241 +0x22f2
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).run()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2158 +0x3d5
  github.com/cockroachdb/cockroach/pkg/sql.(*optPlanningCtx).buildExecMemo()
      github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:593 +0xba5
  github.com/cockroachdb/cockroach/pkg/sql.(*planner).makeOptimizerPlan()
      github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:250 +0x204
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).makeExecPlan()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:2295 +0x125
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).dispatchToExecutionEngine()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1762 +0xcb2
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmtInOpenState()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1125 +0x7be7
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt.func1()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:146 +0x184
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execWithProfiling()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:3427 +0x579
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:145 +0x75d
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd.func1()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2236 +0x7e4
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2241 +0x22f2
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).run()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2158 +0x3d5
  github.com/cockroachdb/cockroach/pkg/sql.(*optPlanningCtx).buildExecMemo()
      github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:593 +0xba5
  github.com/cockroachdb/cockroach/pkg/sql.(*planner).makeOptimizerPlan()
      github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:250 +0x204
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).makeExecPlan()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:2295 +0x125
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).dispatchToExecutionEngine()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1762 +0xcb2
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmtInOpenState()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1125 +0x7be7
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt.func1()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:146 +0x184
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execWithProfiling()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:3427 +0x579
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:145 +0x75d
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd.func1()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2236 +0x7e4
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2241 +0x22f2
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).run()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2158 +0x3d5
  github.com/cockroachdb/cockroach/pkg/sql.(*optPlanningCtx).buildExecMemo()
      github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:593 +0xba5
  github.com/cockroachdb/cockroach/pkg/sql.(*planner).makeOptimizerPlan()
      github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:250 +0x204
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).makeExecPlan()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:2295 +0x125
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).dispatchToExecutionEngine()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1762 +0xcb2
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmtInOpenState()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1125 +0x7be7
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt.func1()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:146 +0x184
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execWithProfiling()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:3427 +0x579
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:145 +0x75d
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd.func1()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2236 +0x7e4
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2241 +0x22f2
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).run()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2158 +0x3d5
  github.com/cockroachdb/cockroach/pkg/sql.(*optPlanningCtx).buildExecMemo()
      github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:593 +0xba5
  github.com/cockroachdb/cockroach/pkg/sql.(*planner).makeOptimizerPlan()
      github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:250 +0x204
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).makeExecPlan()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:2295 +0x125
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).dispatchToExecutionEngine()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1762 +0xcb2
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmtInOpenState()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1125 +0x7be7
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt.func1()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:146 +0x184
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execWithProfiling()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:3427 +0x579
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:145 +0x75d
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd.func1()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2236 +0x7e4
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2241 +0x22f2
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).run()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2158 +0x3d5
  github.com/cockroachdb/cockroach/pkg/sql.(*optPlanningCtx).buildExecMemo()
      github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:593 +0xba5
  github.com/cockroachdb/cockroach/pkg/sql.(*planner).makeOptimizerPlan()
      github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:250 +0x204
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).makeExecPlan()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:2295 +0x125
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).dispatchToExecutionEngine()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1762 +0xcb2
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmtInOpenState()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1125 +0x7be7
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt.func1()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:146 +0x184
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execWithProfiling()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:3427 +0x579
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:145 +0x75d
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd.func1()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2236 +0x7e4
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2241 +0x22f2
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).run()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2158 +0x3d5
  github.com/cockroachdb/cockroach/pkg/sql.(*optPlanningCtx).buildExecMemo()
      github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:593 +0xba5
  github.com/cockroachdb/cockroach/pkg/sql.(*planner).makeOptimizerPlan()
      github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:250 +0x204
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).makeExecPlan()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:2295 +0x125
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).dispatchToExecutionEngine()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1762 +0xcb2
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmtInOpenState()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1125 +0x7be7
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt.func1()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:146 +0x184
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execWithProfiling()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:3427 +0x579
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:145 +0x75d
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd.func1()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2236 +0x7e4
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2241 +0x22f2
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).run()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2158 +0x3d5
  github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildStmtAtRoot()
      github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/builder.go:271 +0x1ea
  github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).Build()
      github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/builder.go:250 +0x66e
  github.com/cockroachdb/cockroach/pkg/sql.(*optPlanningCtx).buildExecMemo()
      github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:593 +0xba5
  github.com/cockroachdb/cockroach/pkg/sql.(*planner).makeOptimizerPlan()
      github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:250 +0x204
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).makeExecPlan()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:2295 +0x125
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).dispatchToExecutionEngine()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1762 +0xcb2
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmtInOpenState()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1125 +0x7be7
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt.func1()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:146 +0x184
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execWithProfiling()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:3427 +0x579
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:145 +0x75d
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd.func1()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2236 +0x7e4
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2241 +0x22f2
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).run()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2158 +0x3d5
  github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildStmtAtRoot()
      github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/builder.go:271 +0x1ea
  github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).Build()
      github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/builder.go:250 +0x66e
  github.com/cockroachdb/cockroach/pkg/sql.(*optPlanningCtx).buildExecMemo()
      github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:593 +0xba5
  github.com/cockroachdb/cockroach/pkg/sql.(*planner).makeOptimizerPlan()
      github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:250 +0x204
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).makeExecPlan()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:2295 +0x125
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).dispatchToExecutionEngine()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1762 +0xcb2
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmtInOpenState()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1125 +0x7be7
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt.func1()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:146 +0x184
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execWithProfiling()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:3427 +0x579
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:145 +0x75d
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd.func1()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2236 +0x7e4
  github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd()
      github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2241 +0x22f2

Previous read at 0x00c003542b20 by goroutine 3285050:
  github.com/cockroachdb/cockroach/pkg/sql/types.(*T).Size()
      github.com/cockroachdb/cockroach/pkg/sql/types/pkg/sql/types/types.go:2157 +0x45
  github.com/cockroachdb/cockroach/pkg/sql/catalog/descpb.(*ColumnDescriptor).Size()
      github.com/cockroachdb/cockroach/pkg/sql/catalog/descpb/bazel-out/k8-fastbuild/bin/pkg/sql/catalog/descpb/descpb_go_proto_/github.com/cockroachdb/cockroach/pkg/sql/catalog/descpb/structured.pb.go:10250 +0x117
  github.com/cockroachdb/cockroach/pkg/sql/catalog/descpb.(*TableDescriptor).Size()
      github.com/cockroachdb/cockroach/pkg/sql/catalog/descpb/bazel-out/k8-fastbuild/bin/pkg/sql/catalog/descpb/descpb_go_proto_/github.com/cockroachdb/cockroach/pkg/sql/catalog/descpb/structured.pb.go:10675 +0x3e8
  github.com/cockroachdb/cockroach/pkg/sql/catalog/tabledesc.(*wrapper).ByteSize()
      github.com/cockroachdb/cockroach/pkg/sql/catalog/tabledesc/table_desc.go:135 +0x31
  github.com/cockroachdb/cockroach/pkg/sql/catalog/tabledesc.(*immutable).ByteSize()
      <autogenerated>:1 +0x17
  github.com/cockroachdb/cockroach/pkg/sql/catalog/nstree.byIDEntry.ByteSize()
      github.com/cockroachdb/cockroach/pkg/sql/catalog/nstree/catalog_entries.go:113 +0x46
  github.com/cockroachdb/cockroach/pkg/sql/catalog/nstree.(*MutableCatalog).UpsertComment()
      github.com/cockroachdb/cockroach/pkg/sql/catalog/nstree/catalog_mutable.go:142 +0x5c4
  github.com/cockroachdb/cockroach/pkg/sql/catalog/descs.(*Collection).aggregateAllLayers.virtualDescriptors.addAllToCatalog.func10()
      github.com/cockroachdb/cockroach/pkg/sql/catalog/descs/virtual_descriptors.go:104 +0x17d
  github.com/cockroachdb/cockroach/pkg/sql.(*VirtualSchemaHolder).Visit()
      github.com/cockroachdb/cockroach/pkg/sql/virtual_schema.go:446 +0x2c9
  github.com/cockroachdb/cockroach/pkg/sql/catalog/descs.virtualDescriptors.addAllToCatalog()
      github.com/cockroachdb/cockroach/pkg/sql/catalog/descs/virtual_descriptors.go:85 +0xee4
  github.com/cockroachdb/cockroach/pkg/sql/catalog/descs.(*Collection).aggregateAllLayers()
      github.com/cockroachdb/cockroach/pkg/sql/catalog/descs/collection.go:1032 +0xd57
  github.com/cockroachdb/cockroach/pkg/sql/catalog/descs.(*Collection).GetAll()
      github.com/cockroachdb/cockroach/pkg/sql/catalog/descs/collection.go:723 +0xd0
  github.com/cockroachdb/cockroach/pkg/spanconfig/spanconfigsqltranslator.(*SQLTranslator).findDescendantLeafIDsForDescriptor()
      github.com/cockroachdb/cockroach/pkg/spanconfig/spanconfigsqltranslator/sqltranslator.go:534 +0x304
  github.com/cockroachdb/cockroach/pkg/spanconfig/spanconfigsqltranslator.(*SQLTranslator).findDescendantLeafIDs()
      github.com/cockroachdb/cockroach/pkg/spanconfig/spanconfigsqltranslator/sqltranslator.go:485 +0xde
  github.com/cockroachdb/cockroach/pkg/spanconfig/spanconfigsqltranslator.(*SQLTranslator).Translate()
      github.com/cockroachdb/cockroach/pkg/spanconfig/spanconfigsqltranslator/sqltranslator.go:108 +0x444
  github.com/cockroachdb/cockroach/pkg/spanconfig/spanconfigreconciler.(*Reconciler).Reconcile.(*incrementalReconciler).reconcile.func2.1()
      github.com/cockroachdb/cockroach/pkg/spanconfig/spanconfigreconciler/reconciler.go:543 +0x2e7
  github.com/cockroachdb/cockroach/pkg/sql.(*InternalDB).DescsTxn.func1()
      github.com/cockroachdb/cockroach/pkg/sql/internal.go:1728 +0x52
  github.com/cockroachdb/cockroach/pkg/sql.(*InternalDB).txn.func4()
      github.com/cockroachdb/cockroach/pkg/sql/internal.go:1825 +0x4d3
  github.com/cockroachdb/cockroach/pkg/kv.(*Txn).exec()
      github.com/cockroachdb/cockroach/pkg/kv/txn.go:1032 +0x8f
  github.com/cockroachdb/cockroach/pkg/kv.runTxn()
      github.com/cockroachdb/cockroach/pkg/kv/db.go:1079 +0x64
  github.com/cockroachdb/cockroach/pkg/kv.(*DB).TxnWithAdmissionControl()
      github.com/cockroachdb/cockroach/pkg/kv/db.go:1042 +0xec
  github.com/cockroachdb/cockroach/pkg/kv.(*DB).Txn()
      github.com/cockroachdb/cockroach/pkg/kv/db.go:1017 +0x5c
  github.com/cockroachdb/cockroach/pkg/kv.(*DB).Txn-fm()
      <autogenerated>:1 +0x1b
  github.com/cockroachdb/cockroach/pkg/sql.(*InternalDB).txn()
      github.com/cockroachdb/cockroach/pkg/sql/internal.go:1812 +0x701
  github.com/cockroachdb/cockroach/pkg/sql.(*InternalDB).DescsTxn()
      github.com/cockroachdb/cockroach/pkg/sql/internal.go:1726 +0xec
  github.com/cockroachdb/cockroach/pkg/spanconfig/spanconfigreconciler.(*Reconciler).Reconcile.(*incrementalReconciler).reconcile.func2()
      github.com/cockroachdb/cockroach/pkg/spanconfig/spanconfigreconciler/reconciler.go:521 +0x62e
  github.com/cockroachdb/cockroach/pkg/spanconfig/spanconfigsqlwatcher.(*SQLWatcher).watch()
      github.com/cockroachdb/cockroach/pkg/spanconfig/spanconfigsqlwatcher/sqlwatcher.go:177 +0xbea
  github.com/cockroachdb/cockroach/pkg/spanconfig/spanconfigsqlwatcher.(*SQLWatcher).WatchForSQLUpdates()
      github.com/cockroachdb/cockroach/pkg/spanconfig/spanconfigsqlwatcher/sqlwatcher.go:91 +0x5c
  github.com/cockroachdb/cockroach/pkg/spanconfig/spanconfigreconciler.(*incrementalReconciler).reconcile()
      github.com/cockroachdb/cockroach/pkg/spanconfig/spanconfigreconciler/reconciler.go:497 +0x73b
  github.com/cockroachdb/cockroach/pkg/spanconfig/spanconfigreconciler.(*Reconciler).Reconcile()
      github.com/cockroachdb/cockroach/pkg/spanconfig/spanconfigreconciler/reconciler.go:188 +0x57e
  github.com/cockroachdb/cockroach/pkg/spanconfig/spanconfigjob.(*resumer).Resume()
      github.com/cockroachdb/cockroach/pkg/spanconfig/spanconfigjob/job.go:162 +0x1216
  github.com/cockroachdb/cockroach/pkg/jobs.(*Registry).stepThroughStateMachine.func2()
      github.com/cockroachdb/cockroach/pkg/jobs/registry.go:1621 +0x1bd
  github.com/cockroachdb/cockroach/pkg/jobs.(*Registry).stepThroughStateMachine()
      github.com/cockroachdb/cockroach/pkg/jobs/registry.go:1622 +0xe91
  github.com/cockroachdb/cockroach/pkg/jobs.(*Registry).runJob()
      github.com/cockroachdb/cockroach/pkg/jobs/adopt.go:456 +0x693
  github.com/cockroachdb/cockroach/pkg/jobs.(*Registry).resumeJob.func1()
      github.com/cockroachdb/cockroach/pkg/jobs/adopt.go:290 +0x1ae
  github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunAsyncTaskEx.func2()
      github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:484 +0x278
DrewKimball commented 9 months ago

Likely a dupe of #118691

yuzefovich commented 9 months ago

dup of #118691