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

dumpling panic when query result is empty #45200

Closed
D3Hunter opened this issue Jul 6, 2023 · 0 comments · Fixed by #45201
Closed

dumpling panic when query result is empty #45200

D3Hunter opened this issue Jul 6, 2023 · 0 comments · Fixed by #45201
Labels
affects-7.1 This bug affects the 7.1.x(LTS) versions. component/dumpling This is related to Dumpling of TiDB. severity/moderate type/bug The issue is confirmed as a bug.

Comments

@D3Hunter
Copy link
Contributor

D3Hunter commented Jul 6, 2023

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x38 pc=0x1027d2684]

goroutine 44 [running]:
github.com/pingcap/tidb/dumpling/export.(*Writer).WriteTableData.func1()
	github.com/pingcap/tidb/dumpling/export/writer.go:200 +0x114
github.com/pingcap/tidb/br/pkg/utils.WithRetry({0x1036624b8, 0x14000b01860}, 0x14000a37d30, {0x12d9dad00, 0x14000a77f08})
	github.com/pingcap/tidb/br/pkg/utils/retry.go:56 +0x74
github.com/pingcap/tidb/dumpling/export.(*Writer).WriteTableData(0x14000fc36e0, {0x0, 0x0}, {0x103662528, 0x1400004fb80}, 0x0)
	github.com/pingcap/tidb/dumpling/export/writer.go:192 +0x1f4
github.com/pingcap/tidb/dumpling/export.(*Writer).handleTask(0x14000fc36e0, {0x103641c40?, 0x14000592f80?})
	github.com/pingcap/tidb/dumpling/export/writer.go:115 +0x184
github.com/pingcap/tidb/dumpling/export.(*Writer).run(0x14000fc36e0, 0x14000dfd380)
	github.com/pingcap/tidb/dumpling/export/writer.go:93 +0xc8
github.com/pingcap/tidb/dumpling/export.(*Dumper).startWriters.func4()
	github.com/pingcap/tidb/dumpling/export/dump.go:376 +0x24
golang.org/x/sync/errgroup.(*Group).Go.func1()
	golang.org/x/[email protected]/errgroup/errgroup.go:75 +0x5c
created by golang.org/x/sync/errgroup.(*Group).Go
	golang.org/x/[email protected]/errgroup/errgroup.go:72 +0x9c

introduced in #41588 where we always init SQLRowIter which causes rows closed when result is empty

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

3. What did you see instead (Required)

4. What is your TiDB version? (Required)

@D3Hunter D3Hunter added type/bug The issue is confirmed as a bug. severity/moderate component/dumpling This is related to Dumpling of TiDB. affects-7.1 This bug affects the 7.1.x(LTS) versions. labels Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-7.1 This bug affects the 7.1.x(LTS) versions. component/dumpling This is related to Dumpling of TiDB. severity/moderate type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant