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.16k stars 3.82k forks source link

pkg/ccl/testccl/sqlccl/sqlccl_test: TestShowCreateRedactableValues failed #135880

Closed cockroach-teamcity closed 36 minutes ago

cockroach-teamcity commented 15 hours ago

pkg/ccl/testccl/sqlccl/sqlccl_test.TestShowCreateRedactableValues failed with artifacts on release-23.1 @ 2ee70ad63870ea3b44cb8593d0ac84d379547fc6:

Fatal error:

panic: ReturnType called on TypedExpr with empty typeAnnotation. Was the underlying Expr type-checked before asserting a type of TypedExpr? [recovered]
    panic: ReturnType called on TypedExpr with empty typeAnnotation. Was the underlying Expr type-checked before asserting a type of TypedExpr?

Stack:

goroutine 7554534 [running]:
github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).recover(0xc003ab09e8?, {0x74da100, 0xc01569d950})
    github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:224 +0x6a
panic({0x58e2520, 0xc00bb8a190})
    GOROOT/src/runtime/panic.go:884 +0x212
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.typeAnnotation.assertTyped(...)
    github.com/cockroachdb/cockroach/pkg/sql/sem/tree/expr.go:148
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.(*Subquery).TypeCheck(0xc006f30370?, {0x74f8748?, 0xc01186a2d0?}, 0xc00c330180?, 0x74ac2d0?)
    github.com/cockroachdb/cockroach/pkg/sql/sem/tree/type_check.go:1501 +0xe5
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.(*CastExpr).TypeCheck(0xc01186a330, {0x74da100, 0xc01569d950}, 0xc006f30358, 0x0?)
    github.com/cockroachdb/cockroach/pkg/sql/sem/tree/type_check.go:581 +0x268
github.com/cockroachdb/cockroach/pkg/sql/catalog/schemaexpr.deserializeExprForFormatting({0x74da100, 0xc01569d950}, {0x75ad580, 0xc00a889900}, {0xc012664880?, 0x40?}, 0xc012664880?, 0x48000)
    github.com/cockroachdb/cockroach/pkg/sql/catalog/schemaexpr/expr.go:334 +0xd6
github.com/cockroachdb/cockroach/pkg/sql/catalog/schemaexpr.formatExprForDisplayImpl({0x74da100, 0xc01569d950}, {0x75ad580?, 0xc00a889900?}, {0xc012664880?, 0xc005351936?}, 0x55480c0?, 0xc00cea8000, 0x465166?, 0x0)
    github.com/cockroachdb/cockroach/pkg/sql/catalog/schemaexpr/expr.go:289 +0x6b
github.com/cockroachdb/cockroach/pkg/sql/catalog/schemaexpr.FormatExprForDisplay(...)
    github.com/cockroachdb/cockroach/pkg/sql/catalog/schemaexpr/expr.go:246
github.com/cockroachdb/cockroach/pkg/sql.formatViewQueryTypesForDisplay.func1({0x74f7b40?, 0xc001291ad0})
    github.com/cockroachdb/cockroach/pkg/sql/show_create_clauses.go:266 +0x165
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.(*simpleVisitor).VisitPre(0xc000d10df8, {0x74f7b40, 0xc001291ad0})
    github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:2020 +0x46
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.WalkExpr({0x74ada68, 0xc000d10df8}, {0x74f7b40?, 0xc001291ad0})
    github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:826 +0x5a
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.(*ComparisonExpr).Walk(0xc008163e50, {0x74ada68, 0xc000d10df8})
    github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:186 +0x3d
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.WalkExpr({0x74ada68, 0xc000d10df8}, {0x74f7c58?, 0xc008163e50})
    github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:829 +0x77
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.(*ParenExpr).Walk(0xc013631f80, {0x74ada68?, 0xc000d10df8?})
    github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:484 +0x3c
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.WalkExpr({0x74ada68, 0xc000d10df8}, {0x74f85c0?, 0xc013631f80})
    github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:829 +0x77
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.(*AndExpr).Walk(0xc001291f80, {0x74ada68, 0xc000d10df8})
    github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:39 +0x3c
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.WalkExpr({0x74ada68, 0xc000d10df8}, {0x74f79f0?, 0xc001291f80})
    github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:829 +0x77
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.(*ParenExpr).Walk(0xc013631fb0, {0x74ada68?, 0xc000d10df8?})
    github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:484 +0x3c
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.WalkExpr({0x74ada68, 0xc000d10df8}, {0x74f85c0?, 0xc013631fb0})
    github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:829 +0x77
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.(*SelectClause).walkStmt(0xc0037805a0, {0x74ada68, 0xc000d10df8})
    github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:1717 +0x135
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.walkStmt({0x74ada68, 0xc000d10df8}, {0x75062e0?, 0xc0037805a0})
    github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:2005 +0x5d
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.(*Select).walkStmt(0xc00a5ba050, {0x74ada68, 0xc000d10df8})
    github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:1621 +0x7d
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.walkStmt({0x74ada68, 0xc000d10df8}, {0x75062a0?, 0xc00a5ba050})
    github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:2005 +0x5d
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.SimpleStmtVisit({0x75062a0, 0xc00a5ba050}, 0xc013b01a80)
    github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:2052 +0x85
