pingcap / tidb-tools

tidb-tools are some useful tool collections for TiDB.
Apache License 2.0
288 stars 193 forks source link

we meet some panic on sync_diff_inspector #666

Closed xiongjiwei closed 2 years ago

xiongjiwei commented 2 years ago

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do? If possible, provide a recipe for reproducing the error.

[2022-07-21T10:41:59.038Z] goroutine 1 [running]:

[2022-07-21T10:41:59.038Z] github.com/pingcap/tidb-tools/sync_diff_inspector/utils.StartGCSavepointUpdateService(0x27acd30, 0xc0001b0000, 0x27d6b38, 0xc000f2db90, 0xc000faa4e0, 0xc000830048, 0x12, 0x0, 0x0)

[2022-07-21T10:41:59.038Z] /home/jenkins/agent/workspace/d_tidb_tools_multi_branch_master/go/src/github.com/pingcap/tidb-tools/sync_diff_inspector/utils/pd.go:180 +0x658

[2022-07-21T10:41:59.038Z] main.(*Diff).startGCKeeperForTiDB(0xc0010560a0, 0x27acd30, 0xc0001b0000, 0xc000faa4e0, 0xc000830048, 0x12)

[2022-07-21T10:41:59.038Z] /home/jenkins/agent/workspace/d_tidb_tools_multi_branch_master/go/src/github.com/pingcap/tidb-tools/sync_diff_inspector/diff.go:343 +0x185

[2022-07-21T10:41:59.038Z] main.(*Diff).pickSource(0xc0010560a0, 0x27acd30, 0xc0001b0000, 0x27c9670, 0xc0010b0280)

[2022-07-21T10:41:59.038Z] /home/jenkins/agent/workspace/d_tidb_tools_multi_branch_master/go/src/github.com/pingcap/tidb-tools/sync_diff_inspector/diff.go:357 +0x265

[2022-07-21T10:41:59.038Z] main.(*Diff).init(0xc0010560a0, 0x27acd30, 0xc0001b0000, 0xc00081c600, 0x22605365263e07, 0x1bbe2e42)

[2022-07-21T10:41:59.038Z] /home/jenkins/agent/workspace/d_tidb_tools_multi_branch_master/go/src/github.com/pingcap/tidb-tools/sync_diff_inspector/diff.go:144 +0xe5

[2022-07-21T10:41:59.038Z] main.NewDiff(0x27acd30, 0xc0001b0000, 0xc00081c600, 0xc00080ff20, 0xc000dfedb0, 0xc000ebfa40)

[2022-07-21T10:41:59.038Z] /home/jenkins/agent/workspace/d_tidb_tools_multi_branch_master/go/src/github.com/pingcap/tidb-tools/sync_diff_inspector/diff.go:97 +0x167

[2022-07-21T10:41:59.038Z] main.checkSyncState(0x27acd30, 0xc0001b0000, 0xc00081c600, 0x0)

[2022-07-21T10:41:59.038Z] /home/jenkins/agent/workspace/d_tidb_tools_multi_branch_master/go/src/github.com/pingcap/tidb-tools/sync_diff_inspector/main.go:117 +0xc5

[2022-07-21T10:41:59.038Z] main.main()

[2022-07-21T10:41:59.038Z] /home/jenkins/agent/workspace/d_tidb_tools_multi_branch_master/go/src/github.com/pingcap/tidb-tools/sync_diff_inspector/main.go:104 +0x577

[2022-07-21T10:41:59.038Z] panic: runtime error: slice bounds out of range [1:0]



2. What did you expect to see?

3. What did you see instead?

4. What version of TiDB are you using (`tidb-server -V` or run `select tidb_version();` on TiDB)?

5. which tool are you using?

6. what versionof tool are you using (`pump -V` or `tidb-lightning -V` or `syncer -V`)?