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

panic in mergeRegionRequestStats #18985

Closed
crazycs520 opened this issue Aug 5, 2020 · 0 comments · Fixed by #18983
Closed

panic in mergeRegionRequestStats #18985

crazycs520 opened this issue Aug 5, 2020 · 0 comments · Fixed by #18983
Labels
severity/major type/bug The issue is confirmed as a bug.

Comments

@crazycs520
Copy link
Contributor

crazycs520 commented Aug 5, 2020

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Reproduce:

create table t1 (id int, b int,  unique index (id));
create table t2 (id int, b int,  unique index (id));
insert into t1 values  (1,1);
insert into t2 values  (1,1);

then run:

select t1.*,t2.* from t1 left join t2 on t1.id=t2.id where t1.id=1;  -- This maybe panic occasionally.

2. What did you expect to see? (Required)

3. What did you see instead (Required)

In release-4.0 branch, hash: df16c56c51fbc6710431ff1ee7bbac23c610e924, the panic stack is below:

[2020/08/04 15:41:52.688 +00:00] [ERROR] [misc.go:91] ["panic in the recoverable goroutine"] [r="\"assignment to entry in nil map\""] ["stack trace"="github.com/pingcap/tidb/util.WithRecovery.func1
	/home/jenkins/agent/workspace/tidb_release-4.0/go/src/github.com/pingcap/tidb/util/misc.go:93
runtime.gopanic
	/usr/local/go/src/runtime/panic.go:679
runtime.mapassign
	/usr/local/go/src/runtime/map.go:576
github.com/pingcap/tidb/store/tikv.(*tikvSnapshot).mergeRegionRequestStats
	/home/jenkins/agent/workspace/tidb_release-4.0/go/src/github.com/pingcap/tidb/store/tikv/snapshot.go:597
github.com/pingcap/tidb/store/tikv.(*tikvSnapshot).get.func2
	/home/jenkins/agent/workspace/tidb_release-4.0/go/src/github.com/pingcap/tidb/store/tikv/snapshot.go:369
github.com/pingcap/tidb/store/tikv.(*tikvSnapshot).get
	/home/jenkins/agent/workspace/tidb_release-4.0/go/src/github.com/pingcap/tidb/store/tikv/snapshot.go:424
github.com/pingcap/tidb/store/tikv.(*tikvSnapshot).Get
	/home/jenkins/agent/workspace/tidb_release-4.0/go/src/github.com/pingcap/tidb/store/tikv/snapshot.go:326
github.com/pingcap/tidb/executor.(*PointGetExecutor).get
	/home/jenkins/agent/workspace/tidb_release-4.0/go/src/github.com/pingcap/tidb/executor/point_get.go:319
github.com/pingcap/tidb/executor.(*PointGetExecutor).getAndLock
	/home/jenkins/agent/workspace/tidb_release-4.0/go/src/github.com/pingcap/tidb/executor/point_get.go:264
github.com/pingcap/tidb/executor.(*PointGetExecutor).Next
	/home/jenkins/agent/workspace/tidb_release-4.0/go/src/github.com/pingcap/tidb/executor/point_get.go:219
github.com/pingcap/tidb/executor.Next
	/home/jenkins/agent/workspace/tidb_release-4.0/go/src/github.com/pingcap/tidb/executor/executor.go:250
github.com/pingcap/tidb/executor.(*HashJoinExec).fetchProbeSideChunks
	/home/jenkins/agent/workspace/tidb_release-4.0/go/src/github.com/pingcap/tidb/executor/join.go:203
github.com/pingcap/tidb/executor.(*HashJoinExec).fetchAndProbeHashTable.func1
	/home/jenkins/agent/workspace/tidb_release-4.0/go/src/github.com/pingcap/tidb/executor/join.go:316
github.com/pingcap/tidb/util.WithRecovery
	/home/jenkins/agent/workspace/tidb_release-4.0/go/src/github.com/pingcap/tidb/util/misc.go:96"]

4. Affected version (Required)

Master & latest release 4.0

5. Root Cause Analysis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/major type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants