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 in logic_test/pg_catalog with 'verbosity=2' #29384

Closed
rjnn opened this issue Aug 30, 2018 · 0 comments
Closed

sql: panic in logic_test/pg_catalog with 'verbosity=2' #29384

rjnn opened this issue Aug 30, 2018 · 0 comments
Assignees
Labels
A-sql-memmon SQL memory monitoring 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

@rjnn
Copy link
Contributor

rjnn commented Aug 30, 2018

make testlogic TESTFLAGS='-verbosity=2' FILES=pg_catalog  
Running make with -j8
GOPATH set to /home/arjun/goworkspace
cd ./pkg/sql/logictest && logictest -test.run "TestLogic//^pg_catalog$/" -test.timeout 8m -verbosity=2
cd ./pkg/sql/logictest && logictest -test.run "TestPlannerLogic//^pg_catalog$/" -test.timeout 8m -verbosity=2
cd ./pkg/sql/opt/exec/execbuilder && logictestopt -test.run "TestExecBuild//^pg_catalog$/" -test.timeout 8m -verbosity=2
I180830 20:17:52.761281 1 rand.go:75  Random seed: 4266264652328932199
I180830 20:17:52.767053 1 rand.go:75  Random seed: -984705618445052396
--- total: 0 tests, 0 failures
testing: warning: no tests to run
PASS
I180830 20:17:52.855728 1 rand.go:75  Random seed: -6506842952398141668
--- total: 0 tests, 0 failures
testing: warning: no tests to run
PASS
E180830 20:17:53.070055 403 kv/dist_sender.go:1078  [client=127.0.0.1:59824,user=root,txn=d114f109,ts=1535660273.060797205,1,n1] reply error [txn: d114f109], QueryIntent [/Table/2/1/54/"v1"/3/1,/Min), QueryIntent [/Table/3/1/55/2/1,/Min), QueryIntent [/Table/3/1/58/2/1,/Min), QueryIntent [/Table/12/1/2018-08-30T20:17:53.060054Z/"e\xbb[\x81\xc1\xcbL2\xb7S\xcc\xc2t\xfa\x81}"/0,/Min), QueryIntent [/Table/12/1/2018-08-30T20:17:53.060054Z/"e\xbb[\x81\xc1\xcbL2\xb7S\xcc\xc2t\xfa\x81}"/2/1,/Min), QueryIntent [/Table/12/1/2018-08-30T20:17:53.060054Z/"e\xbb[\x81\xc1\xcbL2\xb7S\xcc\xc2t\xfa\x81}"/3/1,/Min), QueryIntent [/Table/12/1/2018-08-30T20:17:53.060054Z/"e\xbb[\x81\xc1\xcbL2\xb7S\xcc\xc2t\xfa\x81}"/4/1,/Min), QueryIntent [/Table/12/1/2018-08-30T20:17:53.060054Z/"e\xbb[\x81\xc1\xcbL2\xb7S\xcc\xc2t\xfa\x81}"/5/1,/Min), EndTransaction(commit:true) [/Table/SystemConfigSpan/Start]: TransactionRetryError: retry txn (RETRY_SERIALIZABLE): "sql txn" id=d114f109 key=/Table/SystemConfigSpan/Start rw=true pri=0.06355564 iso=SERIALIZABLE stat=PENDING epo=0 ts=1535660273.060797205,1 orig=1535660273.060054358,0 max=1535660273.060054358,0 wto=false rop=false seq=28
E180830 20:17:53.079873 403 kv/dist_sender.go:1078  [client=127.0.0.1:59824,user=root,scExec=,txn=e45d3a97,ts=1535660273.079117961,1,n1] reply error [txn: e45d3a97], QueryIntent [/Table/3/1/55/2/1,/Min), EndTransaction(commit:true) [/Table/SystemConfigSpan/Start]: TransactionRetryError: retry txn (RETRY_SERIALIZABLE): "unnamed" id=e45d3a97 key=/Table/SystemConfigSpan/Start rw=true pri=0.01858063 iso=SERIALIZABLE stat=PENDING epo=0 ts=1535660273.079117961,1 orig=1535660273.079091558,0 max=1535660273.079091558,0 wto=false rop=false seq=4
E180830 20:17:53.825602 403 kv/dist_sender.go:1078  [client=127.0.0.1:59824,user=root,scExec=,txn=4fc51596,ts=1535660273.824737832,1,n1] reply error [txn: 4fc51596], QueryIntent [/Table/3/1/55/2/1,/Min), EndTransaction(commit:true) [/Table/SystemConfigSpan/Start]: TransactionRetryError: retry txn (RETRY_SERIALIZABLE): "unnamed" id=4fc51596 key=/Table/SystemConfigSpan/Start rw=true pri=0.00469382 iso=SERIALIZABLE stat=PENDING epo=0 ts=1535660273.824737832,1 orig=1535660273.824702316,0 max=1535660273.824702316,0 wto=false rop=false seq=4
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0xb48866]

goroutine 696 [running]:
github.com/cockroachdb/cockroach/pkg/util/log.contextBottomTag(0x0, 0x0, 0x20b3220)
	/home/arjun/goworkspace/src/github.com/cockroachdb/cockroach/pkg/util/log/log_context.go:45 +0x26
github.com/cockroachdb/cockroach/pkg/util/log.contextLogTags(0x0, 0x0, 0xc4217c7878, 0x0, 0x8, 0xc420eabb48, 0xaf52f0, 0xc4201ba980)
	/home/arjun/goworkspace/src/github.com/cockroachdb/cockroach/pkg/util/log/log_context.go:55 +0x39
github.com/cockroachdb/cockroach/pkg/util/log.formatTags(0x0, 0x0, 0xc4217c7810, 0xafc83a)
	/home/arjun/goworkspace/src/github.com/cockroachdb/cockroach/pkg/util/log/structured.go:109 +0x66
github.com/cockroachdb/cockroach/pkg/util/log.MakeMessage(0x0, 0x0, 0x22c952a, 0x16, 0xc420eabe00, 0x2, 0x2, 0xc420bb86c0, 0x55)
	/home/arjun/goworkspace/src/github.com/cockroachdb/cockroach/pkg/util/log/structured.go:127 +0x58
github.com/cockroachdb/cockroach/pkg/util/log.addStructured(0x0, 0x0, 0x1, 0x3, 0x22c952a, 0x16, 0xc420eabe00, 0x2, 0x2)
	/home/arjun/goworkspace/src/github.com/cockroachdb/cockroach/pkg/util/log/structured.go:142 +0xc9
github.com/cockroachdb/cockroach/pkg/util/log.logDepth(0x0, 0x0, 0x2, 0xc400000001, 0x22c952a, 0x16, 0xc420eabe00, 0x2, 0x2)
	/home/arjun/goworkspace/src/github.com/cockroachdb/cockroach/pkg/util/log/log.go:69 +0x8c
github.com/cockroachdb/cockroach/pkg/util/log.InfofDepth(0x0, 0x0, 0x1, 0x22c952a, 0x16, 0xc420eabe00, 0x2, 0x2)
	/home/arjun/goworkspace/src/github.com/cockroachdb/cockroach/pkg/util/log/log.go:113 +0x89
github.com/cockroachdb/cockroach/pkg/util/mon.(*BytesMonitor).doStop(0xc4217b2460, 0x0, 0x0, 0x2792901)
	/home/arjun/goworkspace/src/github.com/cockroachdb/cockroach/pkg/util/mon/bytes_usage.go:391 +0x3ae
github.com/cockroachdb/cockroach/pkg/util/mon.(*BytesMonitor).Stop(0xc4217b2460, 0x0, 0x0)
	/home/arjun/goworkspace/src/github.com/cockroachdb/cockroach/pkg/util/mon/bytes_usage.go:384 +0x44
github.com/cockroachdb/cockroach/pkg/sql.(*txnState).finishExternalTxn(0xc420f64088)
	/home/arjun/goworkspace/src/github.com/cockroachdb/cockroach/pkg/sql/txn_state.go:259 +0x48
github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).close(0xc420f64000, 0x2792940, 0xc421090f30, 0x2)
	/home/arjun/goworkspace/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:707 +0x49e
github.com/cockroachdb/cockroach/pkg/sql.(*internalExecutorImpl).initConnEx.func1(0xc420f64000, 0x2792940, 0xc421090f30, 0xc420448820, 0xc4217b21e0, 0xc4203ca890)
	/home/arjun/goworkspace/src/github.com/cockroachdb/cockroach/pkg/sql/internal.go:217 +0xcf
created by github.com/cockroachdb/cockroach/pkg/sql.(*internalExecutorImpl).initConnEx
	/home/arjun/goworkspace/src/github.com/cockroachdb/cockroach/pkg/sql/internal.go:199 +0x275
Makefile:864: recipe for target 'testbaselogic' failed
make: *** [testbaselogic] Error 2

A minimal logic test configuration of:

# LogicTest: local

statement ok
SET DATABASE = ''

query error cannot access virtual schema in anonymous database
select 'system.namespace'::regclass

is sufficient to trigger this panic.

@rjnn rjnn self-assigned this Aug 30, 2018
@knz knz added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. A-sql-memmon SQL memory monitoring labels Sep 1, 2018
@knz knz added the S-2-temp-unavailability Temp crashes or other availability problems. Can be worked around or resolved by restarting. label Sep 1, 2018
@knz knz added this to the 2.1 milestone Sep 1, 2018
craig bot pushed a commit that referenced this issue Sep 4, 2018
29520: sql: fix a panic in txn_state.go when verbose logging r=andreimatei,knz a=arjunravinarayan

Fix a panic (reproducible with 
`make testlogic TESTFLAGS='-verbosity=2' FILES=pg_catalog` ) 
due to an uninitialized
context. The comment on Ctx says that Ctx is uninitialized if we are
in `fsm.stateNoTxn`. In that case, use the parent (session) context
which is always initialized.

First commit is just some type assertions that I found useful to understand what's going on.

Fixes #29384.

29544: roachtest: fix acceptance/version-upgrade on remote clusters r=tschottdorf a=petermattis

No need to run a versionStep for the base version as we manually do that
before executing the version steps. Duplicating this work was failing on
the second upload because we can't overwrite the executable for a
running binary.

Fixes #29542

Release note: None

Co-authored-by: Arjun Narayan <[email protected]>
Co-authored-by: Peter Mattis <[email protected]>
@craig craig bot closed this as completed in #29520 Sep 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sql-memmon SQL memory monitoring 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

No branches or pull requests

2 participants