-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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/catalog: v20.2.9: nil txn or mutex when resolving type #64975
Comments
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 11, 2021
yuzefovich
changed the title
sentry: conn_executor.go:506: runtime error: invalid memory address or nil pointer dereference
--
runtime.errorString
conn_executor.go:506: *withstack.withStack (top exception)
*safedetails.withSafeDetails: while executing: SELECT _._, _._, _._, _._, _._, _._, _._, _._, _._, _._, _._, _._, _._, _._, _._, _._, _._, _._, _._, _._, _._ FROM _ AS _ WHERE ((((_._ = $1) AND ((($2 = _) AND (_._ IS DISTINCT FROM _)) OR (_._ = ANY ($3)))) AND (_._ = $4)) AND (_._ = $5)) AND (_._ = ANY ($6)) (1)
conn_executor.go:506: *withstack.withStack (2)
(check the extra data payloads)
sql/catalog: v20.2.9: nil txn or mutex when resolving type
May 11, 2021
The root cause here is #64140. I'm going to close this as duplicating that issue. @fqazi noted that just a week ago in #64140 (comment). |
craig bot
pushed a commit
that referenced
this issue
May 13, 2021
65083: kvserver: speed up TestRollbackSyncRangedIntentResolution r=tbg a=erikgrinaker Release note: None 65103: schemaexpr: remove expr_filter.go r=mgartner a=mgartner This commit removes the `pkg/sql/catalog/schemaexpr/expr_filter.go` file. The `schemaexpr` package is intended to contain logic for dealing with expressions defined in a schema, such as check constraints, computed columns, and partial index predicates. The two exported functions in the file, `RemapIVarsInTypedExpr` and `RunFilter` did not fit this theme. They have been moved elsewhere. Release note: None 65108: sql: minor fixes to fix panics related to type resolution and bad planner usage r=otan a=ajwerner See individual commits. The first commit matters but does not leave one with a good feeling. The second one is more copacetic. Relates to #64140. Fixes #64975. Release note (bug fix): Fixed a bug which could cause a panic when running a EXECUTE of a previously PREPARE'd statement with a REGCLASS, REGTYPE parameter or a user-defined type argument after running BEGIN AS OF SYSTEM TIME with an invalid timestamp. Release note (bug fix): Fixed a bug which could cause a panic when issuing a query referencing a user-defined type as a placeholder as the first operation on a new connection. 65130: cli/flags.go: fix typo in comment r=rauchenstein a=knz Thanks to @stevendanna for spotting this. Co-authored-by: Erik Grinaker <grinaker@cockroachlabs.com> Co-authored-by: Marcus Gartner <marcus@cockroachlabs.com> Co-authored-by: Andrew Werner <awerner32@gmail.com> Co-authored-by: Raphael 'kena' Poss <knz@thaumogen.net>
ajwerner
added a commit
to ajwerner/cockroach
that referenced
this issue
May 13, 2021
Before this change we'd resolve user-defined types into placeholder hints using a planner which may not be in a valid state. This could result in a nil-pointer panic. I don't actually know how to trigger this from a driver but there's evidence that it's possible. It's easy enough to hit using SQL if the previous commit were not here. Fixes cockroachdb#64975 Release note (bug fix): Fixed a bug which could cause a panic when issuing a query referencing a user-defined type as a placeholder.
ajwerner
added a commit
to ajwerner/cockroach
that referenced
this issue
May 14, 2021
Before this change we'd resolve user-defined types into placeholder hints using a planner which may not be in a valid state. This could result in a nil-pointer panic. I don't actually know how to trigger this from a driver but there's evidence that it's possible. It's easy enough to hit using SQL if the previous commit were not here. Fixes cockroachdb#64975 Release note (bug fix): Fixed a bug which could cause a panic when issuing a query referencing a user-defined type as a placeholder.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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/2392749777/?referrer=webhooks_plugin
Panic message:
Stacktrace (expand for inline code snippets):
cockroach/pkg/sql/conn_executor.go
Lines 505 to 507 in c9d5466
/usr/local/go/src/runtime/panic.go#L678-L680 in runtime.gopanic
/usr/local/go/src/runtime/panic.go#L198-L200 in runtime.panicmem
/usr/local/go/src/runtime/signal_unix.go#L393-L395 in runtime.sigpanic
/usr/local/go/src/sync/mutex.go#L73-L75 in sync.(*Mutex).Lock
cockroach/pkg/kv/txn.go
Lines 284 to 286 in c9d5466
cockroach/pkg/sql/catalog/descs/collection.go
Lines 949 to 951 in c9d5466
cockroach/pkg/sql/catalog/descs/collection.go
Lines 1405 to 1407 in c9d5466
cockroach/pkg/sql/resolver.go
Lines 259 to 261 in c9d5466
cockroach/pkg/sql/resolver.go
Lines 313 to 315 in c9d5466
cockroach/pkg/sql/conn_executor_prepare.go
Lines 67 to 69 in c9d5466
cockroach/pkg/sql/conn_executor.go
Lines 1550 to 1552 in c9d5466
cockroach/pkg/sql/conn_executor.go
Lines 1390 to 1392 in c9d5466
cockroach/pkg/sql/conn_executor.go
Lines 507 to 509 in c9d5466
cockroach/pkg/sql/pgwire/conn.go
Lines 625 to 627 in c9d5466
/usr/local/go/src/runtime/asm_amd64.s#L1356-L1358 in runtime.goexit
v20.2.9
The text was updated successfully, but these errors were encountered: