-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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: v20.2.0: nil pointer panic in FilterDescriptorState #57639
Comments
Tentatively assigning @postamar - this could be a good entrance point into some new parts of the code. |
Hey, based on dates and database version I think it was our database that triggered the duplicate issue above #57779. It seems like trying to query all but migration tables in the database causes this exception. Let me know if there is any way we can help resolve this issue. Also is there any way to fix this at the moment without downgrading the cluster? |
@jordanlewis Hi, any comment on the above? We'd like to start recovery steps for this database, so not planning to leave it in this state for too much longer. Also, any indication what causes this issue? |
cc @cockroachdb/sql-schema |
I believe I've identified the cause of the problem. Affected versions are v20.2.x. I submitted a PR targeting the Sorry for taking so long on this. |
Previously, catalog.FilterDescriptorState was sometimes called with a nil descriptor interface. This patch fixes this. This bug only affects v20.2.x. Fixes cockroachdb#57639. Release note (bug fix): Fixed a nil pointer panic bug involving catalog.FilterDescriptorState. This bug affected version 20.2 since v20.2.0.
Previously, catalog.FilterDescriptorState was sometimes called with a nil descriptor interface. This patch fixes this. This bug only affects v20.2.x. Fixes cockroachdb#57639. Release note (bug fix): Fixed a nil pointer panic bug involving catalog.FilterDescriptorState. This bug affected version 20.2 since v20.2.0.
In case it's of interest, this is how the issue manifests itself:
This particular database has 5 tables.. 3 of the 5 tables trigger the error. Other databases & tables in the same cluster don't exhibit the issue. Version:
|
Hi @nick-jones, thanks for that information. Was the database that's having problems created on a different cluster version than the others? Or is there anything else special about it that you're aware of? It would be helpful if you could send us a debug zip. This will contain some sensitive information (metadata), so you can send it to us at [email protected] if you'd prefer to not attach it to this issue. |
Previously, catalog.FilterDescriptorState was sometimes called with a nil descriptor interface. This patch fixes this. This bug only affects v20.2.x. Fixes cockroachdb#57639. Release note (bug fix): Fixed a nil pointer panic bug involving catalog.FilterDescriptorState. This bug affected version 20.2 since v20.2.0.
We cannot think of anything particularly unusual about this database. We're not sure if it was created against a different cluster version, unfortunately.
No problem, I've emailed it over 👍 |
Previously, catalog.FilterDescriptorState was sometimes called with a nil descriptor interface. This patch fixes this. This bug only affects v20.2.x. Fixes cockroachdb#57639. Release note (bug fix): Fixed a nil pointer panic bug involving catalog.FilterDescriptorState. This bug affected version 20.2 since v20.2.0.
Previously, catalog.FilterDescriptorState was sometimes called with a nil descriptor interface. This patch fixes this. This bug only affects v20.2.x. Fixes cockroachdb#57639. Release note (bug fix): Fixed a nil pointer panic bug involving catalog.FilterDescriptorState. This bug affected version 20.2 since v20.2.0.
The panic was fixed in #58998. The root cause of the descriptor corruption is unclear. There are pairs of doctor errors like this:
This points to a truncate-related bug (in the old implementation). There's no We don't have any further information to act on, so I'm closing this, but if we see something similar again we can compare. |
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/2077312662/?referrer=webhooks_plugin
Panic message:
Stacktrace (expand for inline code snippets):
cockroach/pkg/util/errorutil/catch.go
Lines 28 to 30 in 150c591
cockroach/pkg/sql/opt/optbuilder/builder.go
Lines 164 to 166 in 150c591
/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
cockroach/pkg/sql/catalog/descriptor.go
Lines 200 to 202 in 150c591
cockroach/pkg/sql/catalog/catalogkv/physical_accessor.go
Lines 319 to 321 in 150c591
cockroach/pkg/sql/catalog/descs/collection.go
Lines 782 to 784 in 150c591
cockroach/pkg/sql/catalog/descs/collection.go
Lines 859 to 861 in 150c591
cockroach/pkg/sql/catalog/descs/collection.go
Lines 759 to 761 in 150c591
cockroach/pkg/sql/catalog/accessors/physical_schema_accessors.go
Lines 131 to 133 in 150c591
cockroach/pkg/sql/catalog/accessors/logical_schema_accessors.go
Lines 135 to 137 in 150c591
cockroach/pkg/sql/resolver.go
Lines 208 to 210 in 150c591
cockroach/pkg/sql/sem/tree/name_resolution.go
Lines 301 to 303 in 150c591
cockroach/pkg/sql/catalog/resolver/resolver.go
Lines 152 to 154 in 150c591
cockroach/pkg/sql/catalog/resolver/resolver.go
Lines 89 to 91 in 150c591
cockroach/pkg/sql/opt_catalog.go
Lines 206 to 208 in 150c591
cockroach/pkg/sql/opt/optbuilder/util.go
Lines 585 to 587 in 150c591
cockroach/pkg/sql/opt/optbuilder/select.go
Lines 109 to 111 in 150c591
cockroach/pkg/sql/opt/optbuilder/select.go
Lines 58 to 60 in 150c591
cockroach/pkg/sql/opt/optbuilder/select.go
Lines 1218 to 1220 in 150c591
cockroach/pkg/sql/opt/optbuilder/select.go
Lines 1195 to 1197 in 150c591
cockroach/pkg/sql/opt/optbuilder/select.go
Lines 1122 to 1124 in 150c591
cockroach/pkg/sql/opt/optbuilder/select.go
Lines 1043 to 1045 in 150c591
cockroach/pkg/sql/opt/optbuilder/select.go
Lines 991 to 993 in 150c591
cockroach/pkg/sql/opt/optbuilder/select.go
Lines 964 to 966 in 150c591
cockroach/pkg/sql/opt/optbuilder/with.go
Lines 28 to 30 in 150c591
cockroach/pkg/sql/opt/optbuilder/select.go
Lines 963 to 965 in 150c591
cockroach/pkg/sql/opt/optbuilder/select.go
Lines 295 to 297 in 150c591
cockroach/pkg/sql/opt/optbuilder/select.go
Lines 127 to 129 in 150c591
cockroach/pkg/sql/opt/optbuilder/select.go
Lines 58 to 60 in 150c591
cockroach/pkg/sql/opt/optbuilder/select.go
Lines 1218 to 1220 in 150c591
v20.2.0
The text was updated successfully, but these errors were encountered: