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

lightning: routes panic for csv data load #43284

Closed
haiying-gao opened this issue Apr 21, 2023 · 0 comments · Fixed by #45405
Closed

lightning: routes panic for csv data load #43284

haiying-gao opened this issue Apr 21, 2023 · 0 comments · Fixed by #45405
Labels
affects-6.1 affects-6.5 affects-7.1 component/lightning This issue is related to Lightning of TiDB. severity/major type/bug The issue is confirmed as a bug.

Comments

@haiying-gao
Copy link

haiying-gao commented Apr 21, 2023

Bug Report

routes not worked for standard csv data

1. Minimal reproduce step (Required)

tidb-lightning config file

[[routes]]
schema-pattern = "test1"
target-schema = "test"

[tidb@vm dump]$ ls -lrt
total 12
-rw-rw-r-- 1 tidb tidb 8 Apr 21 15:54 test1.dump_test.001.sql
-rw-rw-r-- 1 tidb tidb 12 Apr 21 15:54 test1.dump_test.002.sql
-rw-rw-r-- 1 tidb tidb 4 Apr 21 15:54 test1.dump_test.003.sql
[tidb@vm dump]$ cat *
1,a
2,b
3,c
4,d
5,e
6,f

[tidb@vm ~]$ tiup tidb-lightning:v6.5.1 -config ./tidb-lightning.toml
Starting component tidb-lightning: /home/tidb/.tiup/components/tidb-lightning/v6.5.1/tidb-lightning -config ./tidb-lightning.toml
Verbose debug logs will be written to tidb-lightning01.log

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x68 pc=0x32b613d]

goroutine 1 [running]:
github.com/pingcap/tidb/br/pkg/lightning/mydump.(*mdLoaderSetup).route(0xc00067e480)
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/lightning/mydump/loader.go:514 +0x5bd
github.com/pingcap/tidb/br/pkg/lightning/mydump.(*mdLoaderSetup).setup(0xc00067e480, {0x4d13bc8, 0xc000b2e2c0})
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/lightning/mydump/loader.go:350 +0x1b9
github.com/pingcap/tidb/br/pkg/lightning/mydump.NewMyDumpLoaderWithStore({0x4d13bc8, 0xc000b2e2c0}, 0xc000bf4000, {0x4d30cc0?, 0xc000485ef0}, {0x0, 0x0, 0x2760?})
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/lightning/mydump/loader.go:273 +0x6ae
github.com/pingcap/tidb/br/pkg/lightning.(*Lightning).run(0xc000bd01a0, {0x4d13c00, 0xc00011a000}, 0xc000bf4000, 0xc000bce770)
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/lightning/lightning.go:497 +0xa4b
github.com/pingcap/tidb/br/pkg/lightning.(*Lightning).RunOnceWithOptions(0xc000bd01a0, {0x4d13c00, 0xc00011a000}, 0xc000bf4000, {0x0, 0x0, 0xc000012798?})
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/lightning/lightning.go:373 +0x205
main.main.func2(0xc000bc6f00, 0xc000bbff30?)
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/cmd/tidb-lightning/main.go:94 +0x74
main.main()
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/cmd/tidb-lightning/main.go:95 +0x6b3

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

import data to table test.dump_test successful

3. What did you see instead (Required)

tidb-lightning panic: runtime error: invalid memory address or nil pointer dereference

4. What is your TiDB version? (Required)

tidb v6.5.1
tidb-lightning v6.5.1

@haiying-gao haiying-gao added the type/bug The issue is confirmed as a bug. label Apr 21, 2023
@aytrack aytrack added component/lightning This issue is related to Lightning of TiDB. severity/major labels Apr 23, 2023
@ti-chi-bot ti-chi-bot bot added may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 may-affects-7.1 labels Apr 23, 2023
@lance6716 lance6716 removed may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. labels Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.1 affects-6.5 affects-7.1 component/lightning This issue is related to Lightning of TiDB. severity/major type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants