Skip to content

runtime/shim: fix the nil checkpoint options#8393

Merged
dmcgowan merged 1 commit intocontainerd:mainfrom
Iceber:fix_checkpoint_options
Apr 25, 2023
Merged

runtime/shim: fix the nil checkpoint options#8393
dmcgowan merged 1 commit intocontainerd:mainfrom
Iceber:fix_checkpoint_options

Conversation

@Iceber
Copy link
Copy Markdown
Member

@Iceber Iceber commented Apr 14, 2023

When (*task.CheckpointTaskRequest).Options is nil, it will panic

Apr 14 23:39:33 caiwei-master containerd[1219760]: panic: runtime error: invalid memory address or nil pointer dereference
Apr 14 23:39:33 caiwei-master containerd[1219760]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x79b9c0]
Apr 14 23:39:33 caiwei-master containerd[1219760]: goroutine 97 [running]:
Apr 14 23:39:33 caiwei-master containerd[1219760]: github.com/containerd/containerd/runtime/v2/runc.(*Container).Checkpoint(0xc00020c540?, {0xb706c0, 0xc000242060}, 0xc000340050)
Apr 14 23:39:33 caiwei-master containerd[1219760]:         /Users/icebergu/workspace/containerd/runtime/v2/runc/container.go:483 +0xc0
Apr 14 23:39:33 caiwei-master containerd[1219760]: github.com/containerd/containerd/runtime/v2/runc/task.(*service).Checkpoint(0xa2fc00?, {0xb706c0, 0xc000242060}, 0xc000340050)
Apr 14 23:39:33 caiwei-master containerd[1219760]:         /Users/icebergu/workspace/containerd/runtime/v2/runc/task/service.go:411 +0x53
Apr 14 23:39:33 caiwei-master containerd[1219760]: github.com/containerd/containerd/api/runtime/task/v2.RegisterTaskService.func8({0xb706c0, 0xc000242060}, 0xc0002a6040)
Apr 14 23:39:33 caiwei-master containerd[1219760]:         /Users/icebergu/workspace/containerd/api/runtime/task/v2/shim_ttrpc.pb.go:88 +0x98
Apr 14 23:39:33 caiwei-master containerd[1219760]: github.com/containerd/ttrpc.defaultServerInterceptor({0xb706c0?, 0xc000242060?}, 0xc0000c6181?, 0x7faa7d657f38?, 0x8?)
Apr 14 23:39:33 caiwei-master containerd[1219760]:         /Users/icebergu/workspace/containerd/vendor/github.com/containerd/ttrpc/interceptor.go:52 +0x26
Apr 14 23:39:33 caiwei-master containerd[1219760]: github.com/containerd/ttrpc.(*serviceSet).unaryCall(0xc0000b65b8, {0xb706c0, 0xc000242060}, 0xc0000c6120?, 0x49f72a3?, {0xc0000c6000, 0x24, 0x30})
Apr 14 23:39:33 caiwei-master containerd[1219760]:         /Users/icebergu/workspace/containerd/vendor/github.com/containerd/ttrpc/services.go:75 +0xe5
Apr 14 23:39:33 caiwei-master containerd[1219760]: github.com/containerd/ttrpc.(*serviceSet).handle.func1()
Apr 14 23:39:33 caiwei-master containerd[1219760]:         /Users/icebergu/workspace/containerd/vendor/github.com/containerd/ttrpc/services.go:118 +0x16d
Apr 14 23:39:33 caiwei-master containerd[1219760]: created by github.com/containerd/ttrpc.(*serviceSet).handle
Apr 14 23:39:33 caiwei-master containerd[1219760]:         /Users/icebergu/workspace/containerd/vendor/github.com/containerd/ttrpc/services.go:111 +0x17b

@k8s-ci-robot
Copy link
Copy Markdown

Hi @Iceber. Thanks for your PR.

I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Copy Markdown
Member

@fuweid fuweid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dmcgowan dmcgowan merged commit 7d7aac7 into containerd:main Apr 25, 2023
@Iceber Iceber added cherry-pick/1.7.x Change to be cherry picked to release/1.7 branch cherry-picked/1.7.x PR commits are cherry-picked into release/1.7 branch and removed cherry-pick/1.7.x Change to be cherry picked to release/1.7 branch labels May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-picked/1.7.x PR commits are cherry-picked into release/1.7 branch needs-ok-to-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants