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.1k stars 3.81k forks source link

sql: CockroachDB panics when walking SHOW EXPERIMENTAL_FINGERPRINTS statement #130822

Closed SteveLeungYL closed 1 month ago

SteveLeungYL commented 1 month ago

Describe the problem

The latest version of the CockroachDB v24.2.0 crashes when executing the following query:

CREATE TABLE t0 AS SELECT ALL WINDOW w1 AS ( ORDER BY ARRAY ( WITH RECURSIVE alias_2 AS ( EXPLAIN SHOW EXPERIMENTAL_FINGERPRINTS FROM TABLE random_table_name ) SELECT ALL ) );

To Reproduce

  1. In operating system Ubuntu 20.04 LTS, download the pre-build CockroachDB binaries (v24.2.0) from link
  2. Run ./cockroach demo, and then paste the PoC query to the cockroach cli environment.
  3. Observe the crash and log the stack information.

Expected behavior The CockroachDB should return error from the statement.

Additional data / screenshots

This is the stack frame from the crash (v24.2.0):

* ERROR: a SQL panic has occurred while executing the following statement:
* CREATE TABLE t0 AS SELECT  WINDOW w1 AS (ORDER BY ARRAY (WITH RECURSIVE alias_2 AS (EXPLAIN SHOW EXPERIMENTAL_FINGERPRINTS FROM TABLE random_table_name) SELECT ))
*
*
* ERROR: a panic has occurred!
* runtime error: invalid memory address or nil pointer dereference
* (1) attached stack trace
*   -- stack trace:
*   | github.com/cockroachdb/cockroach/pkg/sql.(*Server).ServeConn.func1
*   |   github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:961
*   | [...repeated from below...]
* Wraps: (2) while executing: CREATE TABLE _ AS SELECT  WINDOW _ AS (ORDER BY ARRAY (WITH RECURSIVE _ AS (EXPLAIN SHOW EXPERIMENTAL_FINGERPRINTS FROM TABLE _) SELECT ))
* Wraps: (3) attached stack trace
*   -- stack trace:
*   | github.com/cockroachdb/cockroach/pkg/sql.(*Server).ServeConn.func1
*   |   github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:961
*   | runtime.gopanic
*   |   GOROOT/src/runtime/panic.go:770
*   | github.com/cockroachdb/cockroach/pkg/sql/colexecerror.CatchVectorizedRuntimeError.func1
*   |   github.com/cockroachdb/cockroach/pkg/sql/colexecerror/error.go:127
*   | runtime.gopanic
*   |   GOROOT/src/runtime/panic.go:770
*   | github.com/cockroachdb/cockroach/pkg/sql/colexecerror.CatchVectorizedRuntimeError.func1
*   |   github.com/cockroachdb/cockroach/pkg/sql/colexecerror/error.go:127
*   | runtime.gopanic
*   |   GOROOT/src/runtime/panic.go:770
*   | runtime.panicmem
*   |   GOROOT/src/runtime/panic.go:261
*   | runtime.sigpanic
*   |   GOROOT/src/runtime/signal_unix.go:881
*   | github.com/cockroachdb/cockroach/pkg/sql/sem/tree.walkTenantSpec
*   |   github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:897
*   | github.com/cockroachdb/cockroach/pkg/sql/sem/tree.(*ShowFingerprints).walkStmt
*   |   github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:1187
*   | github.com/cockroachdb/cockroach/pkg/sql/sem/tree.walkStmt
*   |   github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:2102
*   | github.com/cockroachdb/cockroach/pkg/sql/sem/tree.(*Explain).walkStmt
*   |   github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:1417
*   | github.com/cockroachdb/cockroach/pkg/sql/sem/tree.walkStmt
*   |   github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:2102
*   | github.com/cockroachdb/cockroach/pkg/sql/sem/tree.(*Select).walkStmt
*   |   github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:1751
*   | github.com/cockroachdb/cockroach/pkg/sql/sem/tree.walkStmt
*   |   github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:2102
*   | github.com/cockroachdb/cockroach/pkg/sql/sem/tree.(*ParenSelect).walkStmt
*   |   github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:1586
*   | github.com/cockroachdb/cockroach/pkg/sql/sem/tree.walkStmt
*   |   github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:2102
*   | github.com/cockroachdb/cockroach/pkg/sql/sem/tree.(*Subquery).Walk
*   |   github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:515
*   | github.com/cockroachdb/cockroach/pkg/sql/sem/tree.WalkExpr
*   |   github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:840
*   | github.com/cockroachdb/cockroach/pkg/sql/sem/tree.(*ArrayFlatten).Walk
*   |   github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:681
*   | github.com/cockroachdb/cockroach/pkg/sql/sem/tree.WalkExpr
*   |   github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:840
*   | github.com/cockroachdb/cockroach/pkg/sql/sem/tree.SimpleVisit
*   |   github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:2136
*   | github.com/cockroachdb/cockroach/pkg/sql/catalog/seqexpr.GetUsedSequences
*   |   github.com/cockroachdb/cockroach/pkg/sql/catalog/seqexpr/sequence.go:157
*   | github.com/cockroachdb/cockroach/pkg/sql.replaceSeqNamesWithIDsLang.func1
*   |   github.com/cockroachdb/cockroach/pkg/sql/create_view.go:456
*   | github.com/cockroachdb/cockroach/pkg/sql/sem/tree.(*simpleVisitor).VisitPre
*   |   github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:2117
*   | github.com/cockroachdb/cockroach/pkg/sql/sem/tree.WalkExpr
*   |   github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:837
*   | github.com/cockroachdb/cockroach/pkg/sql/sem/tree.walkOrderBy
*   |   github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:1669
*   | github.com/cockroachdb/cockroach/pkg/sql/sem/tree.walkWindowDef
*   |   github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:279
*   | github.com/cockroachdb/cockroach/pkg/sql/sem/tree.(*SelectClause).walkStmt
*   |   github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:1842
*   | github.com/cockroachdb/cockroach/pkg/sql/sem/tree.walkStmt
*   |   github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:2102
*   | github.com/cockroachdb/cockroach/pkg/sql/sem/tree.(*Select).walkStmt
*   |   github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:1716
*   | github.com/cockroachdb/cockroach/pkg/sql/sem/tree.walkStmt
*   |   github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:2102
* Wraps: (4) runtime error: invalid memory address or nil pointer dereference
* Error types: (1) *withstack.withStack (2) *safedetails.withSafeDetails (3) *withstack.withStack (4) runtime.errorString
*
*
* ERROR: Queued as error 23ca7e08d6304c089f8206c1c2c5e01e
*
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
    panic: runtime error: invalid memory address or nil pointer dereference [recovered]
    panic: runtime error: invalid memory address or nil pointer dereference [recovered]
    panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x139b2f0]

goroutine 5173 [running]:
github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).closeWrapper(0x40047d6a08, {0x7b90c90, 0x40066a8030}, {0x57b7b80?, 0xb6b5630?})
    github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:1234 +0x160
github.com/cockroachdb/cockroach/pkg/sql.(*Server).ServeConn.func1({0x7b90c90, 0x40066a8030}, {0x400415d6c0?})
    github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:961 +0x4c
panic({0x57b7b80?, 0xb6b5630?})
    GOROOT/src/runtime/panic.go:770 +0x124
github.com/cockroachdb/cockroach/pkg/sql/colexecerror.CatchVectorizedRuntimeError.func1()
    github.com/cockroachdb/cockroach/pkg/sql/colexecerror/error.go:127 +0x4fc
panic({0x57b7b80?, 0xb6b5630?})
    GOROOT/src/runtime/panic.go:770 +0x124
github.com/cockroachdb/cockroach/pkg/sql/colexecerror.CatchVectorizedRuntimeError.func1()
    github.com/cockroachdb/cockroach/pkg/sql/colexecerror/error.go:127 +0x4fc
panic({0x57b7b80?, 0xb6b5630?})
    GOROOT/src/runtime/panic.go:770 +0x124
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.walkTenantSpec({0x7b57140?, 0x4006b020c0?}, 0x5a27320?)
    github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:897 +0x20
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.(*ShowFingerprints).walkStmt(0x40053da3c0, {0x7b57140, 0x4006b020c0})
    github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:1187 +0x38
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.walkStmt({0x7b57140?, 0x4006b020c0?}, {0x7bb7d00, 0x40053da3c0})
    github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:2102 +0x64
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.(*Explain).walkStmt(0x40053da3e0, {0x7b57140?, 0x4006b020c0?})
    github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:1417 +0x3c
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.walkStmt({0x7b57140?, 0x4006b020c0?}, {0x7bb7a40, 0x40053da3e0})
    github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:2102 +0x64
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.(*Select).walkStmt(0x40060763c0, {0x7b57140, 0x4006b020c0})
    github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:1751 +0x328
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.walkStmt({0x7b57140?, 0x4006b020c0?}, {0x7bb7bc0, 0x40060763c0})
    github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:2102 +0x64
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.(*ParenSelect).walkStmt(0x4007a20b00, {0x7b57140?, 0x4006b020c0?})
    github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:1586 +0x3c
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.walkStmt({0x7b57140?, 0x4006b020c0?}, {0x7bb7dc0, 0x4007a20b00})
    github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:2102 +0x64
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.(*Subquery).Walk(0x4007984c00, {0x7b57140?, 0x4006b020c0?})
    github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:515 +0x5c
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.WalkExpr({0x7b57140, 0x4006b020c0}, {0x7b91ba8, 0x4007984c00})
    github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:840 +0x54
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.(*ArrayFlatten).Walk(0x4006b02000, {0x7b57140?, 0x4006b020c0?})
    github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:681 +0x3c
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.WalkExpr({0x7b57140, 0x4006b020c0}, {0x7b91b70, 0x4006b02000})
    github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:840 +0x54
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.SimpleVisit({0x7b91b70, 0x4006b02000}, 0x400650c5a0)
    github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:2136 +0x78
github.com/cockroachdb/cockroach/pkg/sql/catalog/seqexpr.GetUsedSequences({0x7b91b70, 0x4006b02000})
    github.com/cockroachdb/cockroach/pkg/sql/catalog/seqexpr/sequence.go:157 +0x80
github.com/cockroachdb/cockroach/pkg/sql.replaceSeqNamesWithIDsLang.func1({0x7b91b70, 0x4006b02000})
    github.com/cockroachdb/cockroach/pkg/sql/create_view.go:456 +0x54
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.(*simpleVisitor).VisitPre(0x4006b02090, {0x7b91b70, 0x4006b02000})
    github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:2117 +0x48
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.WalkExpr({0x7b57140, 0x4006b02090}, {0x7b91b70, 0x4006b02000})
    github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:837 +0x3c
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.walkOrderBy({0x7b57140, 0x4006b02090}, {0x4007a20b08?, 0x1, 0x25?})
    github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:1669 +0x7c
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.walkWindowDef({0x7b57140, 0x4006b02090}, 0x4006338fc0)
    github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:279 +0x12c
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.(*SelectClause).walkStmt(0x400636dcc0, {0x7b57140, 0x4006b02090})
    github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:1842 +0x434
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.walkStmt({0x7b57140?, 0x4006b02090?}, {0x7bb8140, 0x400636dcc0})
    github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:2102 +0x64
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.(*Select).walkStmt(0x4006076410, {0x7b57140, 0x4006b02090})
    github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:1716 +0x60
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.walkStmt({0x7b57140?, 0x4006b02090?}, {0x7bb7bc0, 0x4006076410})
    github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:2102 +0x64
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.SimpleStmtVisit({0x7bb7bc0, 0x4006076410}, 0x4007984b70)
    github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:2149 +0x78
github.com/cockroachdb/cockroach/pkg/sql.replaceSeqNamesWithIDsLang({0x7b90c90, 0x4007984000}, {0x7bf9b18, 0x40047d70b8}, {0x4002a44fc0, 0x8f}, 0x0, 0x1)
    github.com/cockroachdb/cockroach/pkg/sql/create_view.go:496 +0x3e8
github.com/cockroachdb/cockroach/pkg/sql.replaceSeqNamesWithIDs(...)
    github.com/cockroachdb/cockroach/pkg/sql/create_view.go:438
github.com/cockroachdb/cockroach/pkg/sql.getFinalSourceQuery({{0x7b90c90?, 0x4007984000?}, 0x400863b808?, 0x40047d70b8?}, 0x4007d73630, 0x40047d75c0)
    github.com/cockroachdb/cockroach/pkg/sql/create_table.go:1183 +0x208
github.com/cockroachdb/cockroach/pkg/sql.newTableDescIfAs({{0x7b90c90?, 0x4007984000?}, 0x400863b808?, 0x40047d70b8?}, 0x400636d180, {0x7c440f0, 0x40066d4e70}, {0x7c40cb0, 0x40066d51e0}, 0x70, ...)
    github.com/cockroachdb/cockroach/pkg/sql/create_table.go:1273 +0x430
github.com/cockroachdb/cockroach/pkg/sql.(*createTableNode).startExec(0x4006fafbf0, {{0x7b90c90, 0x4007984000}, 0x400863b808, 0x40047d70b8})
    github.com/cockroachdb/cockroach/pkg/sql/create_table.go:383 +0x1334
github.com/cockroachdb/cockroach/pkg/sql.startExec.func2({0x400605a708?, 0x62a0d6b?}, {0x7b94180, 0x4006fafbf0})
    github.com/cockroachdb/cockroach/pkg/sql/plan.go:524 +0xfc
github.com/cockroachdb/cockroach/pkg/sql.(*planVisitor).visitInternal.func1()
    github.com/cockroachdb/cockroach/pkg/sql/walk.go:112 +0x44
github.com/cockroachdb/cockroach/pkg/sql.(*planVisitor).visitInternal(0x40044deba8, {0x7b94180?, 0x4006fafbf0}, {0x6257f3d?, 0xc?})
    github.com/cockroachdb/cockroach/pkg/sql/walk.go:299 +0x1594
github.com/cockroachdb/cockroach/pkg/sql.(*planVisitor).visit(0x40044deba8, {0x7b94180, 0x4006fafbf0})
    github.com/cockroachdb/cockroach/pkg/sql/walk.go:79 +0xe8
github.com/cockroachdb/cockroach/pkg/sql.walkPlan(...)
    github.com/cockroachdb/cockroach/pkg/sql/walk.go:43
github.com/cockroachdb/cockroach/pkg/sql.startExec({{0x7b90c90?, 0x4007984000?}, 0x400863b808?, 0x40047d70b8?}, {0x7b94180, 0x4006fafbf0})
    github.com/cockroachdb/cockroach/pkg/sql/plan.go:527 +0xdc
github.com/cockroachdb/cockroach/pkg/sql.(*planNodeToRowSource).Start(0x4005eda008, {0x7b90c90, 0x4006faff50})
    github.com/cockroachdb/cockroach/pkg/sql/plan_node_to_row_source.go:171 +0xf0
github.com/cockroachdb/cockroach/pkg/sql/colexec.(*Columnarizer).Init(0x4006048308, {0x7b90c90, 0x4006faff20})
    github.com/cockroachdb/cockroach/pkg/sql/colexec/columnarizer.go:183 +0xd0
github.com/cockroachdb/cockroach/pkg/sql/colflow.(*batchInfoCollector).init(...)
    github.com/cockroachdb/cockroach/pkg/sql/colflow/stats.go:94
github.com/cockroachdb/cockroach/pkg/sql/colexecerror.CatchVectorizedRuntimeError(0x4006072380?)
    github.com/cockroachdb/cockroach/pkg/sql/colexecerror/error.go:152 +0x58
github.com/cockroachdb/cockroach/pkg/sql/colflow.(*batchInfoCollector).Init(0x40052cea00, {0x7b90c90?, 0x4006faff20?})
    github.com/cockroachdb/cockroach/pkg/sql/colflow/stats.go:103 +0x74
github.com/cockroachdb/cockroach/pkg/sql/colflow.(*BatchFlowCoordinator).Run.(*BatchFlowCoordinator).init.func2()
    github.com/cockroachdb/cockroach/pkg/sql/colflow/flow_coordinator.go:241 +0x34
github.com/cockroachdb/cockroach/pkg/sql/colexecerror.CatchVectorizedRuntimeError(0x7b90c58?)
    github.com/cockroachdb/cockroach/pkg/sql/colexecerror/error.go:152 +0x58
github.com/cockroachdb/cockroach/pkg/sql/colflow.(*BatchFlowCoordinator).init(...)
    github.com/cockroachdb/cockroach/pkg/sql/colflow/flow_coordinator.go:240
github.com/cockroachdb/cockroach/pkg/sql/colflow.(*BatchFlowCoordinator).Run(0x400636d9a0, {0x7b90c58?, 0x4006076050?})
    github.com/cockroachdb/cockroach/pkg/sql/colflow/flow_coordinator.go:274 +0xbc
github.com/cockroachdb/cockroach/pkg/sql/colflow.(*vectorizedFlow).Run(0x400496bcc0, {0x7b90c58, 0x4006076050}, 0xc0?)
    github.com/cockroachdb/cockroach/pkg/sql/colflow/vectorized_flow.go:320 +0x1a0
github.com/cockroachdb/cockroach/pkg/sql.(*DistSQLPlanner).Run(0x4004140f20, {0x7b90c90, 0x4006fafc80}, 0x40071120d0, 0x400636d2c0, 0x4006d30b80, 0x4007841c08, 0x40047d75c0, 0x40044dfa70)
    github.com/cockroachdb/cockroach/pkg/sql/distsql_running.go:932 +0x93c
github.com/cockroachdb/cockroach/pkg/sql.(*DistSQLPlanner).PlanAndRun(0x4004140f20, {0x7b90c90, 0x4006fafc80}, 0x40047d75c0, 0x40071120d0, 0x400636d2c0, {{0x7b94180, 0x4006fafbf0}, 0x0}, 0x4007841c08, ...)
    github.com/cockroachdb/cockroach/pkg/sql/distsql_running.go:1994 +0x174
github.com/cockroachdb/cockroach/pkg/sql.(*DistSQLPlanner).PlanAndRunAll.func3(0xc8?, 0xffff5edc96b8?, {0x7b90c90?, 0x4006fafc80?}, 0x40044dfb48?, 0x46ab6c?, 0x400809de50?)
    github.com/cockroachdb/cockroach/pkg/sql/distsql_running.go:1708 +0xa0
github.com/cockroachdb/cockroach/pkg/sql.(*DistSQLPlanner).PlanAndRunAll(0x4004140f20, {0x7b90c90, 0x4006fafc80}, 0x40047d75c0, 0x40071120d0, 0x40047d70b8, 0x4007841c08, 0x0)
    github.com/cockroachdb/cockroach/pkg/sql/distsql_running.go:1711 +0x178
github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execWithDistSQLEngine(0x40047d6a08, {0x7b90c90, 0x4006fafc80}, 0x40047d70b8, 0x1?, {0xffff5d4b85b0?, 0x4003500738?}, 0x0, 0x4005f591d8, {0x7b43c20, ...})
    github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:2420 +0x360
github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).dispatchToExecutionEngine(0x40047d6a08, {0x7b90c90, 0x4006fae000}, 0x40047d70b8, {0xffff5d4b85b0, 0x4003500738})
    github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1967 +0xd40
github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmtInOpenState(0x40047d6a08, {0x7b90c90, 0x4007979ec0}, {{0x7bb7e40, 0x400636d180}, {0x0, 0x0, 0x0}, {0x40047cb295, 0xae}, ...}, ...)
    github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1174 +0x3c4c
github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt.func1({0x7b90c90?, 0x4007979ec0?})
    github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:146 +0x8c
github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execWithProfiling(0xb6dd0f0?, {0x7b90c90?, 0x4007979ec0?}, {0x7bb7e40?, 0x400636d180?}, 0x4003500738?, 0x6267577?)
    github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:3429 +0x25c
github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt(0x40047d6a08, {0x7b90c90, 0x4007979ec0}, {{0x7bb7e40, 0x400636d180}, {0x0, 0x0, 0x0}, {0x40047cb295, 0xae}, ...}, ...)
    github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:145 +0x52c
github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd.func1(0x40044e17f8, 0x40044e18a8, 0x40047d6a08, 0x40044e14d0, 0x4007b9f930, 0x4007b9f920, 0x4007b9f950, 0x40044e1968)
    github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2316 +0x360
github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd(0x40047d6a08)
    github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2321 +0x764
github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).run(0x40047d6a08, {0x7b90c90, 0x40066a8030}, 0x4001cc6100?, 0x4007c9fc98?, 0x4001337f40?)
    github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2238 +0x168
github.com/cockroachdb/cockroach/pkg/sql.(*Server).ServeConn(0x400412e640?, {0x7b90c90?, 0x40066a8030?}, {0x4008df9b00?}, 0x2?, 0x400693fe60?)
    github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:963 +0xb4
github.com/cockroachdb/cockroach/pkg/sql/pgwire.(*conn).processCommands(0x4003500008, {0x7b90c90, 0x40066a8030}, {0x0, 0x4, {0x1, {0x62212c7, 0x3}, {0x40053355a0, 0xf}, ...}, ...}, ...)
    github.com/cockroachdb/cockroach/pkg/sql/pgwire/conn.go:253 +0x344
github.com/cockroachdb/cockroach/pkg/sql/pgwire.(*Server).serveImpl.func4()
    github.com/cockroachdb/cockroach/pkg/sql/pgwire/server.go:1036 +0xcc
created by github.com/cockroachdb/cockroach/pkg/sql/pgwire.(*Server).serveImpl in goroutine 5126
    github.com/cockroachdb/cockroach/pkg/sql/pgwire/server.go:1033 +0x498

Environment:

cockroach version details:
Build Tag:        v24.2.0
Build Time:       2024/08/08 01:50:30
Distribution:     CCL
Platform:         linux arm64 (aarch64-unknown-linux-gnu)
Go Version:       go1.22.5 X:nocoverageredesign
C Compiler:       gcc 6.5.0
Build Commit ID:  953d09cce5a01cc0053e138516d80a27454f027c
Build Type:       release

Jira issue: CRDB-42256

Epic CRDB-40419

blathers-crl[bot] commented 1 month ago

Hi @SteveLeungYL, please add branch-* labels to identify which branch(es) this C-bug affects.

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

blathers-crl[bot] commented 1 month ago

Hello, I am Blathers. I am here to help you get the issue triaged.

Hoot - a bug! Though bugs are the bane of my existence, rest assured the wretched thing will get the best of care here.

I have CC'd a few people who may be able to assist you:

If we have not gotten back to your issue within a few business days, you can try the following:

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

blathers-crl[bot] commented 1 month ago

cc @cockroachdb/disaster-recovery