lightning: routes panic for csv data load #43284
Labels
affects-6.1
This bug affects the 6.1.x(LTS) versions.
affects-6.5
This bug affects the 6.5.x(LTS) versions.
affects-7.1
This bug affects the 7.1.x(LTS) versions.
component/lightning
This issue is related to Lightning of TiDB.
severity/major
type/bug
The issue is confirmed as a bug.
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.tomlVerbose 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
The text was updated successfully, but these errors were encountered: