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

varlink: PullImage() crashes podman if an error occurs #3715

Closed
EricHripko opened this issue Aug 3, 2019 · 1 comment · Fixed by #3716
Closed

varlink: PullImage() crashes podman if an error occurs #3715

EricHripko opened this issue Aug 3, 2019 · 1 comment · Fixed by #3716
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

@EricHripko
Copy link

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description

podman crashes if pulling an image results in an error via varlink API.

Steps to reproduce the issue:

  1. Pick an image name that will fail for your configuration, for example: alpine:latest

  2. Try to pull it via varlink: varlink call unix:///run/podman/io.podman/io.podman.PullImage '{"name":"alpine:latest"}'

Describe the results you received:
podman crashes:

panic: send on closed channel

goroutine 28 [running]:
github.com/containers/libpod/pkg/varlinkapi.(*LibpodAPI).PullImage.func2(0xc0004a03e0, 0xd, 0xc000512060, 0xc00000e1e0, 0xc0004da098, 0xc0004ec4d0, 0xc00000e440, 0x15a6000, 0x0, 0x0)
	pkg/varlinkapi/images.go:664 +0x1c9
created by github.com/containers/libpod/pkg/varlinkapi.(*LibpodAPI).PullImage
	pkg/varlinkapi/images.go:644 +0x234

Describe the results you expected:
podman not to crash.

Additional information you deem important (e.g. issue happens only occasionally):
Happens irrespective of whether more flag is set.

Output of podman version:

Version:            1.4.5-dev
RemoteAPI Version:  1
Go Version:         go1.12.4
OS/Arch:            linux/amd64

Output of podman info --debug:

debug:
  compiler: gc
  git commit: ""
  go version: go1.12.4
  podman version: 1.4.5-dev
host:
  BuildahVersion: 1.9.2
  Conmon:
    package: Unknown
    path: /usr/libexec/podman/conmon
    version: 'conmon version 1.0.0-dev, commit: 6f177c68ed989a6cc14ddbf8cec421819bb46401'
  Distribution:
    distribution: ubuntu
    version: "19.04"
  MemFree: 386330624
  MemTotal: 8300961792
  OCIRuntime:
    package: 'cri-o-runc: /usr/bin/runc'
    path: /usr/bin/runc
    version: 'runc version spec: 1.0.1-dev'
  SwapFree: 2145906688
  SwapTotal: 2147479552
  arch: amd64
  cpus: 4
  hostname: eric-ubuntu
  kernel: 5.0.0-17-generic
  os: linux
  rootless: false
  uptime: 7h 38m 24.3s (Approximately 0.29 days)
registries:
  blocked: null
  insecure: null
  search: null
store:
  ConfigFile: /etc/containers/storage.conf
  ContainerStore:
    number: 29
  GraphDriverName: overlay
  GraphOptions: null
  GraphRoot: /var/lib/containers/storage
  GraphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  ImageStore:
    number: 66
  RunRoot: /var/run/containers/storage
  VolumePath: /var/lib/containers/storage/volumes

Additional environment details (AWS, VirtualBox, physical, etc.):
Physical Ubuntu box.

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Aug 3, 2019
@baude baude self-assigned this Aug 3, 2019
baude added a commit to baude/podman that referenced this issue Aug 4, 2019
when using build, require a "more" connection to get logs.

when pulling a non-existent image, do not crash varlink connection.

Fixes: containers#3714
Fixes: containers#3715

Signed-off-by: baude <bbaude@redhat.com>
@EricHripko
Copy link
Author

Thank you for fixing this 👍

gabibeyer pushed a commit to gabibeyer/libpod that referenced this issue Aug 7, 2019
when using build, require a "more" connection to get logs.

when pulling a non-existent image, do not crash varlink connection.

Fixes: containers#3714
Fixes: containers#3715

Signed-off-by: baude <bbaude@redhat.com>
@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 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 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

Successfully merging a pull request may close this issue.

3 participants