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

sql/tests: TestRandomSyntaxGeneration failed [CALL causes nil pointer access] #121095

Closed
cockroach-teamcity opened this issue Mar 26, 2024 · 2 comments · Fixed by #121222
Closed
Assignees
Labels
branch-master Failures and bugs on the master branch. C-test-failure Broken test (automatically or manually discovered). GA-blocker O-robot Originated from a bot. P-1 Issues/test failures with a fix SLA of 1 month T-sql-queries SQL Queries Team
Milestone

Comments

@cockroach-teamcity
Copy link
Member

cockroach-teamcity commented Mar 26, 2024

sql/tests.TestRandomSyntaxGeneration failed with artifacts on master @ 6df7436b6388eb7823b9f63a42aa75e1fbc89a85:

Random syntax error:

    rsg_test.go:909: Crash detected: server panic: pq: internal error: runtime error: invalid memory address or nil pointer dereference

Query:

        CALL [ FUNCTION 166 ] ( );
Help

See also: How To Investigate a Go Test Failure (internal)

/cc @cockroachdb/sql-foundations

This test on roachdash | Improve this report!

Jira issue: CRDB-37067

@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. release-blocker Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked. T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) labels Mar 26, 2024
@cockroach-teamcity cockroach-teamcity added this to the 24.1 milestone Mar 26, 2024
@rafiss rafiss changed the title sql/tests: TestRandomSyntaxGeneration failed sql/tests: TestRandomSyntaxGeneration failed [CALL causes nil pointer access] Mar 26, 2024
@rafiss rafiss added T-sql-queries SQL Queries Team and removed T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) labels Mar 26, 2024
@github-project-automation github-project-automation bot moved this to Triage in SQL Queries Mar 26, 2024
@rytaft
Copy link
Collaborator

rytaft commented Mar 27, 2024

Easy repro with cockroach demo on master:

> CALL [ FUNCTION 166 ] ( );                                                                                              
ERROR: internal error: runtime error: invalid memory address or nil pointer dereference
SQLSTATE: XX000
DETAIL: stack trace:
github.com/cockroachdb/cockroach/pkg/util/errorutil/catch.go:29: ShouldCatch()
github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/builder.go:221: func1()
GOROOT/src/runtime/panic.go:770: gopanic()
GOROOT/src/runtime/panic.go:261: panicmem()
GOROOT/src/runtime/signal_unix.go:881: sigpanic()
github.com/cockroachdb/cockroach/pkg/sql/sem/tree/object_name.go:261: Format()
github.com/cockroachdb/cockroach/pkg/sql/sem/tree/adjust_constants.go:93: formatNodeOrAdjustConstants()
github.com/cockroachdb/cockroach/pkg/sql/sem/tree/format.go:495: FormatNode()
github.com/cockroachdb/cockroach/pkg/sql/sem/tree/format.go:633: AsStringWithFlags()
github.com/cockroachdb/cockroach/pkg/sql/sem/tree/format.go:648: AsString()
github.com/cockroachdb/cockroach/pkg/sql/sem/tree/object_name.go:275: String()
github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/routine.go:129: buildProcedure()
github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/builder.go:386: buildStmt()
github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/builder.go:295: buildStmtAtRootWithScope()
github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/builder.go:276: buildStmtAtRoot()
github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/builder.go:255: Build()
github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:599: buildExecMemo()
github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:250: makeOptimizerPlan()
github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:2360: makeExecPlan()
github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1830: dispatchToExecutionEngine()
github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1166: execStmtInOpenState()
github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:146: func1()
github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:3492: execWithProfiling()
github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:145: execStmt()
github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2288: func1()
github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2293: execCmd()
github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2210: run()
github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:967: ServeConn()
github.com/cockroachdb/cockroach/pkg/sql/pgwire/conn.go:247: processCommands()
github.com/cockroachdb/cockroach/pkg/sql/pgwire/server.go:992: func3()
src/runtime/asm_arm64.s:1222: goexit()

HINT: You have encountered an unexpected error.

Please check the public issue tracker to check whether this problem is
already tracked. If you cannot find it there, please report the error
with details by creating a new issue.

If you would rather not post publicly, please contact us directly
using the support form.

We appreciate your feedback.

@rytaft rytaft added GA-blocker P-1 Issues/test failures with a fix SLA of 1 month and removed release-blocker Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked. labels Mar 27, 2024
@yuzefovich yuzefovich self-assigned this Mar 27, 2024
@yuzefovich yuzefovich moved this from Triage to Active in SQL Queries Mar 27, 2024
@cockroach-teamcity
Copy link
Member Author

sql/tests.TestRandomSyntaxGeneration failed with artifacts on master @ ec9444f8287663777c5ebceff61bcd280491ba08:

Random syntax error:

    rsg_test.go:909: Crash detected: server panic: pq: internal error: runtime error: invalid memory address or nil pointer dereference

Query:

        CALL [ FUNCTION 165 ] ( * );
Help

See also: How To Investigate a Go Test Failure (internal)

This test on roachdash | Improve this report!

craig bot pushed a commit that referenced this issue Mar 27, 2024
119933: kv: add ability to verify pipelined replicated shared/exclusive locks  r=nvanbenschoten a=arulajmani

Previously, QueryIntent requests were only used to verify whether an
intent was successfully evaluated and replicated. This patch extends
QueryIntent request to also be able to verify whether a pipelined
shared or exclusive lock was successfully replicated or not.

Informs #117978

Release note: None

120787: ui: use max aggregator for commit latency on changefeed dashboard r=rharding6373 a=rharding6373

Previously, the commit latency in the changefeed dashboard in the db console would be aggregated by sum across all nodes. This was confusing for users who might see unexpectedly high commit latency.

In this change, we use max aggregation for the commit latency so that users see the max commit latency from all the nodes instead of the sum. This provides more useful observability into changefeed behavior.

Fixes: #119246
Fixes: #112947
Epic: None

Release note (ui change): The "Commit Latency" chart in the changefeed dashboard now aggregates by max instead of by sum for multi-node changefeeds. This more accurately reflects the amount of time for events to be acknowledged by the downstream sink.

121217: backupccl: fix data race with admission pacer r=msbutler a=aadityasondhi

We now use one pacer per fileSSTSink.

Fixes #121199.
Fixes #121202.
Fixes #121201.
Fixes #121200.
Fixes #121198.
Fixes #121197.
Fixes #121196.
Fixes #121195.
Fixes #121194.
Fixes #121193.
Fixes #121192.
Fixes #121191.
Fixes #121190.
Fixes #121189.
Fixes #121188.
Fixes #121187.

Release note: None

121222: optbuilder: fix recently introduced nil pointer in error case r=yuzefovich a=yuzefovich

This commit fixes a recently introduced nil pointer internal error when attempting to CALL not a procedure that is specified not by its name. `ResolvableFunctionReference` might not have `ReferenceByName`, so this commit switches to using `FunctionReference` that is always set.

Fixes: #121095.

Release note: None

Co-authored-by: Arul Ajmani <[email protected]>
Co-authored-by: rharding6373 <[email protected]>
Co-authored-by: Aaditya Sondhi <[email protected]>
Co-authored-by: Yahor Yuzefovich <[email protected]>
@craig craig bot closed this as completed in #121222 Mar 27, 2024
@github-project-automation github-project-automation bot moved this from Active to Done in SQL Queries Mar 27, 2024
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). GA-blocker O-robot Originated from a bot. P-1 Issues/test failures with a fix SLA of 1 month T-sql-queries SQL Queries Team
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants