-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
component/brThis issue is related to BR of TiDB.This issue is related to BR of TiDB.feature/developingthe related feature is in developmentthe related feature is in developmentimpact/panicseverity/majortype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
- first step: pitr with full backup, log backup, and restore-ts
458156326901252170
/br restore point --storage s3://tmp/br-log-backup6d5183eb-a828-4cac-93b6-c63d9c4f83e1/Log?access-key=xxx&secret-access-key=xxx&endpoint=http%3a%2f%2fminio-peer%3a9000&force-path-style=true --pd http://downstream-pd.brie-acceptance-pitr-tps-7864765-1-953:2379 --restored-ts 458156326901252170 --full-backup-storage s3://tmp/br-log-backup6d5183eb-a828-4cac-93b6-c63d9c4f83e1/Full?access-key=xxx&secret-access-key=xxx&endpoint=http%3a%2f%2fminio-peer%3a9000&force-path-style=true --concurrency=8 --check-requirements=false
- second step: log restore only with start-ts
458156326901252170
/br restore point --storage s3://tmp/br-log-backup6d5183eb-a828-4cac-93b6-c63d9c4f83e1/Log?access-key=xxx&secret-access-key=xxx&endpoint=http%3a%2f%2fminio-peer%3a9000&force-path-style=true --pd http://downstream-pd.brie-acceptance-pitr-tps-7864765-1-953:2379 --restored-ts 458156607565987951 --start-ts 458156326901252170 --concurrency=8 --check-requirements=false
2. What did you expect to see? (Required)
success when log restore only
3. What did you see instead (Required)
first step success, and second step panic
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x5c0f1ba]
goroutine 1 [running]:
github.com/pingcap/tidb/br/pkg/utils.(*PiTRIdTracker).ContainsDB(...)
/workspace/source/tidb/br/pkg/utils/filter.go:120
github.com/pingcap/tidb/br/pkg/stream.(*TableMappingManager).ApplyFilterToDBReplaceMap(0xc001892b40?,0x0)
/workspace/source/tidb/br/pkg/stream/table_mapping.go:472+0x9a
github.com/pingcap/tidb/br/pkg/task.buildAndSaveIDMapIfNeeded({0x79d8130, 0xc0036f0640}, 0xc001892b40, 0xc0035c4800)
/workspace/source/tidb/br/pkg/task/stream.go:2134 +0xb3
github.com/pingcap/tidb/br/pkg/task.restoreStream({0x79d8130, 0xc001c5bb80}, 0xc00139d900, {0x79face0, 0xc0018df1e0}, 0xc0035c4800)
/workspace/source/tidb/br/pkg/task/stream.go:1562 +0xaa5
github.com/pingcap/tidb/br/pkg/task.RunStreamRestore({0x79d8130?, 0xc001c5a1e0?}, 0xc00139d900, {0x79face0, 0xc0018df1e0}, 0xc001c4ea08)
/workspace/source/tidb/br/pkg/task/stream.go:1422 +0x1266
github.com/pingcap/tidb/br/pkg/task.RunRestore({0x79d8130, 0xc001c5a1e0}, {0x79face0, 0xc0018df1e0}, {0x706afa7, 0xd}, 0xc001c4ea08)
/workspace/source/tidb/br/pkg/task/restore.go:818 +0x42e
main.runRestoreCommand(0xc001c8a608, {0x706afa7, 0xd})
/workspace/source/tidb/br/cmd/br/restore.go:80 +0x739
main.newStreamRestoreCommand.func1(0xc001c8a608?, {0xc001ca0dc0?, 0x4?,0x704cac7?})
/workspace/source/tidb/br/cmd/br/restore.go:254 +0x1f
github.com/spf13/cobra.(*Command).execute(0xc001c8a608, {0xc0000746b0, 0xa,0xa})
/root/go/pkg/mod/github.com/spf13/[email protected]/command.go:1015 +0xa94
github.com/spf13/cobra(*Command).ExecuteC(0xc000c2c308)
/root/go/pkg/mod/github.com/spf13/[email protected]/command.go:1148 +0x40c
github.com/spf13/cobra(*Command).Execute(...)
/root/go/pkg/mod/github.com/spf13/[email protected]/command.go:1071
main.main()
/workspace/source/tidb/br/cmd/br/main.go:37 +0x23a
4. What is your TiDB version? (Required)
[release-version=v9.0.0-beta.1.pre-761-ge3478a5] [git-hash=e3478a5c15ea0322aad1a7fd0ee05371a6972b20] [git-branch=HEAD] [go-version=go1.23.9] [utc-build-time="2025-05-20 06:16:39"] [race-enabled=false]
Metadata
Metadata
Assignees
Labels
component/brThis issue is related to BR of TiDB.This issue is related to BR of TiDB.feature/developingthe related feature is in developmentthe related feature is in developmentimpact/panicseverity/majortype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.