Crash removing invalid image
mook-as opened this issue · 0 comments
mook-as commented
Steps to reproduce:
$ kim rmi mookas/foo:a@b31ad6cb6556c
(I was trying to make sure that I delete an particular image with a given tag and image ID; I don't believe the syntax is actually valid.)
Output of the CLI
$ kim rmi mookas/foo:a@b31ad6cb6556c
Error: rpc error: code = Unavailable desc = transport is closing
Usage:
⋮
Result (in the agent container):
time="2021-09-10T22:39:11Z" level=debug msg="image-remove: req=&ImageRemoveRequest{Image:nil,}"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1985ee2]
goroutine 104 [running]:
github.com/rancher/kim/pkg/server/images.(*Server).Remove(0xc000511f80, 0x20c9888, 0xc0003af710, 0xc000589010, 0x0, 0x0, 0x0)
/drone/src/pkg/server/images/remove.go:22 +0x202
github.com/rancher/kim/pkg/apis/services/images/v1alpha1._Images_Remove_Handler(0x1d1d120, 0xc000511f80, 0x20c9888, 0xc0003af080, 0xc0005d2540, 0x0, 0x20c9888, 0xc0003af080, 0x0, 0x0)
/drone/src/pkg/apis/services/images/v1alpha1/images.pb.go:1172 +0x214
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0000ff180, 0x20df978, 0xc0006bc000, 0xc000397400, 0xc0003ae9f0, 0x2d32aa0, 0x0, 0x0, 0x0)
/go/pkg/mod/google.golang.org/grpc@v1.33.2/server.go:1210 +0x52b
google.golang.org/grpc.(*Server).handleStream(0xc0000ff180, 0x20df978, 0xc0006bc000, 0xc000397400, 0x0)
/go/pkg/mod/google.golang.org/grpc@v1.33.2/server.go:1533 +0xd0c
google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc00034fab0, 0xc0000ff180, 0x20df978, 0xc0006bc000, 0xc000397400)
/go/pkg/mod/google.golang.org/grpc@v1.33.2/server.go:871 +0xab
created by google.golang.org/grpc.(*Server).serveStreams.func1
/go/pkg/mod/google.golang.org/grpc@v1.33.2/server.go:869 +0x1fd
stream closed
Version information:
kim version v0.1.0-beta.6 (8733bde7b7a942d53c4885fcaace9903132eda8c)