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/tests: TestRandomSyntaxGeneration failed [unhandled kind: 0] #133913

Closed
cockroach-teamcity opened this issue Oct 31, 2024 · 4 comments · Fixed by #135149
Closed

sql/tests: TestRandomSyntaxGeneration failed [unhandled kind: 0] #133913

cockroach-teamcity opened this issue Oct 31, 2024 · 4 comments · Fixed by #135149
Assignees
Labels
branch-master Failures and bugs on the master branch. branch-release-23.2 Used to mark GA and release blockers, technical advisories, and bugs for 23.2 branch-release-24.1 Used to mark GA and release blockers, technical advisories, and bugs for 24.1 branch-release-24.2 Used to mark GA and release blockers, technical advisories, and bugs for 24.2 branch-release-24.3 Used to mark GA and release blockers, technical advisories, and bugs for 24.3 C-test-failure Broken test (automatically or manually discovered). O-robot Originated from a bot. P-2 Issues/test failures with a fix SLA of 3 months T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)

Comments

@cockroach-teamcity
Copy link
Member

cockroach-teamcity commented Oct 31, 2024

sql/tests.TestRandomSyntaxGeneration failed with artifacts on master @ becbd0fcdfa2e37a6ff23b33af70f2f91eca0790:

Random syntax error:

    rsg_test.go:962: Crash detected: server panic: pq: internal error: building declarative schema change targets for DROP SCHEMA: unhandled kind: 0

Query:

        DROP SCHEMA IF EXISTS ident , ident . PUBLIC , WORK , POLYGON . ident RESTRICT;
Help

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

Same failure on other branches

/cc @cockroachdb/sql-foundations

This test on roachdash | Improve this report!

Jira issue: CRDB-43820

@cockroach-teamcity cockroach-teamcity added branch-master Failures and bugs on the master branch. C-test-failure Broken test (automatically or manually discovered). O-robot Originated from a bot. release-blocker Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked. T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) labels Oct 31, 2024
@rafiss rafiss changed the title sql/tests: TestRandomSyntaxGeneration failed sql/tests: TestRandomSyntaxGeneration failed [unhandled kind: 0] Oct 31, 2024
@rafiss rafiss removed the release-blocker Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked. label Oct 31, 2024
@exalate-issue-sync exalate-issue-sync bot added the P-2 Issues/test failures with a fix SLA of 3 months label Nov 5, 2024
@cockroach-teamcity
Copy link
Member Author

sql/tests.TestRandomSyntaxGeneration failed with artifacts on master @ 688e82e8d015350fe3aa263484416d28b232a25d:

Random syntax error:

    rsg_test.go:962: Crash detected: server panic: pq: internal error: building declarative schema change targets for DROP SCHEMA: unhandled kind: 0

Query:

        DROP SCHEMA IF EXISTS RANGE . VIRTUAL_CLUSTER , PUBLIC;
Help

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

Same failure on other branches

This test on roachdash | Improve this report!

@cockroach-teamcity
Copy link
Member Author

sql/tests.TestRandomSyntaxGeneration failed with artifacts on master @ 8f5366d09e6cf2144ca43f9cdda7e1128a13fbf8:

Random syntax error:

    rsg_test.go:962: Crash detected: server panic: pq: internal error: building declarative schema change targets for DROP SCHEMA: unhandled kind: 0

Query:

        DROP SCHEMA IF EXISTS BOOLEAN . ident , PUBLIC , CHARACTERISTICS . ident , GROUPS . OWNED , TIME . INTERVAL CASCADE;
Help

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

Same failure on other branches

This test on roachdash | Improve this report!

craig bot pushed a commit that referenced this issue Nov 11, 2024
133840: apiutil, roachpb: create utilities to map descriptors to ranges r=angles-n-daemons a=angles-n-daemons

apiutil, roachpb: create utilities to map descriptors to ranges

Previously each range correlated to a single table, or even a single
index in a database, so all that was required to identify which tables,
indexes were in the range were to look at the start key of the range and
map it accordingly.

With range coalescing however, it's possible for one, or many tables,
indexes and the like to reside within the same range. To properly
identify the contents of a range, this PR adds the following utilities:

 1. A utility function which turns a range into a span, and clamps it
		to its tenant's table space.
 2. A utility function which takes the above spans and uses the catalog
		and new descriptor by span utility to turn those spans into a set of
		table descriptors ordered by id.
 3. A utility function which transforms those table descriptors into a
		set of (database, table, index) names which deduplicate and identify
		each index uniquely.
 4. A utility function, which merges the ranges and indexes into a map
		keyed by RangeID whose values are the above index names.
 5. A primary entrypoint for consumers from which a set of ranges can be
		passed in and a mapping from those ranges to indexes can be
		returned.

A variety of caveats come with this approach. It attempts to scan the
desrciptors all at once, but it still will scan a sizable portion of the
descriptors table if the request is large enough. This makes no attempt
to describe system information which does not have a descriptor. It will
describe system tables which appear in the descriptors table, but it
will not try to explain "tables" which do not have descriptors (example
tsdb), or any other information stored in the keyspace without a
descriptor (PseudoTableIDs, GossipKeys for example).

Throughout this work, many existing utilities were duplicated, and then
un-duplicated (`keys.TableDataMin`, `roachpb.Span.Overlap`, etc). If you
see anything that seems to already exist, feel free to point it out
accordingly.

Epic: CRDB-43151
Fixes: #130997

Release note: None

134748: storage: propagate KeySchemas to debug tools r=RaduBerinde a=jbowens

Ensure the `cockroach debug pebble ...` debug CLI tools can understand sstables with columnar blocks by propagating the CockroachDB KeySchema to the tool.

Epic: none
Release note: none

134770: sql/tests: include error with full stack trace in RSG tests r=rafiss a=rafiss

informs #133913
informs #134280
informs #133510
informs #134752
Release note: None

Co-authored-by: Brian Dillmann <[email protected]>
Co-authored-by: Jackson Owens <[email protected]>
Co-authored-by: Rafi Shamim <[email protected]>
@cockroach-teamcity
Copy link
Member Author

sql/tests.TestRandomSyntaxGeneration failed with artifacts on master @ 1759878c80e15663634321a45efdcb52490b3e46:

*   | 	pkg/sql/sem/tree/type_check.go:355
*   | github.com/cockroachdb/cockroach/pkg/sql.(*planner).analyzeExpr
*   | 	pkg/sql/analyze_expr.go:34
*   | github.com/cockroachdb/cockroach/pkg/sql.(*planner).planTenantSpec
*   | 	pkg/sql/tenant_spec.go:63
*   | github.com/cockroachdb/cockroach/pkg/sql.(*planner).LookupTenantInfo
*   | 	pkg/sql/tenant_spec.go:148
*   | github.com/cockroachdb/cockroach/pkg/ccl/crosscluster/physical.alterReplicationJobHook.func1
*   | 	pkg/ccl/crosscluster/physical/alter_replication_job.go:220
*   | github.com/cockroachdb/cockroach/pkg/sql.(*hookFnNode).startExec.func1
*   | 	pkg/sql/planhook.go:194
*   | github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunAsyncTaskEx.func2
*   | 	pkg/util/stop/stopper.go:498
*   | runtime.goexit
*   | 	src/runtime/asm_amd64.s:1695
* 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
*
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?

goroutine 1766593 [running]:
github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).recover(0x454aa5?, {0x896b670, 0xc013b8d350})
	pkg/util/stop/stopper.go:226 +0x65
panic({0x6976880?, 0xc01caabf20?})
	GOROOT/src/runtime/panic.go:770 +0x132
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.typeAnnotation.assertTyped(...)
	pkg/sql/sem/tree/expr.go:148
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.(*Subquery).TypeCheck(0xc013b8c9f0?, {0xd188020?, 0xc013b8c9f0?}, 0xc00da0aa98?, 0x99fa37?)
	pkg/sql/sem/tree/type_check.go:1754 +0xd3
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.(*ArrayFlatten).TypeCheck(0xc020def980, {0x896b670?, 0xc013b8d350?}, 0x896b670?, 0xe80000c02d470f30?)
	pkg/sql/sem/tree/type_check.go:1934 +0x46
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.TypeCheck({0x896b670?, 0xc013b8d350?}, {0x896c4e0?, 0xc020def980?}, 0x70596d8?, 0xc0016876b0?)
	pkg/sql/sem/tree/type_check.go:345 +0x8a
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.TypeCheckAndRequire({0x896b670?, 0xc013b8d350?}, {0x896c4e0?, 0xc020def980?}, 0xc00da0ac00?, 0xca14aa0, {0x711e66c, 0x21})
	pkg/sql/sem/tree/type_check.go:355 +0x54
github.com/cockroachdb/cockroach/pkg/sql.(*planner).analyzeExpr(0xc027eb26b8, {0x896b670, 0xc013b8d350}, {0x896c4e0?, 0xc020def980?}, {{0x0, 0x0, 0x0}, {0x0, 0x0}}, ...)
	pkg/sql/analyze_expr.go:34 +0xaf
github.com/cockroachdb/cockroach/pkg/sql.(*planner).planTenantSpec(0xc013b8d350?, {0x896b670?, 0xc013b8d350?}, 0x1e?, {0x711e66c?, 0x4000000000000000?})
	pkg/sql/tenant_spec.go:63 +0x190
github.com/cockroachdb/cockroach/pkg/sql.(*planner).LookupTenantInfo(0xc027eb26b8, {0x896b670, 0xc013b8d350}, 0x8948de0?, {0x711e66c?, 0xc00da0ae10?})
	pkg/sql/tenant_spec.go:148 +0x27
github.com/cockroachdb/cockroach/pkg/ccl/crosscluster/physical.alterReplicationJobHook.func1({0x896b670, 0xc013b8d350}, {0xc006353450?, 0xc00da0ae90?, 0xd64e94?}, 0xc00b2dc360)
	pkg/ccl/crosscluster/physical/alter_replication_job.go:220 +0x159
github.com/cockroachdb/cockroach/pkg/sql.(*hookFnNode).startExec.func1({0x896b670, 0xc013b8d350})
	pkg/sql/planhook.go:194 +0x4a
github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunAsyncTaskEx.func2({0x70bb649?, 0x0?})
	pkg/util/stop/stopper.go:498 +0x1f0
created by github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunAsyncTaskEx in goroutine 1762144
	pkg/util/stop/stopper.go:488 +0x49c
Help

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

Same failure on other branches

This test on roachdash | Improve this report!

Copy link

blathers-crl bot commented Nov 14, 2024

Based on the specified backports for linked PR #135149, I applied the following new label(s) to this issue: branch-release-23.2, branch-release-24.1, branch-release-24.2, branch-release-24.3. Please adjust the labels as needed to match the branches actually affected by this issue, including adding any known older branches.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@blathers-crl blathers-crl bot added branch-release-24.1 Used to mark GA and release blockers, technical advisories, and bugs for 24.1 branch-release-23.2 Used to mark GA and release blockers, technical advisories, and bugs for 23.2 labels Nov 14, 2024
@blathers-crl blathers-crl bot added branch-release-24.2 Used to mark GA and release blockers, technical advisories, and bugs for 24.2 branch-release-24.3 Used to mark GA and release blockers, technical advisories, and bugs for 24.3 labels Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch-master Failures and bugs on the master branch. branch-release-23.2 Used to mark GA and release blockers, technical advisories, and bugs for 23.2 branch-release-24.1 Used to mark GA and release blockers, technical advisories, and bugs for 24.1 branch-release-24.2 Used to mark GA and release blockers, technical advisories, and bugs for 24.2 branch-release-24.3 Used to mark GA and release blockers, technical advisories, and bugs for 24.3 C-test-failure Broken test (automatically or manually discovered). O-robot Originated from a bot. P-2 Issues/test failures with a fix SLA of 3 months T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants