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 panic: unhandled node type: *sql.commentOnTableNode #36822

Closed
RaduBerinde opened this issue Apr 13, 2019 · 3 comments · Fixed by #36823
Closed

sql panic: unhandled node type: *sql.commentOnTableNode #36822

RaduBerinde opened this issue Apr 13, 2019 · 3 comments · Fixed by #36823
Assignees
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. S-2-temp-unavailability Temp crashes or other availability problems. Can be worked around or resolved by restarting.
Milestone

Comments

@RaduBerinde
Copy link
Member

RaduBerinde commented Apr 13, 2019

https://teamcity.cockroachdb.com/viewLog.html?buildId=1239637&tab=buildResultsDiv&buildTypeId=Cockroach_Nightlies_SqlLogicTestHighVModuleNightly

Also mentioned in #35660 (comment) so it's been there for a while

panic: unhandled node type: *sql.commentOnTableNode [recovered]
	panic: panic while executing 1 statements: COMMENT ON TABLE _ IS 'waa'; caused by unhandled node type: *sql.commentOnTableNode

goroutine 15368 [running]:
github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).closeWrapper(0xc00162c000, 0x3156940, 0xc000af7700, 0x26c6340, 0xc001a66c50)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:719 +0x36d
github.com/cockroachdb/cockroach/pkg/sql.(*Server).ServeConn.func1(0xc00162c000, 0x3156940, 0xc000af7700)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:431 +0x61
panic(0x26c6340, 0xc001a66c50)
	/usr/local/go/src/runtime/panic.go:513 +0x1b9
github.com/cockroachdb/cockroach/pkg/sql.planPhysicalProps(0x31578c0, 0xc001a66bb0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/plan_physical_props.go:144 +0x1491
github.com/cockroachdb/cockroach/pkg/sql.planToString(0x3156a00, 0xc0016e6750, 0x31578c0, 0xc001a66bb0, 0x0, 0x0, 0x0, 0x0, 0x31578c0)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/explain_plan.go:378 +0x338
github.com/cockroachdb/cockroach/pkg/sql.(*planner).makePlan(0xc00162c350, 0x3156a00, 0xc0016e6750, 0x2abc705, 0x12)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/plan.go:378 +0x59d
github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).makeExecPlan(0xc00162c000, 0x3156a00, 0xc0016e6750, 0xc00162c350, 0x10, 0x89ebff)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1003 +0x305
github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).dispatchToExecutionEngine(0xc00162c000, 0x3156a00, 0xc0016e6750, 0xc00162c350, 0x7f3674c4d2b0, 0xc0030102c0, 0x0, 0x0)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:865 +0x148
[23:28:02] :						 [/regression_32834] [Test Output]
github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmtInOpenState(0xc00162c000, 0x3156a00, 0xc0016e6750, 0x315ae80, 0xc004182840, 0xc0009834af, 0x1b, 0x0, 0x0, 0x0, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:456 +0xdd0
github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt(0xc00162c000, 0x3156a00, 0xc0016e6750, 0x315ae80, 0xc004182840, 0xc0009834af, 0x1b, 0x0, 0x0, 0x0, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:102 +0x610
github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).run(0xc00162c000, 0x3156940, 0xc000af7700, 0xc00090b9b8, 0x5400, 0x15000, 0xc00090ba50, 0xc0009daf60, 0x0, 0x0)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:1182 +0x21c8
github.com/cockroachdb/cockroach/pkg/sql.(*Server).ServeConn(0xc0006a7b80, 0x3156940, 0xc000af7700, 0xc00162c000, 0x5400, 0x15000, 0xc00090ba50, 0xc0009daf60, 0x0, 0x0)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:433 +0xce
github.com/cockroachdb/cockroach/pkg/sql/pgwire.(*conn).serveImpl.func4(0xc0006a7b80, 0x3156940, 0xc000af7700, 0xc00075c400, 0xc000306e44, 0xc0009daf60, 0xc00162c000, 0x5400, 0x15000, 0xc00090ba50, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/pgwire/conn.go:337 +0xe6
created by github.com/cockroachdb/cockroach/pkg/sql/pgwire.(*conn).serveImpl
	/go/src/github.com/cockroachdb/cockroach/pkg/sql/pgwire/conn.go:320 +0x1080
@RaduBerinde RaduBerinde added this to the 19.1 milestone Apr 13, 2019
@RaduBerinde RaduBerinde added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. S-2-temp-unavailability Temp crashes or other availability problems. Can be worked around or resolved by restarting. labels Apr 13, 2019
@RaduBerinde
Copy link
Member Author

@knz, added you as an assignee because you reviewed the commentOnTableNode stuff.

@RaduBerinde
Copy link
Member Author

Easy to repro with

make test PKG=./pkg/sql/logictest 'TESTS=Test(Planner|)Logic$$//builtin_function' 'TESTFLAGS=-vmodule=*=10' TESTTIMEOUT=15m

Unclear why it only happens with -vmodule.

@RaduBerinde RaduBerinde assigned RaduBerinde and unassigned jordanlewis and knz Apr 13, 2019
@RaduBerinde
Copy link
Member Author

Ah, the crash happens in planToString(). This would also make EXPLAIN crash but you can't run EXPLAIN COMMENT ON TABLE in the first place.

RaduBerinde added a commit to RaduBerinde/cockroach that referenced this issue Apr 13, 2019
Fixes a crash that happens when `COMMENT ON` is executed with a high V
level.

Fixes cockroachdb#36822.

Release note (bug fix): Fixed a crash caused by running `COMMENT ON`
with verbose logging turned on.
craig bot pushed a commit that referenced this issue Apr 13, 2019
36823: sql: fix COMMENT ON crash with -vmodule r=RaduBerinde a=RaduBerinde

Fixes a crash that happens when `COMMENT ON` is executed with a high V
level.

Fixes #36822.

Release note (bug fix): Fixed a crash caused by running `COMMENT ON`
with verbose logging turned on.

Co-authored-by: Radu Berinde <[email protected]>
RaduBerinde added a commit to RaduBerinde/cockroach that referenced this issue Apr 13, 2019
Fixes a crash that happens when `COMMENT ON` is executed with a high V
level.

Fixes cockroachdb#36822.

Release note (bug fix): Fixed a crash caused by running `COMMENT ON`
with verbose logging turned on.
@craig craig bot closed this as completed in #36823 Apr 13, 2019
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. S-2-temp-unavailability Temp crashes or other availability problems. Can be worked around or resolved by restarting.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants