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

internal/sqlsmith: TestGenerateParse failed #73901

Closed
cockroach-teamcity opened this issue Dec 16, 2021 · 4 comments · Fixed by #73954
Closed

internal/sqlsmith: TestGenerateParse failed #73901

cockroach-teamcity opened this issue Dec 16, 2021 · 4 comments · Fixed by #73954
Assignees
Labels
branch-master Failures and bugs on the master branch. C-test-failure Broken test (automatically or manually discovered). O-robot Originated from a bot. T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) T-sql-queries SQL Queries Team

Comments

@cockroach-teamcity
Copy link
Member

internal/sqlsmith.TestGenerateParse failed with artifacts on master @ dd7fd4e5a371ce4437fce383b9674cba2e212fe6:

	)
		AS tab_325
ORDER BY
	col_400 NULLS FIRST, col_401 NULLS FIRST;

    panic.go:1047: lookup for ComparisonExpr ((((tab_335.col_416)[??? tab_335.col_416]))[void] = (((tab_336.col_417)[??? tab_336.col_417]))[void])[bool]'s CmpOp failed
        goroutine 9919 [running]:
        runtime/debug.Stack()
        	GOROOT/src/runtime/debug/stack.go:24 +0x72
        github.com/cockroachdb/cockroach/pkg/util/leaktest.AfterTest.func1()
        	github.com/cockroachdb/cockroach/pkg/util/leaktest/leaktest.go:110 +0x94
        panic({0x69ca160, 0xc002a44780})
        	GOROOT/src/runtime/panic.go:1047 +0x266
        github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).Stop(0xc00167a2d0, {0xaf34300, 0xc0001c0028})
        	github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:551 +0x49a
        panic({0x69ca160, 0xc002a44780})
        	GOROOT/src/runtime/panic.go:1047 +0x266
        github.com/cockroachdb/cockroach/pkg/sql/sem/tree.(*ComparisonExpr).memoizeFn(0xc000a734f0)
        	github.com/cockroachdb/cockroach/pkg/sql/sem/tree/expr.go:613 +0x35f
        github.com/cockroachdb/cockroach/pkg/sql/sem/tree.NewTypedComparisonExpr({0x6632ce0, 0x1}, {0xaf6d3a8, 0xc0024e73c8}, {0xaf6d3a8, 0xc0024e73f8})
        	github.com/cockroachdb/cockroach/pkg/sql/sem/tree/expr.go:527 +0x1fb
        github.com/cockroachdb/cockroach/pkg/internal/sqlsmith.makeEquiJoinExpr(0xc002a9a000, {0x0, 0x0, 0x0}, 0x98)
        	github.com/cockroachdb/cockroach/pkg/internal/sqlsmith/relational.go:238 +0x376
        github.com/cockroachdb/cockroach/pkg/internal/sqlsmith.makeTableExpr(0xc002a9a000, {0x0, 0x0, 0x0}, 0x80)
        	github.com/cockroachdb/cockroach/pkg/internal/sqlsmith/relational.go:144 +0x15f
        github.com/cockroachdb/cockroach/pkg/internal/sqlsmith.makeEquiJoinExpr(0xc002a9a000, {0x0, 0x0, 0x0}, 0xa0)
        	github.com/cockroachdb/cockroach/pkg/internal/sqlsmith/relational.go:208 +0xd5
        github.com/cockroachdb/cockroach/pkg/internal/sqlsmith.makeTableExpr(0xc002a9a000, {0x0, 0x0, 0x0}, 0x75)
        	github.com/cockroachdb/cockroach/pkg/internal/sqlsmith/relational.go:144 +0x15f
        github.com/cockroachdb/cockroach/pkg/internal/sqlsmith.makeJoinExpr(0xc002a9a000, {0x0, 0x0, 0x0}, 0x5)
        	github.com/cockroachdb/cockroach/pkg/internal/sqlsmith/relational.go:179 +0x7d
        github.com/cockroachdb/cockroach/pkg/internal/sqlsmith.makeTableExpr(0xc002a9a000, {0x0, 0x0, 0x0}, 0xb8)
        	github.com/cockroachdb/cockroach/pkg/internal/sqlsmith/relational.go:144 +0x15f
        github.com/cockroachdb/cockroach/pkg/internal/sqlsmith.(*Smither).makeSelectClause(0xc002a9a000, {0x0, 0x0, 0x0}, {0x0, 0x0, 0x0}, {0x0, 0x0, 0x0})
        	github.com/cockroachdb/cockroach/pkg/internal/sqlsmith/relational.go:521 +0x316
        github.com/cockroachdb/cockroach/pkg/internal/sqlsmith.(*Smither).makeSelect(0x7fd177554280, {0x0, 0x0, 0x0}, {0x0, 0x0, 0x0})
        	github.com/cockroachdb/cockroach/pkg/internal/sqlsmith/relational.go:726 +0xce
        github.com/cockroachdb/cockroach/pkg/internal/sqlsmith.makeSelect(0xc002a9a000)
        	github.com/cockroachdb/cockroach/pkg/internal/sqlsmith/relational.go:679 +0x5a
        github.com/cockroachdb/cockroach/pkg/internal/sqlsmith.(*Smither).makeStmt(0xc002a9a000)
        	github.com/cockroachdb/cockroach/pkg/internal/sqlsmith/relational.go:20 +0x56
        github.com/cockroachdb/cockroach/pkg/internal/sqlsmith.(*Smither).Generate(0xaead320)
        	github.com/cockroachdb/cockroach/pkg/internal/sqlsmith/sqlsmith.go:158 +0x3d
        github.com/cockroachdb/cockroach/pkg/internal/sqlsmith.TestGenerateParse(0xc000b55ba0)
        	github.com/cockroachdb/cockroach/pkg/internal/sqlsmith/sqlsmith_test.go:184 +0x9db
        testing.tRunner(0xc000b55ba0, 0x74d1958)
        	GOROOT/src/testing/testing.go:1259 +0x230
        created by testing.(*T).Run
        	GOROOT/src/testing/testing.go:1306 +0x727
--- FAIL: TestGenerateParse (2.21s)
Help

See also: [How To Investigate a Go Test Failure \(internal\)](https://cockroachlabs.atlassian.net/l/c/HgfXfJgM)Parameters in this failure:

  • TAGS=bazel,gss

/cc @cockroachdb/sql-queries

This test on roachdash | Improve this report!

@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. labels Dec 16, 2021
@blathers-crl blathers-crl bot added the T-sql-queries SQL Queries Team label Dec 16, 2021
@cockroach-teamcity
Copy link
Member Author

internal/sqlsmith.TestGenerateParse failed with artifacts on master @ 150caaf45cf8633aca2e5d0ba7ef7bbc2a285efb:

			(ARRAY[e'\'':::STRING]),
			(ARRAY['y':::STRING]),
			(ARRAY[e'\x0b':::STRING, e'\x12':::STRING, 't':::STRING, e'\x00':::STRING]),
			(ARRAY[e'\'':::STRING])
	)
		AS tab_133 (col_203)
WHERE
	true
ORDER BY
	tab_133.col_203, tab_133.col_203 DESC, tab_133.col_203 ASC
LIMIT
	100:::INT8;

    panic.go:1038: lookup for ComparisonExpr ((((tab_141.col_215)[??? tab_141.col_215]))[void] = (((tab_144.col_221)[??? tab_144.col_221]))[void])[bool]'s CmpOp failed
        goroutine 11171 [running]:
        runtime/debug.Stack()
        	/usr/local/go/src/runtime/debug/stack.go:24 +0x65
        github.com/cockroachdb/cockroach/pkg/util/leaktest.AfterTest.func1()
        	/go/src/github.com/cockroachdb/cockroach/pkg/util/leaktest/leaktest.go:110 +0x11f
        panic({0x4714f20, 0xc00977eca0})
        	/usr/local/go/src/runtime/panic.go:1038 +0x215
        github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).Stop(0xc0016985a0, {0x62a36e0, 0xc000074108})
        	/go/src/github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:551 +0x325
        panic({0x4714f20, 0xc00977eca0})
        	/usr/local/go/src/runtime/panic.go:1038 +0x215
        github.com/cockroachdb/cockroach/pkg/sql/sem/tree.(*ComparisonExpr).memoizeFn(0xc003fc8730)
        	/go/src/github.com/cockroachdb/cockroach/pkg/sql/sem/tree/expr.go:613 +0x1da
        github.com/cockroachdb/cockroach/pkg/sql/sem/tree.NewTypedComparisonExpr({0x437eb60, 0x60}, {0x62dc500, 0xc0040a9b90}, {0x62dc500, 0xc0040a9bc0})
        	/go/src/github.com/cockroachdb/cockroach/pkg/sql/sem/tree/expr.go:527 +0xef
        github.com/cockroachdb/cockroach/pkg/internal/sqlsmith.makeEquiJoinExpr(0xc0042a48c0, {0x0, 0x0, 0x0}, 0x75)
        	/go/src/github.com/cockroachdb/cockroach/pkg/internal/sqlsmith/relational.go:238 +0x2c5
        github.com/cockroachdb/cockroach/pkg/internal/sqlsmith.makeTableExpr(0xc0042a48c0, {0x0, 0x0, 0x0}, 0x0)
        	/go/src/github.com/cockroachdb/cockroach/pkg/internal/sqlsmith/relational.go:144 +0xb0
        github.com/cockroachdb/cockroach/pkg/internal/sqlsmith.(*Smither).makeSelectClause(0xc0042a48c0, {0x0, 0x0, 0x0}, {0x0, 0x0, 0x0}, {0x0, 0x0, 0x0})
        	/go/src/github.com/cockroachdb/cockroach/pkg/internal/sqlsmith/relational.go:521 +0x276
        github.com/cockroachdb/cockroach/pkg/internal/sqlsmith.(*Smither).makeSelect(0x0, {0x0, 0x0, 0x0}, {0x0, 0x0, 0x0})
        	/go/src/github.com/cockroachdb/cockroach/pkg/internal/sqlsmith/relational.go:726 +0xb9
        github.com/cockroachdb/cockroach/pkg/internal/sqlsmith.makeSelect(0xc0042a48c0)
        	/go/src/github.com/cockroachdb/cockroach/pkg/internal/sqlsmith/relational.go:679 +0x45
        github.com/cockroachdb/cockroach/pkg/internal/sqlsmith.(*Smither).makeStmt(0xc0042a48c0)
        	/go/src/github.com/cockroachdb/cockroach/pkg/internal/sqlsmith/relational.go:20 +0x35
        github.com/cockroachdb/cockroach/pkg/internal/sqlsmith.(*Smither).Generate(0x621d260)
        	/go/src/github.com/cockroachdb/cockroach/pkg/internal/sqlsmith/sqlsmith.go:158 +0x31
        github.com/cockroachdb/cockroach/pkg/internal/sqlsmith.TestGenerateParse(0xc003c676c0)
        	/go/src/github.com/cockroachdb/cockroach/pkg/internal/sqlsmith/sqlsmith_test.go:184 +0x786
        testing.tRunner(0xc003c676c0, 0x5219fc0)
        	/usr/local/go/src/testing/testing.go:1259 +0x102
        created by testing.(*T).Run
        	/usr/local/go/src/testing/testing.go:1306 +0x35a
--- FAIL: TestGenerateParse (0.42s)
Help

See also: [How To Investigate a Go Test Failure \(internal\)](https://cockroachlabs.atlassian.net/l/c/HgfXfJgM)Parameters in this failure:

  • GOFLAGS=-parallel=4

This test on roachdash | Improve this report!

@cockroach-teamcity
Copy link
Member Author

internal/sqlsmith.TestGenerateParse failed with artifacts on master @ 150caaf45cf8633aca2e5d0ba7ef7bbc2a285efb:

				AS tab_341 (col_419)
		WHERE
			'G':::STRING::STRING SIMILAR TO 'F':::STRING::STRING
	)
		AS tab_342
ORDER BY
	col_420 NULLS FIRST;

I211216 13:12:14.271788 13204 2@rpc/context.go:743  [n1] 651  closing [{n1: 127.0.0.1:38897 (default)} {n0: 127.0.0.1:38897 (default)}]
    panic.go:1047: lookup for ComparisonExpr ((((tab_353.col_435)[??? tab_353.col_435]))[void] = (((tab_356.col_439)[??? tab_356.col_439]))[void])[bool]'s CmpOp failed
        goroutine 12019 [running]:
        runtime/debug.Stack()
        	/usr/local/go/src/runtime/debug/stack.go:24 +0x72
        github.com/cockroachdb/cockroach/pkg/util/leaktest.AfterTest.func1()
        	/go/src/github.com/cockroachdb/cockroach/pkg/util/leaktest/leaktest.go:110 +0x94
        panic({0x6989d60, 0xc0027daa60})
        	/usr/local/go/src/runtime/panic.go:1047 +0x266
        github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).Stop(0xc001266240, {0xaef6b40, 0xc0001c2008})
        	/go/src/github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:551 +0x49a
        panic({0x6989d60, 0xc0027daa60})
        	/usr/local/go/src/runtime/panic.go:1047 +0x266
        github.com/cockroachdb/cockroach/pkg/sql/sem/tree.(*ComparisonExpr).memoizeFn(0xc001725ef0)
        	/go/src/github.com/cockroachdb/cockroach/pkg/sql/sem/tree/expr.go:613 +0x35f
        github.com/cockroachdb/cockroach/pkg/sql/sem/tree.NewTypedComparisonExpr({0xdac6980, 0x1}, {0xaf2fbe8, 0xc0030d8720}, {0xaf2fbe8, 0xc0030d8750})
        	/go/src/github.com/cockroachdb/cockroach/pkg/sql/sem/tree/expr.go:527 +0x1fb
        github.com/cockroachdb/cockroach/pkg/internal/sqlsmith.makeEquiJoinExpr(0xc00228c3c0, {0x0, 0x0, 0x0}, 0x8)
        	/go/src/github.com/cockroachdb/cockroach/pkg/internal/sqlsmith/relational.go:238 +0x376
        github.com/cockroachdb/cockroach/pkg/internal/sqlsmith.makeTableExpr(0xc00228c3c0, {0x0, 0x0, 0x0}, 0x70)
        	/go/src/github.com/cockroachdb/cockroach/pkg/internal/sqlsmith/relational.go:144 +0x15f
        github.com/cockroachdb/cockroach/pkg/internal/sqlsmith.makeEquiJoinExpr(0xc00228c3c0, {0x0, 0x0, 0x0}, 0x60)
        	/go/src/github.com/cockroachdb/cockroach/pkg/internal/sqlsmith/relational.go:208 +0xd5
        github.com/cockroachdb/cockroach/pkg/internal/sqlsmith.makeTableExpr(0xc00228c3c0, {0x0, 0x0, 0x0}, 0x1)
        	/go/src/github.com/cockroachdb/cockroach/pkg/internal/sqlsmith/relational.go:144 +0x15f
        github.com/cockroachdb/cockroach/pkg/internal/sqlsmith.(*Smither).makeSelectClause(0xc00228c3c0, {0x0, 0x0, 0x0}, {0x0, 0x0, 0x0}, {0x0, 0x0, 0x0})
        	/go/src/github.com/cockroachdb/cockroach/pkg/internal/sqlsmith/relational.go:521 +0x316
        github.com/cockroachdb/cockroach/pkg/internal/sqlsmith.(*Smither).makeSelect(0x7f8b20b9bd30, {0x0, 0x0, 0x0}, {0x0, 0x0, 0x0})
        	/go/src/github.com/cockroachdb/cockroach/pkg/internal/sqlsmith/relational.go:726 +0xce
        github.com/cockroachdb/cockroach/pkg/internal/sqlsmith.makeSelect(0xc00228c3c0)
        	/go/src/github.com/cockroachdb/cockroach/pkg/internal/sqlsmith/relational.go:679 +0x5a
        github.com/cockroachdb/cockroach/pkg/internal/sqlsmith.(*Smither).makeStmt(0xc00228c3c0)
        	/go/src/github.com/cockroachdb/cockroach/pkg/internal/sqlsmith/relational.go:20 +0x56
        github.com/cockroachdb/cockroach/pkg/internal/sqlsmith.(*Smither).Generate(0xae6fa20)
        	/go/src/github.com/cockroachdb/cockroach/pkg/internal/sqlsmith/sqlsmith.go:158 +0x3d
        github.com/cockroachdb/cockroach/pkg/internal/sqlsmith.TestGenerateParse(0xc00410d520)
        	/go/src/github.com/cockroachdb/cockroach/pkg/internal/sqlsmith/sqlsmith_test.go:184 +0x9db
        testing.tRunner(0xc00410d520, 0x7490750)
        	/usr/local/go/src/testing/testing.go:1259 +0x230
        created by testing.(*T).Run
        	/usr/local/go/src/testing/testing.go:1306 +0x727
--- FAIL: TestGenerateParse (2.10s)
Help

See also: [How To Investigate a Go Test Failure \(internal\)](https://cockroachlabs.atlassian.net/l/c/HgfXfJgM)Parameters in this failure:

  • GOFLAGS=-race -parallel=4

This test on roachdash | Improve this report!

@blathers-crl blathers-crl bot added the T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) label Dec 16, 2021
@mgartner
Copy link
Collaborator

Looks related to the new void type.

@rafiss
Copy link
Collaborator

rafiss commented Dec 16, 2021

hooray for randomized testing. @otan could you triage further?

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. C-test-failure Broken test (automatically or manually discovered). O-robot Originated from a bot. T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) T-sql-queries SQL Queries Team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants