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

roachtest: unoptimized-query-oracle/disable-rules=half/rand-tables failed #91917

Closed
cockroach-teamcity opened this issue Nov 15, 2022 · 3 comments · Fixed by #92102
Closed

roachtest: unoptimized-query-oracle/disable-rules=half/rand-tables failed #91917

cockroach-teamcity opened this issue Nov 15, 2022 · 3 comments · Fixed by #92102
Assignees
Labels
branch-master Failures and bugs on the master branch. C-test-failure Broken test (automatically or manually discovered). O-roachtest O-robot Originated from a bot. T-sql-queries SQL Queries Team
Milestone

Comments

@cockroach-teamcity
Copy link
Member

cockroach-teamcity commented Nov 15, 2022

roachtest.unoptimized-query-oracle/disable-rules=half/rand-tables failed with artifacts on master @ 47c7b3a1bc047fc3e481cf12166885b39519c022:

test artifacts and logs in: /artifacts/unoptimized-query-oracle/disable-rules=half/rand-tables/run_1
(test_impl.go:314).Errorf: test timed out (1h0m0s)

Parameters: ROACHTEST_cloud=gce , ROACHTEST_cpu=4 , ROACHTEST_encrypted=false , ROACHTEST_ssd=0

Help

See: roachtest README

See: How To Investigate (internal)

/cc @cockroachdb/sql-queries

This test on roachdash | Improve this report!

Jira issue: CRDB-21486

@cockroach-teamcity cockroach-teamcity added branch-master Failures and bugs on the master branch. C-test-failure Broken test (automatically or manually discovered). O-roachtest 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. labels Nov 15, 2022
@cockroach-teamcity cockroach-teamcity added this to the 23.1 milestone Nov 15, 2022
@blathers-crl blathers-crl bot added the T-sql-queries SQL Queries Team label Nov 15, 2022
@rytaft
Copy link
Collaborator

rytaft commented Nov 15, 2022

Not a release blocker

@rytaft rytaft removed the release-blocker Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked. label Nov 15, 2022
@rytaft
Copy link
Collaborator

rytaft commented Nov 15, 2022

Looks relevant (from https://teamcity.cockroachdb.com/repository/download/Cockroach_Nightlies_RoachtestNightlyGceBazel/7512756:id/unoptimized-query-oracle/disable-rules%3Dhalf/rand-tables/run_1/debug.zip!/debug/nodes/1/stacks_with_labels.txt):

1 @ 0x23d9b65 0x2505b09 0x25327cc 0x252c04e 0x253164e 0x252c04e 0x253164e 0x252c04e 0x253164e 0x252c04e 0x253164e 0x252c04e 0x253164e 0x252c04e 0x253164e 0x252c04e 0x253164e 0x252c04e 0x253164e 0x252c04e 0x253164e 0x252c04e 0x253164e 0x252c04e 0x253164e 0x252c04e 0x253164e 0x252c04e 0x253164e 0x252c04e 0x253164e 0x252c04e
#	0x23d9b64	github.com/cockroachdb/cockroach/pkg/sql/opt/props.(*FuncDepSet).AddEquivFrom+0xc4	github.com/cockroachdb/cockroach/pkg/sql/opt/props/func_dep.go:1142
#	0x2505b08	github.com/cockroachdb/cockroach/pkg/sql/opt/norm.(*CustomFuncs).GetEquivFD+0x68	github.com/cockroachdb/cockroach/pkg/sql/opt/norm/join_funcs.go:451
#	0x25327cb	github.com/cockroachdb/cockroach/pkg/sql/opt/norm.(*Factory).ConstructInnerJoin+0x6e6b	github.com/cockroachdb/cockroach/bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go:2919
#	0x252c04d	github.com/cockroachdb/cockroach/pkg/sql/opt/norm.(*Factory).ConstructInnerJoin+0x6ed	github.com/cockroachdb/cockroach/bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go:2320
#	0x253164d	github.com/cockroachdb/cockroach/pkg/sql/opt/norm.(*Factory).ConstructInnerJoin+0x5ced	github.com/cockroachdb/cockroach/bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go:3507
#	0x252c04d	github.com/cockroachdb/cockroach/pkg/sql/opt/norm.(*Factory).ConstructInnerJoin+0x6ed	github.com/cockroachdb/cockroach/bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go:2320
#	0x253164d	github.com/cockroachdb/cockroach/pkg/sql/opt/norm.(*Factory).ConstructInnerJoin+0x5ced	github.com/cockroachdb/cockroach/bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go:3507
#	0x252c04d	github.com/cockroachdb/cockroach/pkg/sql/opt/norm.(*Factory).ConstructInnerJoin+0x6ed	github.com/cockroachdb/cockroach/bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go:2320
#	0x253164d	github.com/cockroachdb/cockroach/pkg/sql/opt/norm.(*Factory).ConstructInnerJoin+0x5ced	github.com/cockroachdb/cockroach/bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go:3507
#	0x252c04d	github.com/cockroachdb/cockroach/pkg/sql/opt/norm.(*Factory).ConstructInnerJoin+0x6ed	github.com/cockroachdb/cockroach/bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go:2320
#	0x253164d	github.com/cockroachdb/cockroach/pkg/sql/opt/norm.(*Factory).ConstructInnerJoin+0x5ced	github.com/cockroachdb/cockroach/bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go:3507
#	0x252c04d	github.com/cockroachdb/cockroach/pkg/sql/opt/norm.(*Factory).ConstructInnerJoin+0x6ed	github.com/cockroachdb/cockroach/bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go:2320
#	0x253164d	github.com/cockroachdb/cockroach/pkg/sql/opt/norm.(*Factory).ConstructInnerJoin+0x5ced	github.com/cockroachdb/cockroach/bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go:3507
#	0x252c04d	github.com/cockroachdb/cockroach/pkg/sql/opt/norm.(*Factory).ConstructInnerJoin+0x6ed	github.com/cockroachdb/cockroach/bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go:2320
#	0x253164d	github.com/cockroachdb/cockroach/pkg/sql/opt/norm.(*Factory).ConstructInnerJoin+0x5ced	github.com/cockroachdb/cockroach/bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go:3507
#	0x252c04d	github.com/cockroachdb/cockroach/pkg/sql/opt/norm.(*Factory).ConstructInnerJoin+0x6ed	github.com/cockroachdb/cockroach/bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go:2320
#	0x253164d	github.com/cockroachdb/cockroach/pkg/sql/opt/norm.(*Factory).ConstructInnerJoin+0x5ced	github.com/cockroachdb/cockroach/bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go:3507
#	0x252c04d	github.com/cockroachdb/cockroach/pkg/sql/opt/norm.(*Factory).ConstructInnerJoin+0x6ed	github.com/cockroachdb/cockroach/bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go:2320
#	0x253164d	github.com/cockroachdb/cockroach/pkg/sql/opt/norm.(*Factory).ConstructInnerJoin+0x5ced	github.com/cockroachdb/cockroach/bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go:3507
#	0x252c04d	github.com/cockroachdb/cockroach/pkg/sql/opt/norm.(*Factory).ConstructInnerJoin+0x6ed	github.com/cockroachdb/cockroach/bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go:2320
#	0x253164d	github.com/cockroachdb/cockroach/pkg/sql/opt/norm.(*Factory).ConstructInnerJoin+0x5ced	github.com/cockroachdb/cockroach/bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go:3507
#	0x252c04d	github.com/cockroachdb/cockroach/pkg/sql/opt/norm.(*Factory).ConstructInnerJoin+0x6ed	github.com/cockroachdb/cockroach/bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go:2320
#	0x253164d	github.com/cockroachdb/cockroach/pkg/sql/opt/norm.(*Factory).ConstructInnerJoin+0x5ced	github.com/cockroachdb/cockroach/bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go:3507
#	0x252c04d	github.com/cockroachdb/cockroach/pkg/sql/opt/norm.(*Factory).ConstructInnerJoin+0x6ed	github.com/cockroachdb/cockroach/bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go:2320
#	0x253164d	github.com/cockroachdb/cockroach/pkg/sql/opt/norm.(*Factory).ConstructInnerJoin+0x5ced	github.com/cockroachdb/cockroach/bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go:3507
#	0x252c04d	github.com/cockroachdb/cockroach/pkg/sql/opt/norm.(*Factory).ConstructInnerJoin+0x6ed	github.com/cockroachdb/cockroach/bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go:2320
#	0x253164d	github.com/cockroachdb/cockroach/pkg/sql/opt/norm.(*Factory).ConstructInnerJoin+0x5ced	github.com/cockroachdb/cockroach/bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go:3507
#	0x252c04d	github.com/cockroachdb/cockroach/pkg/sql/opt/norm.(*Factory).ConstructInnerJoin+0x6ed	github.com/cockroachdb/cockroach/bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go:2320
#	0x253164d	github.com/cockroachdb/cockroach/pkg/sql/opt/norm.(*Factory).ConstructInnerJoin+0x5ced	github.com/cockroachdb/cockroach/bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go:3507
#	0x252c04d	github.com/cockroachdb/cockroach/pkg/sql/opt/norm.(*Factory).ConstructInnerJoin+0x6ed	github.com/cockroachdb/cockroach/bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go:2320
#	0x253164d	github.com/cockroachdb/cockroach/pkg/sql/opt/norm.(*Factory).ConstructInnerJoin+0x5ced	github.com/cockroachdb/cockroach/bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go:3507
#	0x252c04d	github.com/cockroachdb/cockroach/pkg/sql/opt/norm.(*Factory).ConstructInnerJoin+0x6ed	github.com/cockroachdb/cockroach/bazel-out/k8-opt/bin/pkg/sql/opt/norm/factory.og.go:2320

@DrewKimball
Copy link
Collaborator

DrewKimball commented Nov 15, 2022

Should be fixed by #91561
Nevermind, looks like that was already merged when this ran.

@DrewKimball DrewKimball reopened this Nov 15, 2022
@DrewKimball DrewKimball self-assigned this Nov 15, 2022
DrewKimball added a commit to DrewKimball/cockroach that referenced this issue Nov 18, 2022
The null-rejection rules that simplify outer joins ignore RightJoin
expressions because the `CommuteRightJoin` rule normally converts
RightJoins to LeftJoins. However, in the case when `CommuteRightJoin`
is disabled, we can hit a case where an `IS NOT NULL` filter gets
pushed down but then gets pulled back up by decorrelation rules when
it can't simplify the RightJoin, causing a cycle. This patch fixes
the problem by preventing RightJoins from requesting null-rejection
when `CommuteRightJoin` is disabled.

Fixes cockroachdb#91917

Release note: None
craig bot pushed a commit that referenced this issue Nov 29, 2022
92102: opt: prevent null-rejection cycle with RightJoin r=DrewKimball a=DrewKimball

The null-rejection rules that simplify outer joins ignore RightJoin expressions because the `CommuteRightJoin` rule normally converts RightJoins to LeftJoins. However, in the case when `CommuteRightJoin` is disabled, we can hit a case where an `IS NOT NULL` filter gets pushed down but then gets pulled back up by decorrelation rules when it can't simplify the RightJoin, causing a cycle. This patch fixes the problem by preventing RightJoins from requesting null-rejection when `CommuteRightJoin` is disabled.

Fixes #91917

Release note: None

Co-authored-by: Drew Kimball <[email protected]>
@craig craig bot closed this as completed in d9155e1 Nov 29, 2022
blathers-crl bot pushed a commit that referenced this issue Nov 29, 2022
The null-rejection rules that simplify outer joins ignore RightJoin
expressions because the `CommuteRightJoin` rule normally converts
RightJoins to LeftJoins. However, in the case when `CommuteRightJoin`
is disabled, we can hit a case where an `IS NOT NULL` filter gets
pushed down but then gets pulled back up by decorrelation rules when
it can't simplify the RightJoin, causing a cycle. This patch fixes
the problem by preventing RightJoins from requesting null-rejection
when `CommuteRightJoin` is disabled.

Fixes #91917

Release note: None
@mgartner mgartner moved this to Done in SQL Queries Jul 24, 2023
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-roachtest O-robot Originated from a bot. T-sql-queries SQL Queries Team
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants