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

Regression: 1.2.0: varlink call unix:/run/podman/io.podman/io.podman.PullImage '{"name": "busybox:foobar"}' crashes #2860

Closed
KKoukiou opened this issue Apr 5, 2019 · 1 comment
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@KKoukiou
Copy link
Contributor

KKoukiou commented Apr 5, 2019

/kind bug

Description
PullImage varlink API crashes when remote image tag does not exists

Steps to reproduce the issue:

  1. sudo ./bin/podman varlink --timeout 100000000 unix:/run/podman/io.podman

  2. $ sudo varlink call unix:/run/podman/io.podman/io.podman.PullImage '{"name": "busybox:foobar"}'

Describe the results you received:
The podman command crashes with the following:

sudo ./bin/podman varlink --timeout 100000000 unix:/run/podman/io.podman
[sudo] password for kkoukiou: 
ERRO[0006] Error pulling image ref //localhost:5000/busybox:foobar: Error determining manifest MIME type for docker://localhost:5000/busybox:foobar: pinging docker registry returned: Get http://localhost:5000/v2/: dial tcp [::1]:5000: connect: connection refused 
ERRO[0008] Error pulling image ref //busybox:foobar: Error determining manifest MIME type for docker://busybox:foobar: Error reading manifest foobar in docker.io/library/busybox: manifest unknown: manifest unknown 
ERRO[0010] Error pulling image ref //registry.fedoraproject.org/busybox:foobar: Error determining manifest MIME type for docker://registry.fedoraproject.org/busybox:foobar: Error reading manifest foobar in registry.fedoraproject.org/busybox: manifest unknown: manifest unknown 
ERRO[0012] Error pulling image ref //quay.io/busybox:foobar: Error determining manifest MIME type for docker://quay.io/busybox:foobar: Error reading manifest foobar in quay.io/busybox: error parsing HTTP 404 response body: invalid character '<' looking for beginning of value: "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\">\n<title>404 Not Found</title>\n<h1>Not Found</h1>\n<p>The requested URL was not found on the server.  If you entered the URL manually please check your spelling and try again.</p>\n" 
ERRO[0013] Error pulling image ref //registry.access.redhat.com/busybox:foobar: Error determining manifest MIME type for docker://registry.access.redhat.com/busybox:foobar: Error reading manifest foobar in registry.access.redhat.com/busybox: unknown: Not Found 
ERRO[0015] Error pulling image ref //registry.centos.org/busybox:foobar: Error determining manifest MIME type for docker://registry.centos.org/busybox:foobar: Error reading manifest foobar in registry.centos.org/busybox: manifest unknown: manifest unknown 
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x218 pc=0x12d0bf5]

goroutine 8 [running]:
github.com/containers/libpod/libpod/image.(*Image).ID(...)
	/home/kkoukiou/go/src/github.com/containers/libpod/_output/src/github.com/containers/libpod/libpod/image/image.go:287
github.com/containers/libpod/pkg/varlinkapi.(*LibpodAPI).PullImage.func1(0xc0005bffd0, 0xe, 0xc00091c120, 0xc00000c4c0, 0x0, 0x0, 0xc000139e30, 0xc0000a8e00, 0xc00000c6c0, 0xc000818c00, ...)
	/home/kkoukiou/go/src/github.com/containers/libpod/_output/src/github.com/containers/libpod/pkg/varlinkapi/images.go:644 +0x4f5
created by github.com/containers/libpod/pkg/varlinkapi.(*LibpodAPI).PullImage
	/home/kkoukiou/go/src/github.com/containers/libpod/_output/src/github.com/containers/libpod/pkg/varlinkapi/images.go:627 +0x208

$ bin/podman --version
podman version 1.2.0

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Apr 5, 2019
@KKoukiou
Copy link
Contributor Author

KKoukiou commented Apr 5, 2019

cc @baude

@baude baude self-assigned this Apr 5, 2019
baude added a commit to baude/podman that referenced this issue Apr 8, 2019
when pulling a non-existent image via varlink, we had a panic because
when we detected a pull error we sent the error over a channel but still
tried to deduce the image id on a nil object.

Fixes: containers#2860

Signed-off-by: baude <[email protected]>
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 24, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

No branches or pull requests

3 participants