Describe the problem
The latest version of the CockroachDB (d8d16e2) shows Internal Error when executing the following query:
SET testing_optimizer_disable_rule_probability = 1.0;
SELECT * FROM ROWS FROM (COALESCE(CRDB_INTERNAL.DECODE_PLAN_GIST('abc')));
To Reproduce
Here is the detail steps to reproduce the bug.
- In operating system Ubuntu 20.04, download the CockroachDB source code from the github source.
- Use the latest version of the CockroachDB code (tested version: d8d16e2)
- Directly
make install in the root repository folder.
- Run
./cockroach demo, and then paste the PoC query to the cockroach cli environment.
- Observe the
Internal Error and log the stack information.
Expected behavior
Shows error such as the following:
ERROR: illegal base64 data at input byte 0
Additional data / screenshots
Here is the outputted stack trace:
demo@127.0.0.1:26257/movr> SET testing_optimizer_disable_rule_probability = 1.0;
SET
Time: 3ms total (execution 2ms / network 1ms)
warning: error retrieving the database name: ERROR: use of crdb_internal_vtable_pk column not allowed. (SQLSTATE XXUUU)
demo@127.0.0.1:26257/?> SELECT * FROM ROWS FROM (COALESCE(CRDB_INTERNAL.DECODE_PLAN_GIST('abc')));
ERROR: internal error: unexpected error from the vectorized engine: interface conversion: tree.FnOverload is nil, not func(context.Context, *eval.Context, tree.Datums) (tree.Datum, error)
SQLSTATE: XX000
DETAIL: stack trace:
github.com/cockroachdb/cockroach/pkg/sql/colexecerror/error.go:89: func1()
runtime/panic.go:884: gopanic()
runtime/iface.go:262: panicdottypeE()
github.com/cockroachdb/cockroach/pkg/sql/sem/eval/expr.go:479: EvalFuncExpr()
github.com/cockroachdb/cockroach/pkg/sql/sem/tree/eval_expr_generated.go:276: Eval()
github.com/cockroachdb/cockroach/pkg/sql/sem/eval/expr.go:197: EvalCoalesceExpr()
github.com/cockroachdb/cockroach/pkg/sql/sem/tree/eval_expr_generated.go:101: Eval()
github.com/cockroachdb/cockroach/pkg/sql/sem/eval/expr.go:26: Expr()
github.com/cockroachdb/cockroach/pkg/sql/execinfrapb/expr.go:248: Eval()
github.com/cockroachdb/cockroach/pkg/sql/rowexec/project_set.go:241: nextGeneratorValues()
github.com/cockroachdb/cockroach/pkg/sql/rowexec/project_set.go:292: Next()
github.com/cockroachdb/cockroach/pkg/sql/colexec/columnarizer.go:243: Next()
github.com/cockroachdb/cockroach/pkg/sql/colflow/stats.go:116: next()
github.com/cockroachdb/cockroach/pkg/sql/colexecerror/error.go:92: CatchVectorizedRuntimeError()
github.com/cockroachdb/cockroach/pkg/sql/colflow/stats.go:124: Next()
github.com/cockroachdb/cockroach/pkg/sql/colflow/flow_coordinator.go:252: nextAdapter()
github.com/cockroachdb/cockroach/pkg/sql/colexecerror/error.go:92: CatchVectorizedRuntimeError()
github.com/cockroachdb/cockroach/pkg/sql/colflow/flow_coordinator.go:256: next()
github.com/cockroachdb/cockroach/pkg/sql/colflow/flow_coordinator.go:294: Run()
github.com/cockroachdb/cockroach/pkg/sql/colflow/vectorized_flow.go:309: Run()
github.com/cockroachdb/cockroach/pkg/sql/distsql_running.go:827: Run()
github.com/cockroachdb/cockroach/pkg/sql/distsql_running.go:1795: PlanAndRun()
github.com/cockroachdb/cockroach/pkg/sql/distsql_running.go:1547: PlanAndRunAll()
github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1633: execWithDistSQLEngine()
github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1253: dispatchToExecutionEngine()
github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:738: execStmtInOpenState()
github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:130: func1()
github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:2522: execWithProfiling()
github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:129: execStmt()
github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:1959: func1()
github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:1964: execCmd()
github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:1882: run()
HINT: You have encountered an unexpected error.
Environment:
- CockroachDB version: v23.1.0-alpha
- Server OS: Ubuntu 20.04 LTS
- Client app: CockroachDB demo command. (
./cockroach demo)
- Detailed CockroachDB version output:
cockroach version details:
Build Tag: v23.1.0-alpha.1-642-gd8d16e2824
Build Time: 2023/01/08 00:10:58
Distribution: CCL
Platform: linux arm64 (aarch64-linux-gnu)
Go Version: go1.19
C Compiler: gcc 9.4.0
Build Commit ID: d8d16e28249b2834331ebfcba4a5b2b2fde2eb0c
Build Type: development
Additional context
This Internal Error problem may not happen in the real-world application, since it requires the specific setup: SET testing_optimizer_disable_rule_probability = 1.0;, which is a developer option used to control the query optimization. However, an Internal Error is still unexpected from the resulted behavior. Therefore, this problem is reported here.
Jira issue: CRDB-23209
Describe the problem
The latest version of the CockroachDB (d8d16e2) shows
Internal Errorwhen executing the following query:To Reproduce
Here is the detail steps to reproduce the bug.
make installin the root repository folder../cockroach demo, and then paste the PoC query to the cockroach cli environment.Internal Errorand log the stack information.Expected behavior
Shows error such as the following:
Additional data / screenshots
Here is the outputted stack trace:
Environment:
./cockroach demo)Additional context
This Internal Error problem may not happen in the real-world application, since it requires the specific setup:
SET testing_optimizer_disable_rule_probability = 1.0;, which is a developer option used to control the query optimization. However, anInternal Erroris still unexpected from the resulted behavior. Therefore, this problem is reported here.Jira issue: CRDB-23209