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: support extended protocol binary format for Geometry/Geography/Box2D types #81066

Closed
cockroach-teamcity opened this issue May 5, 2022 · 2 comments · Fixed by #93563
Closed
Assignees
Labels
A-sql-pgwire pgwire protocol issues. 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-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)

Comments

@cockroach-teamcity
Copy link
Member

cockroach-teamcity commented May 5, 2022

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

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

Panic message:

encoding.go:797: error in argument for ×: unsupported OID 90000 with format code FormatBinary
--
*errutil.leafError: unsupported OID 90000 with format code FormatBinary (1)
encoding.go:797: *withstack.withStack (top exception)
*assert.withAssertionFailure
*errutil.withPrefix: error in argument for × (2)
conn_executor_prepare.go:387: *withstack.withStack (3)
*pgerror.withCandidateCode: 08P01 (4)
(check the extra data payloads)

Stacktrace (expand for inline code snippets):

if err != nil {
return retErr(pgerror.Wrapf(err, pgcode.ProtocolViolation,
"error in argument for %s", k))
in pkg/sql.(*connExecutor).execBind
res = ex.clientComm.CreateBindResult(pos)
ev, payload = ex.execBind(ctx, tcmd)
case DeletePreparedStmt:
in pkg/sql.(*connExecutor).execCmd
var err error
if err = ex.execCmd(ex.Ctx()); err != nil {
if errors.IsAny(err, io.EOF, errDrainingComplete) {
in pkg/sql.(*connExecutor).run
}()
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
/usr/local/go/src/runtime/asm_amd64.s#L1373-L1375 in runtime.goexit

pkg/sql/conn_executor_prepare.go in pkg/sql.(*connExecutor).execBind at line 387
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).execCmd at line 1627
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).run at line 1450
pkg/sql/conn_executor.go in pkg/sql.(*Server).ServeConn at line 484
pkg/sql/pgwire/conn.go in pkg/sql/pgwire.(*conn).processCommandsAsync.func1 at line 628
/usr/local/go/src/runtime/asm_amd64.s in runtime.goexit at line 1374
Tag Value
Cockroach Release v21.1.7
Cockroach SHA: 1fac61a
Platform linux amd64
Distribution CCL
Environment development
Command start-single-node
Go Version ``
# of CPUs
# of Goroutines

Jira issue: CRDB-15368

Epic CRDB-17785

@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 May 5, 2022
@yuzefovich yuzefovich changed the title sentry: encoding.go:797: error in argument for ×: unsupported OID 90000 with format code FormatBinary -- *errutil.leafError: unsupported OID 90000 with format code FormatBinary (1) encoding.go:797: *withstack... sql: v21.1.7: unsupported OID 90000 with format code FormatBinary May 16, 2022
@blathers-crl blathers-crl bot added the T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) label May 16, 2022
@otan
Copy link
Contributor

otan commented May 16, 2022

@otan otan changed the title sql: v21.1.7: unsupported OID 90000 with format code FormatBinary sql: support extended protocol for Geometry/Geography types May 16, 2022
@otan otan changed the title sql: support extended protocol for Geometry/Geography types sql: support extended protocol for Geometry/Geography/Box2D types May 16, 2022
@jlinder jlinder added sync-me and removed sync-me labels May 20, 2022
@rafiss rafiss changed the title sql: support extended protocol for Geometry/Geography/Box2D types sql: support extended protocol binary format for Geometry/Geography/Box2D types Oct 12, 2022
@rafiss rafiss added the A-sql-pgwire pgwire protocol issues. label Oct 12, 2022
@yuzefovich
Copy link
Member

In this comment @carstenpiepel said:

This error is returned when transmitting a PostGIS geometry using the binary format/protocol. It appears that github.com/cockroachdb/cockroach/pkg/sql/pgwire/pgwirebase.DecodeDatum is missing a case for oidext.T_geometry and FormatBinary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sql-pgwire pgwire protocol issues. 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-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants