cockroachdb / cockroachdb/cockroach
Sentry: EXECUTE panic with no type for placeholder
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
This issue was auto filed by Sentry. It represents a crash or reported error on a live cluster with telemetry enabled.
Sentry Link: [https://cockroach-labs.sentry.io/issues/7717735060/?referrer=webhooks_plugin](https://cockroach-labs.sentry.io/issues/7717735060/?referrer=webhooks_plugin)
Panic Message:
```
execute.go:39: no type for placeholder $1
(1) while executing: EXECUTE _ (_)
Wraps: (2) assertion failure
Wraps: (3) attached stack trace
-- stack trace:
| github.com/cockroachdb/cockroach/pkg/sql.(*planner).fillInPlaceholders
| pkg/sql/execute.go:39
| github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmtInOpenState
| pkg/sql/conn_executor_exec.go:621
| github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt.func2
| pkg/sql/conn_executor_exec.go:183
| github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execWithProfiling
| pkg/sql/conn_executor_exec.go:4734
| github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt
| pkg/sql/conn_executor_exec.go:182
| github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd.func1
| pkg/sql/conn_executor.go:2481
| github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd
| pkg/sql/conn_executor.go:2486
| github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).run
| pkg/sql/conn_executor.go:2394
| github.com/cockroachdb/cockroach/pkg/sql.(*Server).ServeConn
| pkg/sql/conn_executor.go:1135
| github.com/cockroachdb/cockroach/pkg/sql/pgwire.(*conn).processCommands
| pkg/sql/pgwire/conn.go:254
| github.com/cockroachdb/cockroach/pkg/sql/pgwire.(*Server).serveImpl.func4
| pkg/sql/pgwire/server.go:1295
| runtime.goexit
| src/runtime/asm_amd64.s:1693
Wraps: (4) no type for placeholder $1
Error types: (1) *safedetails.withSafeDetails (2) *assert.withAssertionFailure (3) *withstack.withStack (4) *errutil.leafError
-- report composition:
*errutil.leafError: no type for placeholder $1
execute.go:39: *withstack.withStack (top exception)
*assert.withAssertionFailure
*safedetails.withSafeDetails: while executing: EXECUTE _ (_)
```
Stacktrace (expand for inline code snippets):
[src/runtime/asm_amd64.s#L1692-L1694](src/runtime/asm_amd64.s#L1692-L1694)
[pkg/sql/pgwire/server.go#L1294-L1296](pkg/sql/pgwire/server.go#L1294-L1296)
[pkg/sql/pgwire/conn.go#L253-L255](pkg/sql/pgwire/conn.go#L253-L255)
[pkg/sql/conn_executor.go#L1134-L1136](pkg/sql/conn_executor.go#L1134-L1136)
[pkg/sql/conn_executor.go#L2393-L2395](pkg/sql/conn_executor.go#L2393-L2395)
[pkg/sql/conn_executor.go#L2485-L2487](pkg/sql/conn_executor.go#L2485-L2487)
[pkg/sql/conn_executor.go#L2480-L2482](pkg/sql/conn_executor.go#L2480-L2482)
[pkg/sql/conn_executor_exec.go#L181-L183](pkg/sql/conn_executor_exec.go#L181-L183)
[pkg/sql/conn_executor_exec.go#L4733-L4735](pkg/sql/conn_executor_exec.go#L4733-L4735)
[pkg/sql/conn_executor_exec.go#L182-L184](pkg/sql/conn_executor_exec.go#L182-L184)
[pkg/sql/conn_executor_exec.go#L620-L622](pkg/sql/conn_executor_exec.go#L620-L622)
[pkg/sql/execute.go#L38-L40](pkg/sql/execute.go#L38-L40)
```
src/runtime/asm_amd64.s in runtime.goexit at line 1693
pkg/sql/pgwire/server.go in pkg/sql/pgwire.(*Server).serveImpl.func4 at line 1295
pkg/sql/pgwire/conn.go in pkg/sql/pgwire.(*conn).processCommands at line 254
pkg/sql/conn_executor.go in pkg/sql.(*Server).ServeConn at line 1135
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).run at line 2394
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).execCmd at line 2486
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).execCmd.func1 at line 2481
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).execStmt at line 182
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).execWithProfiling at line 4734
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).execStmt.func2 at line 183
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).execStmtInOpenState at line 621
pkg/sql/execute.go in pkg/sql.(*planner).fillInPlaceholders at line 39
```
### Tags
| Tag | Value |
| --- | --- |
| Command | mt start-sql |
| Environment | v26.2.5 |
| Go Version | go1.25.5 |
| Platform | linux amd64 |
| Distribution | CCL |
| Cockroach Release | v26.2.5 |
| Cockroach SHA | c8455423826d0c4ba75a9ae78eb2dbd7e11648bb |
| # of CPUs | 16 |
| # of Goroutines | 303 |
Jira issue: CRDB-68016
Contributor guide
Research direction
Start in pkg/sql/execute.go at planner.fillInPlaceholders and trace the EXECUTE path through conn_executor_exec.go, using the Sentry stack and the `EXECUTE _ (_)` context. Reproduce the reported placeholder panic from the mt start-sql environment, then verify the execution path handles it without a panic and add coverage for the failing case if the relevant test location is identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, sql
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100