github.com/cockroachdb/cockroach/pkg/sql.formatViewQueryTypesForDisplay({0x74da100?, 0xc01569d950}, 0xc006f30358, 0xc00cea8000, {0x75ad580?, 0xc00a889900})
    github.com/cockroachdb/cockroach/pkg/sql/show_create_clauses.go:285 +0x1d6
github.com/cockroachdb/cockroach/pkg/sql.formatViewQueryForDisplay({0x74da100, 0xc01569d950}, 0xc00a47acc0?, 0x203004?, {0x75ad580, 0xc00a889900}, {0x60, 0x4, 0x0, 0x1, ...})
    github.com/cockroachdb/cockroach/pkg/sql/show_create_clauses.go:170 +0x192
github.com/cockroachdb/cockroach/pkg/sql.ShowCreateView({0x74da100, 0xc01569d950}, 0xc003ab1838?, 0x46121d?, 0x5e1e400?, {0x75ad580, 0xc00a889900}, 0x0)
    github.com/cockroachdb/cockroach/pkg/sql/show_create_clauses.go:139 +0x29f
github.com/cockroachdb/cockroach/pkg/sql.glob..func67({0x74da100, 0xc01569d950}, 0xc006f2ffc0, {{0xc01396bd70?, 0x65?}}, {0x757bac0, 0xc00473d4a0}, {0x75795b8, 0xc01186c000}, {0x75ad580, ...}, ...)
    github.com/cockroachdb/cockroach/pkg/sql/crdb_internal.go:3477 +0x48d
github.com/cockroachdb/cockroach/pkg/sql.makeAllRelationsVirtualTableWithDescriptorIDIndex.func1.1({0x757bac0?, 0xc00473d4a0?}, {0x75795b8?, 0xc01186c000?}, {0x75ad580?, 0xc00a889900?}, 0xc00473d4a0?)
    github.com/cockroachdb/cockroach/pkg/sql/pg_catalog.go:1165 +0xcf
github.com/cockroachdb/cockroach/pkg/sql.forEachTableDescWithTableLookupInternalFromDescriptors({0x74da100, 0xc01569d950}, 0xc006f2ffc0, {0x757bac0, 0xc003e76c60}, 0x1, 0x0?, {{0xc00e8ccba0}, {0xc00e8ccec0}, 0x5c70d}, ...)
    github.com/cockroachdb/cockroach/pkg/sql/information_schema.go:2662 +0x5a3
github.com/cockroachdb/cockroach/pkg/sql.forEachTableDescWithTableLookupInternal({0x74da100, 0xc01569d950}, 0xc006f2ffc0, {0x757bac0?, 0xc003e76c60}, 0x7feb4ee56818?, 0x40?, 0x7feb79c25f18?)
    github.com/cockroachdb/cockroach/pkg/sql/information_schema.go:2535 +0x145
github.com/cockroachdb/cockroach/pkg/sql.forEachTableDescWithTableLookup(...)
    github.com/cockroachdb/cockroach/pkg/sql/information_schema.go:2506
github.com/cockroachdb/cockroach/pkg/sql.makeAllRelationsVirtualTableWithDescriptorIDIndex.func1({0x74da100, 0xc01569d950}, 0xc006f2ffc0, {0x757bac0, 0xc003e76c60}, 0xc002fb4ac0)
    github.com/cockroachdb/cockroach/pkg/sql/pg_catalog.go:1163 +0x125
github.com/cockroachdb/cockroach/pkg/sql.(*virtualDefEntry).getPlanInfo.func1.1({0x74da100, 0xc01569d950}, {0x749e980?, 0xc0117077a0})
    github.com/cockroachdb/cockroach/pkg/sql/virtual_schema.go:677 +0x196
github.com/cockroachdb/cockroach/pkg/sql.setupGenerator.func3({0x74da100, 0xc01569d950})
    github.com/cockroachdb/cockroach/pkg/sql/virtual_table.go:122 +0x114
github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunAsyncTaskEx.func2()
    github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:465 +0x146
created by github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunAsyncTaskEx
    github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:456 +0x43b
Log preceding fatal error

``` * | github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:826 * | github.com/cockroachdb/cockroach/pkg/sql/sem/tree.(*ComparisonExpr).Walk * | github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:186 * | github.com/cockroachdb/cockroach/pkg/sql/sem/tree.WalkExpr * | github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:829 * | github.com/cockroachdb/cockroach/pkg/sql/sem/tree.(*ParenExpr).Walk * | github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:484 * | github.com/cockroachdb/cockroach/pkg/sql/sem/tree.WalkExpr * | github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:829 * | github.com/cockroachdb/cockroach/pkg/sql/sem/tree.(*AndExpr).Walk * | github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:39 * | github.com/cockroachdb/cockroach/pkg/sql/sem/tree.WalkExpr * | github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:829 * | github.com/cockroachdb/cockroach/pkg/sql/sem/tree.(*ParenExpr).Walk * | github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:484 * | github.com/cockroachdb/cockroach/pkg/sql/sem/tree.WalkExpr * | github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:829 * | github.com/cockroachdb/cockroach/pkg/sql/sem/tree.(*SelectClause).walkStmt * | github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:1717 * | github.com/cockroachdb/cockroach/pkg/sql/sem/tree.walkStmt * | github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:2005 * | github.com/cockroachdb/cockroach/pkg/sql/sem/tree.(*Select).walkStmt * | github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:1621 * | github.com/cockroachdb/cockroach/pkg/sql/sem/tree.walkStmt * | github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:2005 * | github.com/cockroachdb/cockroach/pkg/sql/sem/tree.SimpleStmtVisit * | github.com/cockroachdb/cockroach/pkg/sql/sem/tree/walk.go:2052 * | github.com/cockroachdb/cockroach/pkg/sql.formatViewQueryTypesForDisplay * | github.com/cockroachdb/cockroach/pkg/sql/show_create_clauses.go:285 * | github.com/cockroachdb/cockroach/pkg/sql.formatViewQueryForDisplay * | github.com/cockroachdb/cockroach/pkg/sql/show_create_clauses.go:170 * | github.com/cockroachdb/cockroach/pkg/sql.ShowCreateView * | github.com/cockroachdb/cockroach/pkg/sql/show_create_clauses.go:139 * | github.com/cockroachdb/cockroach/pkg/sql.glob..func67 * | github.com/cockroachdb/cockroach/pkg/sql/crdb_internal.go:3477 * | github.com/cockroachdb/cockroach/pkg/sql.makeAllRelationsVirtualTableWithDescriptorIDIndex.func1.1 * | github.com/cockroachdb/cockroach/pkg/sql/pg_catalog.go:1165 * | github.com/cockroachdb/cockroach/pkg/sql.forEachTableDescWithTableLookupInternalFromDescriptors * | github.com/cockroachdb/cockroach/pkg/sql/information_schema.go:2662 * | github.com/cockroachdb/cockroach/pkg/sql.forEachTableDescWithTableLookupInternal * | github.com/cockroachdb/cockroach/pkg/sql/information_schema.go:2535 * | github.com/cockroachdb/cockroach/pkg/sql.forEachTableDescWithTableLookup * | github.com/cockroachdb/cockroach/pkg/sql/information_schema.go:2506 * | github.com/cockroachdb/cockroach/pkg/sql.makeAllRelationsVirtualTableWithDescriptorIDIndex.func1 * | github.com/cockroachdb/cockroach/pkg/sql/pg_catalog.go:1163 * | github.com/cockroachdb/cockroach/pkg/sql.(*virtualDefEntry).getPlanInfo.func1.1 * | github.com/cockroachdb/cockroach/pkg/sql/virtual_schema.go:677 * Wraps: (4) ReturnType called on TypedExpr with empty typeAnnotation. Was the underlying Expr type-checked before asserting a type of TypedExpr? * Error types: (1) *withstack.withStack (2) *assert.withAssertionFailure (3) *withstack.withStack (4) *errutil.leafError * ```

Parameters:

See also: How To Investigate a Go Test Failure (internal)

This test on roachdash | Improve this report!

Jira issue: CRDB-44765

yuzefovich commented 36 minutes ago

dup of #112750