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

colexecwindow: possibly a bug with concat_agg #70715

Closed
yuzefovich opened this issue Sep 24, 2021 · 5 comments · Fixed by #74491
Closed

colexecwindow: possibly a bug with concat_agg #70715

yuzefovich opened this issue Sep 24, 2021 · 5 comments · Fixed by #74491
Assignees
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-sql-queries SQL Queries Team

Comments

@yuzefovich
Copy link
Member

In this build I saw this

------- Stdout: -------
=== RUN   TestLogic/fakedist-disk/window
=== PAUSE TestLogic/fakedist-disk/window
=== CONT  TestLogic/fakedist-disk/window
--- done: testdata/logic_test/drop_table with config fakedist-disk: 24 tests, 0 failures
=== CONT  TestLogic/fakedist-disk/window
    logic.go:2323: 
         
        testdata/logic_test/window:375: SELECT k, concat_agg(s) OVER (PARTITION BY k ORDER BY w) FROM kv ORDER BY 1
        expected:
            1  a
            3  a
            5  NULL
            6  b
            7  b
            8  A
            
        but found (query options: "") :
            1   
            3  a
            5  NULL
            6   
            7  b
            8  A
--- done: testdata/logic_test/window with config fakedist-disk: 55 tests, 1 failures
    logic.go:3204: 
        testdata/logic_test/window:385: error while processing
    logic.go:3204: testdata/logic_test/window:385: too many errors encountered, skipping the rest of the input
        --- FAIL: TestLogic/fakedist-disk/window (1.67s)

This was master + #70608 (probably unrelated) before merging.

@yuzefovich yuzefovich added the C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. label Sep 24, 2021
@yuzefovich yuzefovich self-assigned this Sep 24, 2021
@blathers-crl blathers-crl bot added the T-sql-queries SQL Queries Team label Sep 24, 2021
@yuzefovich
Copy link
Member Author

This looks similar to #60824 (comment).

@yuzefovich
Copy link
Member Author

It's reproducible, but pretty rare (1 hit out of 450 runs of window logic test file), looks like it's only in fakedist-disk config.

@yuzefovich
Copy link
Member Author

It is quite rare, once I got this:

=== CONT  TestLogic/fakedist-disk/window
    logic.go:2574: 
        
        testdata/logic_test/window:375: SELECT k, concat_agg(s) OVER (PARTITION BY k ORDER BY w) FROM kv ORDER BY 1
        expected success, but found
        (XX000) internal error: unexpectedly found decreasing offsets: [0 1 2 0 1]
        bytes.go:80: in AssertOffsetsAreNonDecreasing()
        DETAIL: stack trace:
        github.com/cockroachdb/cockroach/pkg/col/coldata/bytes.go:80: AssertOffsetsAreNonDecreasing()
        github.com/cockroachdb/cockroach/pkg/col/coldata/bytes.go:550: AssertOffsetsAreNonDecreasing()
        github.com/cockroachdb/cockroach/pkg/sql/colexec/invariants_checker.go:102: Next()
        github.com/cockroachdb/cockroach/pkg/sql/colflow/stats.go:99: Next()
        github.com/cockroachdb/cockroach/pkg/sql/colexec/sort.go:146: spool()
        github.com/cockroachdb/cockroach/pkg/sql/colexec/sort.go:283: Next()
        github.com/cockroachdb/cockroach/pkg/sql/colexec/disk_spiller.go:197: func1()
        github.com/cockroachdb/cockroach/pkg/sql/colexecerror/error.go:91: CatchVectorizedRuntimeError()
        github.com/cockroachdb/cockroach/pkg/sql/colexec/disk_spiller.go:195: Next()
        github.com/cockroachdb/cockroach/pkg/sql/colexec/invariants_checker.go:94: Next()
        github.com/cockroachdb/cockroach/pkg/sql/colflow/stats.go:99: Next()
        github.com/cockroachdb/cockroach/pkg/sql/colflow/flow_coordinator.go:240: nextAdapter()
        github.com/cockroachdb/cockroach/pkg/sql/colexecerror/error.go:91: CatchVectorizedRuntimeError()
        github.com/cockroachdb/cockroach/pkg/sql/colflow/flow_coordinator.go:244: next()
        github.com/cockroachdb/cockroach/pkg/sql/colflow/flow_coordinator.go:283: Run()
        github.com/cockroachdb/cockroach/pkg/sql/colflow/vectorized_flow.go:258: Run()
        github.com/cockroachdb/cockroach/pkg/sql/distsql_running.go:535: Run()
        github.com/cockroachdb/cockroach/pkg/sql/distsql_running.go:1276: PlanAndRun()
        github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1384: execWithDistSQLEngine()
        github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1075: dispatchToExecutionEngine()
        github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:713: execStmtInOpenState()
        github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:130: execStmt()
        github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:1712: func1()
        github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:1714: execCmd()
        github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:1636: run()
        github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:660: ServeConn()
        github.com/cockroachdb/cockroach/pkg/sql/pgwire/conn.go:639: func1()
        runtime/asm_amd64.s:1371: goexit()

Need to sprinkle some logging.

@cucaroach
Copy link
Contributor

@yuzefovich is this another one: #74476

@yuzefovich
Copy link
Member Author

No, I think that one is different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-sql-queries SQL Queries Team
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants