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

store/tikv: fix panic #1705

Merged
merged 5 commits into from
Sep 8, 2016
Merged

store/tikv: fix panic #1705

merged 5 commits into from
Sep 8, 2016

Conversation

coocood
Copy link
Member

@coocood coocood commented Sep 8, 2016

No description provided.

@coocood
Copy link
Member Author

coocood commented Sep 8, 2016

@shenli @disksing PTAL

@@ -392,6 +392,9 @@ func (it *copIterator) Next() (io.ReadCloser, error) {
if it.mu.respGot == len(it.mu.tasks) {
it.mu.finished = true
}
if resp == nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check it.mu.finished == true?

@shenli
Copy link
Member

shenli commented Sep 8, 2016

LGTM

@c4pt0r
Copy link
Member

c4pt0r commented Sep 8, 2016

panic:

2016/09/08 06:15:12 coprocessor.go:437: [warning] coprocessor region error: message:"peer is not leader" not_leader:<region_id:281 > , retry later
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x15de30]

goroutine 256772 [running]:
panic(0x934948, 0x11324008)
/home/pi/go/src/runtime/panic.go:500 +0x33c
github.com/pingcap/tidb/store/tikv.(_copIterator).Next(0x154c17c0, 0x0, 0x0, 0x0, 0x0)
/home/pi/gopkg/src/github.com/pingcap/tidb/store/tikv/coprocessor.go:390 +0x280
github.com/pingcap/tidb/xapi.(_selectResult).fetch(0x1612ede0)
/home/pi/gopkg/src/github.com/pingcap/tidb/xapi/xapi.go:85 +0x70
created by github.com/pingcap/tidb/xapi.(*selectResult).Fetch
/home/pi/gopkg/src/github.com/pingcap/tidb/xapi/xapi.go:79 +0x2c

@coocood
Copy link
Member Author

coocood commented Sep 8, 2016

@disksing PTAL

@disksing
Copy link
Contributor

disksing commented Sep 8, 2016

LGTM

@coocood coocood merged commit d6f3869 into master Sep 8, 2016
@coocood coocood deleted the coocood/fix-panic branch September 8, 2016 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants