This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 101
lightning panic ( runtime error: invalid memory address or nil point dereference) #1213
Labels
Comments
fubinzh
added
type/bug
Something isn't working
component/import
severity/critical
labels
Jun 15, 2021
The root cause may be related to // Next implements the Handle interface.
func (ch *CommonHandle) Next() Handle {
return &CommonHandle{
encoded: Key(ch.encoded).PrefixNext(),
colEndOffsets: ch.colEndOffsets,
}
} func (k Key) PrefixNext() Key {
buf := make([]byte, len(k))
copy(buf, k)
var i int
for i = len(k) - 1; i >= 0; i-- {
buf[i]++
if buf[i] != 0 {
break
}
}
if i == -1 {
copy(buf, k)
buf = append(buf, 0)
}
return buf
} The next handle of a For a row key, br/pkg/lightning/backend/local/local.go Lines 2308 to 2311 in 05beea0
Lightning calls br/pkg/lightning/backend/local/local.go Lines 1460 to 1483 in 05beea0
Lightning probably calls nextKey for the same key again in br/pkg/lightning/backend/local/local.go Lines 1619 to 1626 in 05beea0
But the handle is invalid, so nextKey cannot decode the key and finally panicked.
|
/cc @glorv |
This was referenced Jun 22, 2021
Fixed by #1261. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Please answer these questions before submitting your issue. Thanks!
What did you do?
If possible, provide a recipe for reproducing the error.
Use tidb-lightning to import data to TiDB. (4 lightning node, each node imports 2.5 TB data.)
What did you expect to see?
Lightning import should be successful.
Lightning import failed with below errors
tidb-lightning:v5.1.0-20210608
br.log
for BR if possibletidb-lightning.log
for TiDB-Lightning if possibletikv-importer.log
from TiKV-Importer if possibleLogs can be found here: http://minio.pingcap.net:9000/minio/nfs/10TB_Testing/table31/
Configuration of the cluster and the task
tidb-lightning.toml
for TiDB-Lightning if possibletikv-importer.toml
for TiKV-Importer if possibletopology.yml
if deployed by TiUPScreenshot/exported-PDF of Grafana dashboard or metrics' graph in Prometheus if possible
The text was updated successfully, but these errors were encountered: