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

Index out of range #8573

Closed
rzlourenco opened this issue Dec 3, 2020 · 5 comments
Closed

Index out of range #8573

rzlourenco opened this issue Dec 3, 2020 · 5 comments
Assignees
Labels
In Progress This issue is actively being worked by the assignee, please do not work on this at this time. 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. stale-issue

Comments

@rzlourenco
Copy link
Contributor

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

/kind bug

Description

Index out of range when running a container that does not exist and without defining any registries for unqualified search.

Steps to reproduce the issue:

  1. Comment unqualified-search-registries in registries.conf

$ podman run --rm idonotexist
Completed short name "idonotexist" with unqualified-search registries (origin: /etc/containers/registries.conf)
panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/containers/podman/v2/libpod/image.(*Runtime).New(0xc0004bc460, 0x55567c9144a0, 0xc0005a5620, 0x7ffc409258e6, 0xb, 0x0, 0x0, 0x0, 0x0, 0x55567c8da9e0, ...)
        libpod/image/image.go:171 +0x566
github.com/containers/podman/v2/pkg/domain/infra/abi.pull(0x55567c9144a0, 0xc0005a5620, 0xc0004bc460, 0x7ffc409258e6, 0xb, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        pkg/domain/infra/abi/images.go:260 +0xb5e
github.com/containers/podman/v2/pkg/domain/infra/abi.(*ImageEngine).Pull(0xc00058e240, 0x55567c9144a0, 0xc0005a5620, 0x7ffc409258e6, 0xb, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        pkg/domain/infra/abi/images.go:309 +0xac
github.com/containers/podman/v2/cmd/podman/containers.pullImage(0x7ffc409258e6, 0xb, 0x0, 0x20, 0x0, 0x55567c8dab00)
        cmd/podman/containers/create.go:259 +0x415
github.com/containers/podman/v2/cmd/podman/containers.run(0x55567d290cc0, 0xc0006d1d60, 0x1, 0x2, 0x0, 0x0)
        cmd/podman/containers/run.go:141 +0xb67
github.com/spf13/cobra.(*Command).execute(0x55567d290cc0, 0xc00003c0a0, 0x2, 0x2, 0x55567d290cc0, 0xc00003c0a0)
        vendor/github.com/spf13/cobra/command.go:850 +0x47c
github.com/spf13/cobra.(*Command).ExecuteC(0x55567d2a4280, 0xc000040138, 0x55567c69aac0, 0x55567d352ee0)
        vendor/github.com/spf13/cobra/command.go:958 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
        vendor/github.com/spf13/cobra/command.go:895
github.com/spf13/cobra.(*Command).ExecuteContext(...)
        vendor/github.com/spf13/cobra/command.go:888
main.Execute()
        cmd/podman/root.go:92 +0xee
main.main()
        cmd/podman/main.go:41 +0xb8

Describe the results you received:

A runtime panic.

Describe the results you expected:

Graceful termination.

Output of podman version:

Version:      3.0.0-dev
API Version:  3.0.0
Go Version:   go1.15.5
Git Commit:   85b412ddcdacb635e13ec67ecd2df5990dbdca02
Built:        Thu Dec  3 12:28:55 2020
OS/Arch:      linux/amd64

Output of podman info --debug:

host:
  arch: amd64
  buildahVersion: 1.19.0-dev
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: Unknown
    path: /usr/bin/conmon
    version: 'conmon version 2.0.21, commit: 35a2fa83022e56e18af7e6a865ba5d7165fa2a4a'
  cpus: 12
  distribution:
    distribution: arch
    version: unknown
  eventLogger: journald
  hostname: niflheim
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 10000
    uidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 10000
  kernel: 5.9.11-arch2-1
  linkmode: dynamic
  memFree: 24519213056
  memTotal: 33567653888
  ociRuntime:
    name: crun
    package: Unknown
    path: /usr/bin/crun
    version: |-
      crun version 0.16
      commit: eb0145e5ad4d8207e84a327248af76663d4e50dd
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +YAJL
  os: linux
  remoteSocket:
    path: /run/user/1000/podman/podman.sock
  rootless: true
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: Unknown
    version: |-
      slirp4netns version 1.1.7
      commit: e62caa08b78f3e662422bd7bfbcd2df3d12dcab1
      libslirp: 4.4.0
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.5.1
  swapFree: 0
  swapTotal: 0
  uptime: 1h 35m 40.63s (Approximately 0.04 days)
registries: {}
store:
  configFile: /home/rzl/.config/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions:
    overlay.mount_program:
      Executable: /usr/bin/fuse-overlayfs
      Package: Unknown
      Version: |-
        fusermount3 version: 3.10.0
        fuse-overlayfs: version 1.3
        FUSE library version 3.10.0
        using FUSE kernel interface version 7.31
  graphRoot: /home/rzl/.local/share/containers/storage
  graphStatus:
    Backing Filesystem: btrfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "false"
  imageStore:
    number: 0
  runRoot: /run/user/1000/containers
  volumePath: /home/rzl/.local/share/containers/storage/volumes
version:
  APIVersion: 3.0.0
  Built: 1606998535
  BuiltTime: Thu Dec  3 12:28:55 2020
  GitCommit: 85b412ddcdacb635e13ec67ecd2df5990dbdca02
  GoVersion: go1.15.5
  OsArch: linux/amd64
  Version: 3.0.0-dev

Package info (e.g. output of rpm -q podman or apt list podman):

podman 2.2.0+rc2+112+g85b412ddc-1

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?

Yes

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Dec 3, 2020
@vrothberg
Copy link
Member

Thanks for opening the issue! I am going to tackle it directly (given I wrote the bug).

@vrothberg vrothberg self-assigned this Dec 3, 2020
@vrothberg vrothberg added the In Progress This issue is actively being worked by the assignee, please do not work on this at this time. label Dec 3, 2020
vrothberg added a commit to vrothberg/image that referenced this issue Dec 3, 2020
When a short-name could not be resolved to an alias and if there's no
unqualified-search registry, throw an error.

Reported-in: github.com/containers/podman/issues/8573
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
@vrothberg
Copy link
Member

Opened containers/image#1090 over a containers/image.

vrothberg added a commit to vrothberg/image that referenced this issue Dec 4, 2020
When a short-name could not be resolved to an alias and if there's no
unqualified-search registry, throw an error.

Reported-in: github.com/containers/podman/issues/8573
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
vrothberg added a commit to vrothberg/image that referenced this issue Dec 4, 2020
When a short-name could not be resolved to an alias and if there's no
unqualified-search registry, throw an error.

Reported-in: github.com/containers/podman/issues/8573
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
vrothberg added a commit to vrothberg/image that referenced this issue Dec 5, 2020
When a short-name could not be resolved to an alias and if there's no
unqualified-search registry, throw an error.

Reported-in: github.com/containers/podman/issues/8573
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
vrothberg added a commit to containers/image that referenced this issue Dec 5, 2020
When a short-name could not be resolved to an alias and if there's no
unqualified-search registry, throw an error.

Reported-in: github.com/containers/podman/issues/8573
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
@github-actions
Copy link

github-actions bot commented Jan 3, 2021

A friendly reminder that this issue had no activity for 30 days.

@rhatdan
Copy link
Member

rhatdan commented Jan 4, 2021

@vrothberg Ok so this is fixed in containers/image and will be fixed in the next merge in Podman correct?

@vrothberg
Copy link
Member

@vrothberg Ok so this is fixed in containers/image and will be fixed in the next merge in Podman correct?

Thanks for the ping! It was fixed with containers/image v5.9.0 which is already merged into the main branch, so we can close this issue.

@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 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
In Progress This issue is actively being worked by the assignee, please do not work on this at this time. 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. stale-issue
Projects
None yet
Development

No branches or pull requests

4 participants