Skip to content

panic: runtime error: invalid memory address or nil pointer dereference when do log restore only #60105

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

Closed
apollodafoni opened this issue Mar 17, 2025 · 3 comments · Fixed by #60116
Assignees
Labels
affects-9.0 This bug affects the 9.0.x versions. component/br This issue is related to BR of TiDB. impact/panic severity/critical type/bug The issue is confirmed as a bug. type/regression

Comments

@apollodafoni
Copy link

apollodafoni commented Mar 17, 2025

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

log restore only

/br restore point --storage s3://tmp/br-log-backup62f29bd7-1ff6-4d03-afe5-17a29ad33eb9/Log?access-key=xxx&secret-access-key=xxx&endpoint=http%3a%2f%2fminio.pingcap.net%3a9001
&force-path-style=true --pd http://downstream-pd.brie-acceptance-pitr-tps-7831559-1-66:2379 --restored-ts 456704334025457782 --start-ts 456704078710046815 --concurrency=8 --check-requirements=false

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

log restore success

3. What did you see instead (Required)

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x5ba3247]

goroutine 1 [running]:
github.com/pingcap/tidb/br/pkg/task.RunRestore({0x78731d0, 0xc0012411d0}, {0x7894bc0, 0xc001c966b0}, {0x6f26c84, 0xd}, 0xc0018d0f08)
/workspace/source/tidb/br/pkg/task/restore.go:839 +0x847
main.runRestoreCommand(0xc001bf0c08, {0x6f26c84, 0xd})
/workspace/source/tidb/br/cmd/br/restore.go:80 +0x739
main.newStreamRestoreCommand.func1(0xc001bf0c08?, {0xc001c03ae0?, 0x4?, 0x6f08b81?})
/workspace/source/tidb/br/cmd/br/restore.go:254 +0x1f
github.com/spf13/cobra.(*Command).execute(0xc001bf0c08, {0xc00013c6b0, 0xa, 0xa})
/root/go/pkg/mod/github.com/spf13/[email protected]/command.go:985 +0xaaa
github.com/spf13/cobra.(*Command).ExecuteC(0xc0018d2908)
/root/go/pkg/mod/github.com/spf13/[email protected]/command.go:1117 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
/root/go/pkg/mod/github.com/spf13/[email protected]/command.go:1041
main.main()
/workspace/source/tidb/br/cmd/br/main.go:37 +0x23a

br.log

[2025/03/17 05:21:53.127 +00:00] [INFO] [stream.go:359] ["tsoStream.recvLoop ended"] [stream=downstream-pd-0.downstream-pd-peer.brie-acceptance-pitr-tps-7831559-1-66.svc:2379-3] [error="rpc error: code = Canceled desc = context canceled"] [errorVerbose="rpc error: code = Canceled desc = context canceled\ngithub.com/tikv/pd/client/clients/tso.(*tsoStream).recvLoop\n\t/root/go/pkg/mod/github.com/tikv/pd/[email protected]/clients/tso/stream.go:427\nruntime.goexit\n\t/root/go/pkg/mod/golang.org/[email protected]/src/runtime/asm_amd64.s:1700"]
[2025/03/17 05:21:53.131 +00:00] [ERROR] [checkpoint.go:421] ["send the error"] [category=checkpoint] [error="context canceled"] [stack="github.com/pingcap/tidb/br/pkg/checkpoint.(*CheckpointRunner[...]).sendError\n\t/workspace/source/tidb/br/pkg/checkpoint/checkpoint.go:421\ngithub.com/pingcap/tidb/br/pkg/checkpoint.(*CheckpointRunner[...]).startCheckpointMainLoop.func2\n\t/workspace/source/tidb/br/pkg/checkpoint/checkpoint.go:468"]

4. What is your TiDB version? (Required)

Release Version: v9.0.0-beta.1
Edition: Community
Git Commit Hash: 7b4717b
Git Branch: HEAD
UTC Build Time: 2025-03-13 03:08:08
GoVersion: go1.23.7
Race Enabled: false
Check Table Before Drop: false
Store: tikv

/br -V
Release Version: v9.0.0-beta.1
Git Commit Hash: 7b4717b
Git Branch: HEAD
Go Version: go1.23.7
UTC Build Time: 2025-03-13 03:09:50
Race Enabled: false

@apollodafoni apollodafoni added the type/bug The issue is confirmed as a bug. label Mar 17, 2025
@apollodafoni
Copy link
Author

/component br
/assign @3pointer

@ti-chi-bot ti-chi-bot bot added the component/br This issue is related to BR of TiDB. label Mar 17, 2025
@apollodafoni
Copy link
Author

/severity critical

@apollodafoni apollodafoni changed the title panic: runtime error: invalid memory address or nil pointer dereference when do PiTR restore panic: runtime error: invalid memory address or nil pointer dereference when do log restore only Mar 17, 2025
@apollodafoni
Copy link
Author

/label affects-9.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-9.0 This bug affects the 9.0.x versions. component/br This issue is related to BR of TiDB. impact/panic severity/critical type/bug The issue is confirmed as a bug. type/regression
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants