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 [ALTER TENANT (SELECT 'foo') START REPLICATION ... immediately crashes the database process] #136339

Closed
cockroach-teamcity opened this issue Nov 28, 2024 · 3 comments · Fixed by #136683
Assignees
Labels
A-disaster-recovery branch-master Failures and bugs on the master branch. 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. release-blocker Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked. T-disaster-recovery

Comments

@cockroach-teamcity
Copy link
Member

cockroach-teamcity commented Nov 28, 2024

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

*   | 	pkg/sql/sem/tree/type_check.go:345
*   | github.com/cockroachdb/cockroach/pkg/sql/sem/tree.TypeCheckAndRequire
*   | 	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 1330694 [running]:
github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).recover(0x454aa5?, {0x89cace8, 0xc00cac0e70})
	pkg/util/stop/stopper.go:226 +0x65
panic({0x69852e0?, 0xc00c0ab010?})
	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(0x42e198?, {0x0?, 0x0?}, 0x0?, 0x8f00000000000000?)
	pkg/sql/sem/tree/type_check.go:1764 +0xd3
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.TypeCheck({0x89cace8?, 0xc00cac0e70?}, {0x89cbb90?, 0xc00cac06f0?}, 0x706dda6?, 0xc001518660?)
	pkg/sql/sem/tree/type_check.go:345 +0x8a
github.com/cockroachdb/cockroach/pkg/sql/sem/tree.TypeCheckAndRequire({0x89cace8?, 0xc00cac0e70?}, {0x89cbb90?, 0xc00cac06f0?}, 0xc004b92c00?, 0xca8d740, {0x71334f7, 0x21})
	pkg/sql/sem/tree/type_check.go:355 +0x54
github.com/cockroachdb/cockroach/pkg/sql.(*planner).analyzeExpr(0xc00d434138, {0x89cace8, 0xc00cac0e70}, {0x89cbb90?, 0xc00cac06f0?}, {{0x0, 0x0, 0x0}, {0x0, 0x0}}, ...)
	pkg/sql/analyze_expr.go:34 +0xaf
github.com/cockroachdb/cockroach/pkg/sql.(*planner).planTenantSpec(0xc00cac0e70?, {0x89cace8?, 0xc00cac0e70?}, 0x1e?, {0x71334f7?, 0x4000000000000000?})
	pkg/sql/tenant_spec.go:63 +0x190
github.com/cockroachdb/cockroach/pkg/sql.(*planner).LookupTenantInfo(0xc00d434138, {0x89cace8, 0xc00cac0e70}, 0x89a81c0?, {0x71334f7?, 0xc004b92e10?})
	pkg/sql/tenant_spec.go:148 +0x27
github.com/cockroachdb/cockroach/pkg/ccl/crosscluster/physical.alterReplicationJobHook.func1({0x89cace8, 0xc00cac0e70}, {0x30000c00610e640?, 0xc004b92e90?, 0xd61c74?}, 0xc031b05500)
	pkg/ccl/crosscluster/physical/alter_replication_job.go:220 +0x159
github.com/cockroachdb/cockroach/pkg/sql.(*hookFnNode).startExec.func1({0x89cace8, 0xc00cac0e70})
	pkg/sql/planhook.go:194 +0x4a
github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunAsyncTaskEx.func2({0x70d0130?, 0x0?})
	pkg/util/stop/stopper.go:498 +0x1f0
created by github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunAsyncTaskEx in goroutine 1327598
	pkg/util/stop/stopper.go:488 +0x47c
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-44975

@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 Nov 28, 2024
@rafiss rafiss changed the title sql/tests: TestRandomSyntaxGeneration failed sql/tests: TestRandomSyntaxGeneration failed [ALTER TENANT (SELECT 'foo') START REPLICATION ... immediately crashes the database process] Dec 2, 2024
@rafiss rafiss added T-disaster-recovery and removed T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) labels Dec 2, 2024
Copy link

blathers-crl bot commented Dec 2, 2024

cc @cockroachdb/disaster-recovery

@rafiss
Copy link
Collaborator

rafiss commented Dec 2, 2024

Repro on a fresh cluster with no other setup:

root@localhost:26257/defaultdb> ALTER TENANT (SELECT 'foo') START REPLICATION OF 'bar' ON 'baz' WITH RETENTION = '1s';
ERROR: unexpected EOF
warning: error retrieving the transaction status: connection closed unexpectedly: conn closed
warning: connection lost!
opening new connection: all session settings will be lost
warning: error retrieving the database name: failed to connect to `host=localhost user=root database=`: dial error (dial tcp [::1]:26257: connect: connection refused)

Copy link

blathers-crl bot commented Dec 4, 2024

Based on the specified backports for linked PR #136683, I applied the following new label(s) to this issue: 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.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 Dec 4, 2024
msbutler added a commit to msbutler/cockroach that referenced this issue Dec 4, 2024
msbutler added a commit to msbutler/cockroach that referenced this issue Dec 4, 2024
msbutler added a commit to msbutler/cockroach that referenced this issue Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-disaster-recovery branch-master Failures and bugs on the master branch. 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. release-blocker Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked. T-disaster-recovery
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants