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

sql: v23.1.0-beta.2: incorrect int type used in copy #102181

Closed
cockroach-teamcity opened this issue Apr 24, 2023 · 3 comments · Fixed by #102298
Closed

sql: v23.1.0-beta.2: incorrect int type used in copy #102181

cockroach-teamcity opened this issue Apr 24, 2023 · 3 comments · Fixed by #102298
Assignees
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. GA-blocker O-sentry Originated from an in-the-wild panic report. T-sql-queries SQL Queries Team

Comments

@cockroach-teamcity
Copy link
Member

cockroach-teamcity commented Apr 24, 2023

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

Sentry link: https://cockroach-labs.sentry.io/issues/4123024665/?referrer=webhooks_plugin

Panic message:

conn_executor.go:865: interface conversion: coldata.Column is coldata.Int32s, not coldata.Int64s
(1) attached stack trace
-- stack trace:
| github.com/cockroachdb/cockroach/pkg/sql.(*Server).ServeConn.func1
| github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:865
| [...repeated from below...]
Wraps: (2) attached stack trace
-- stack trace:
| github.com/cockroachdb/cockroach/pkg/sql.(*Server).ServeConn.func1
| github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:865
| runtime.gopanic
| GOROOT/src/runtime/panic.go:884
| runtime.panicdottypeE
| GOROOT/src/runtime/iface.go:262
| runtime.panicdottypeI
| GOROOT/src/runtime/iface.go:272
| github.com/cockroachdb/cockroach/pkg/col/coldata.(*memColumn).Int64
| github.com/cockroachdb/cockroach/pkg/col/coldata/vec.go:233
| github.com/cockroachdb/cockroach/pkg/col/coldataext.MakeVecHandler
| github.com/cockroachdb/cockroach/pkg/col/coldataext/vec_handler.go:40
| github.com/cockroachdb/cockroach/pkg/sql.(*copyMachine).initVectorizedCopy
| github.com/cockroachdb/cockroach/pkg/sql/copy_from.go:456
| github.com/cockroachdb/cockroach/pkg/sql.newCopyMachine
| github.com/cockroachdb/cockroach/pkg/sql/copy_from.go:354
| github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCopyIn
| github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2953
| github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd
| github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2310
| github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).run
| github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2067
| github.com/cockroachdb/cockroach/pkg/sql.(*Server).ServeConn
| github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:867
| github.com/cockroachdb/cockroach/pkg/sql/pgwire.(*conn).processCommandsAsync.func1
| github.com/cockroachdb/cockroach/pkg/sql/pgwire/conn.go:738
| runtime.goexit
| GOROOT/src/runtime/asm_amd64.s:1594
Wraps: (3) interface conversion: coldata.Column is coldata.Int32s, not coldata.Int64s
Error types: (1) *withstack.withStack (2) *withstack.withStack (3) *runtime.TypeAssertionError
-- report composition:
*runtime.TypeAssertionError
conn_executor.go:865: *withstack.withStack (top exception)
conn_executor.go:865: *withstack.withStack (1)
(check the extra data payloads)

Stacktrace (expand for inline code snippets):

r := recover()
h.ex.closeWrapper(ctx, r)
}(ctx, h)
in pkg/sql.(*Server).ServeConn.func1
GOROOT/src/runtime/panic.go#L883-L885 in runtime.gopanic
GOROOT/src/runtime/iface.go#L261-L263 in runtime.panicdottypeE
GOROOT/src/runtime/iface.go#L271-L273 in runtime.panicdottypeI
func (m *memColumn) Int64() Int64s {
return m.col.(Int64s)
}
in pkg/col/coldata.(*memColumn).Int64
case types.IntFamily:
v.ints = vec.Int64()
case types.FloatFamily:
in pkg/col/coldataext.MakeVecHandler
for i := range typs {
c.valueHandlers[i] = coldataext.MakeVecHandler(c.batch.ColVec(i))
}
in pkg/sql.(*copyMachine).initVectorizedCopy
if c.canSupportVectorized(tableDesc) {
c.initVectorizedCopy(ctx, typs)
} else {
in pkg/sql.newCopyMachine
p := ex.planner
cm, copyErr = newCopyMachine(
ctx, cmd.Conn, cmd.Stmt, &p, txnOpt, ex.state.mon, ex.implicitTxn(),
in pkg/sql.(*connExecutor).execCopyIn
stmtCtx := withStatement(ctx, tcmd.Stmt)
ev, payload = ex.execCopyIn(stmtCtx, tcmd, copyRes)
in pkg/sql.(*connExecutor).execCmd
var err error
if err = ex.execCmd(); err != nil {
// Both of these errors are normal ways for the connExecutor to exit.
in pkg/sql.(*connExecutor).run
}(ctx, h)
return h.ex.run(ctx, s.pool, reserved, cancel)
}
in pkg/sql.(*Server).ServeConn
reservedOwned = false // We're about to pass ownership away.
retErr = sqlServer.ServeConn(ctx, connHandler, reserved, cancelConn)
}()
in pkg/sql/pgwire.(*conn).processCommandsAsync.func1
GOROOT/src/runtime/asm_amd64.s#L1593-L1595 in runtime.goexit

pkg/sql/conn_executor.go in pkg/sql.(*Server).ServeConn.func1 at line 865
GOROOT/src/runtime/panic.go in runtime.gopanic at line 884
GOROOT/src/runtime/iface.go in runtime.panicdottypeE at line 262
GOROOT/src/runtime/iface.go in runtime.panicdottypeI at line 272
pkg/col/coldata/vec.go in pkg/col/coldata.(*memColumn).Int64 at line 233
pkg/col/coldataext/vec_handler.go in pkg/col/coldataext.MakeVecHandler at line 40
pkg/sql/copy_from.go in pkg/sql.(*copyMachine).initVectorizedCopy at line 456
pkg/sql/copy_from.go in pkg/sql.newCopyMachine at line 354
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).execCopyIn at line 2953
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).execCmd at line 2310
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).run at line 2067
pkg/sql/conn_executor.go in pkg/sql.(*Server).ServeConn at line 867
pkg/sql/pgwire/conn.go in pkg/sql/pgwire.(*conn).processCommandsAsync.func1 at line 738
GOROOT/src/runtime/asm_amd64.s in runtime.goexit at line 1594
Tag Value
Cockroach Release v23.1.0-beta.2
Cockroach SHA: 82d4b56
Platform linux amd64
Distribution CCL
Environment v23.1.0-beta.2
Command start-single-node
Go Version ``
# of CPUs
# of Goroutines

Jira issue: CRDB-27328

@cockroach-teamcity cockroach-teamcity 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 Apr 24, 2023
@yuzefovich yuzefovich changed the title sentry: conn_executor.go:865: interface conversion: coldata.Column is coldata.Int32s, not coldata.Int64s (1) attached stack trace -- stack trace: | github.com/cockroachdb/cockroach/pkg/sql.(*Server).Serve... sql: v23.1.0-beta.2: incorrect int type used in copy Apr 25, 2023
@yuzefovich yuzefovich self-assigned this Apr 25, 2023
@blathers-crl blathers-crl bot added the T-sql-queries SQL Queries Team label Apr 25, 2023
@craig craig bot closed this as completed in 2066afb Apr 26, 2023
@yuzefovich
Copy link
Member

Reopening until #102307 is merged.

@yuzefovich yuzefovich reopened this Apr 26, 2023
@rafiss
Copy link
Collaborator

rafiss commented Apr 26, 2023

Thank you for picking this up so quickly. This sentry report came from our testing of psycopg with 23.1.0-beta, done by our psycopg partner.

@mgartner
Copy link
Collaborator

Closed by #102307.

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. GA-blocker O-sentry Originated from an in-the-wild panic report. T-sql-queries SQL Queries Team
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants