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 panic due to column count mismatch #33396

Closed
GMHDBJD opened this issue Mar 24, 2022 · 5 comments · Fixed by #33767
Closed

lightning panic due to column count mismatch #33396

GMHDBJD opened this issue Mar 24, 2022 · 5 comments · Fixed by #33767
Assignees
Labels
affects-5.4 This bug affects the 5.4.x(LTS) versions. component/lightning This issue is related to Lightning of TiDB. report/customer Customers have encountered this bug. severity/moderate type/bug The issue is confirmed as a bug.

Comments

@GMHDBJD
Copy link
Contributor

GMHDBJD commented Mar 24, 2022

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

create table with x columns
import csv with lightning with columns > x

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

lightning report error

3. What did you see instead (Required)

panic: runtime error: index out of range [265] with length 265
goroutine 275 [running]:
github.com/pingcap/tidb/br/pkg/lightning/backend/tidb.(*tidbEncoder).Encode(0xc0000b3d60, 0xc00168c060, 0xc001d0e000, 0xe4ad, 0xe4ad, 0x1, 0xc0002b4000, 0x109, 0x10a, 0xc000066abe, ...)
        /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/lightning/backend/tidb/tidb.go:321 +0xfc5
github.com/pingcap/tidb/br/pkg/lightning/restore.(*chunkRestore).encodeLoop(0xc0005a6940, 0x4760048, 0xc0002d1740, 0xc00168c000, 0xc0004db800, 0xc00168c060, 0x4736a58, 0xc0000b3d60, 0xc00005d200, 0xc000991900, ...)
        /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/lightning/restore/restore.go:2389 +0x3ad
github.com/pingcap/tidb/br/pkg/lightning/restore.(*chunkRestore).restore(0xc0005a6940, 0x4760048, 0xc0002d1740, 0xc0004db800, 0x0, 0xc0005a6960, 0xc0005a6980, 0xc000991900, 0x0, 0x0)
        /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/lightning/restore/restore.go:2484 +0x713
github.com/pingcap/tidb/br/pkg/lightning/restore.(*TableRestore).restoreEngine.func3(0xc000524f40, 0xc000991900, 0x3ff0000000000000, 0x4760048, 0xc0002d1740, 0xc0004db800, 0xc000000000, 0xc0005a6960, 0xc0005a6980, 0xc000524f28, ...)
        /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/lightning/restore/table_restore.go:542 +0x17e
created by github.com/pingcap/tidb/br/pkg/lightning/restore.(*TableRestore).restoreEngine
        /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/lightning/restore/table_restore.go:534 +0x9a9

4. What is your TiDB version? (Required)

@GMHDBJD GMHDBJD added the type/bug The issue is confirmed as a bug. label Mar 24, 2022
@GMHDBJD
Copy link
Contributor Author

GMHDBJD commented Mar 24, 2022

cause by #27850
We may return a error rather than panic.

@seiya-annie seiya-annie added the component/lightning This issue is related to Lightning of TiDB. label Mar 24, 2022
@niubell
Copy link
Contributor

niubell commented Mar 28, 2022

/assign dsdashun

@buchuitoudegou
Copy link
Contributor

/assign

@niubell
Copy link
Contributor

niubell commented Apr 6, 2022

/unassign dsdashun

@seiya-annie
Copy link

/found customer

@ti-chi-bot ti-chi-bot bot added the report/customer Customers have encountered this bug. label Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-5.4 This bug affects the 5.4.x(LTS) versions. component/lightning This issue is related to Lightning of TiDB. report/customer Customers have encountered this bug. severity/moderate type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants