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

br: TiDB panic during restoring data with runtime error: invalid memory address or nil pointer dereference #44490

Closed
Yui-Song opened this issue Jun 7, 2023 · 0 comments · Fixed by #44511
Labels
component/br This issue is related to BR of TiDB. feature/developing the related feature is in development severity/major type/bug This issue is a bug.

Comments

@Yui-Song
Copy link
Contributor

Yui-Song commented Jun 7, 2023

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Restore data of bank workload from minio

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

The data restore successfully

3. What did you see instead (Required)

DataBase Restore <---------------------------------------\\..................................> 53.28%DataBase Restore <-----------------------
----------------|..................................> 53.28%panic: runtime error: invalid memory address or nil pointer dereference\n[signal SIGSEGV: segmentation violation code=0x1
addr=0x0 pc=0x3ab0170]\n\ngoroutine 760 [running]:\ngithub.com/pingcap/tidb/statistics/handle.(*Handle).SaveStatsToStorage(0x0, 0xc7, 0x186a0, 0x0?, 0x0, 0xc0047b46c0, 0x1d12aeb?, 0
x0?, 0x55a4de0?, 0x1, ...)\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/statistics/handle/handle.go:1555 +0x130\ngithub.com/pingcap/tidb/statistics/han
dle.(*Handle).loadStatsFromJSON(0xc001c86cd0?, 0xc001c86c08?, 0x4?, 0xc001c86c08?)\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/statistics/handle/dump.
go:382 +0x112\ngithub.com/pingcap/tidb/statistics/handle.(*Handle).LoadStatsFromJSON(0xc000524a80?, {0x634b6e8, 0xc001d6c000}, 0xc000eb52d0)\n\t/home/jenkins/agent/workspace/build-c
ommon/go/src/github.com/pingcap/br/statistics/handle/dump.go:347 +0x14f\ngithub.com/pingcap/tidb/br/pkg/restore.(*Client).updateMetaAndLoadStats(0xc000c1bd40, {0x6314ad0, 0xc000e2ef
f0}, 0xc00267d320)\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/restore/client.go:1777 +0x6c5\ngithub.com/pingcap/tidb/br/pkg/restore.(*Client).
GoValidateChecksum.func1()\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/restore/client.go:1626 +0x68\ncreated by github.com/pingcap/tidb/br/pkg/
restore.(*Client).GoValidateChecksum\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/restore/client.go:1624 +0x185"]

The last few lines of br.log

[2023/06/07 20:35:50.412 +08:00] [INFO] [pipeline_items.go:394] ["restore batch done"] [ranges="{total=128,ranges=\"[\\\"[7480000000000000BB5F69800000000000000100, 7480000000000000BB5F698000000000000001040DE0B6B3A7767169040000000000000065)\\\",\\\"(skip 126)\\\",\\\"[7480000000000000BD5F698000000000000001040DE0B6B3A876DFB9040000000000000065040000000000000001, 7480000000000000BD5F698000000000000001040DE0B6B3A8890785040000000000000065040000000000000001)\\\"]\",totalFiles=129,totalKVs=119203973,totalBytes=7324266166,totalSize=7324266166}"]
[2023/06/07 20:35:50.412 +08:00] [INFO] [pipeline_items.go:118] ["restore table done"] [tables="[`bank`.`inner_bill`,`bank`.`account_verify`,`bank`.`account_deposit_aggreement`,`bank`.`currency`]"]
[2023/06/07 20:35:50.412 +08:00] [WARN] [client.go:1686] ["table has no checksum, skipping checksum"] [db=bank] [table=account_verify]
[2023/06/07 20:35:50.412 +08:00] [WARN] [client.go:1686] ["table has no checksum, skipping checksum"] [db=bank] [table=inner_bill]
[2023/06/07 20:35:50.414 +08:00] [INFO] [client.go:1744] ["success in validate checksum"] [db=bank] [table=currency]
[2023/06/07 20:35:50.418 +08:00] [INFO] [client.go:1772] ["start loads analyze after validate checksum"] ["old id"=201] ["new id"=201]

4. What is your TiDB version? (Required)

| Release Version: v7.2.0-alpha
Edition: Community
Git Commit Hash: aedbcd0
Git Branch: heads/refs/tags/v7.2.0-alpha
UTC Build Time: 2023-06-07 10:42:08
GoVersion: go1.20.3
Race Enabled: false
Check Table Before Drop: false
Store: tikv |

@Yui-Song Yui-Song added type/bug This issue is a bug. severity/major component/br This issue is related to BR of TiDB. labels Jun 7, 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 Jun 8, 2023
@Yui-Song Yui-Song 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. may-affects-6.1 may-affects-6.5 may-affects-7.1 labels Jun 8, 2023
@tangenta tangenta added the feature/developing the related feature is in development label Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/br This issue is related to BR of TiDB. feature/developing the related feature is in development severity/major type/bug This issue is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants