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

[podman-remote] version: panic: runtime error: invalid memory address or nil pointer dereference #3145

Closed
Edward5hen opened this issue May 17, 2019 · 1 comment · Fixed by #3146
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

@Edward5hen
Copy link
Contributor

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

/kind bug

Description
I tried to use the ./podman-remote version feature. The command can show the version information about the client node correctly, but an error encountered for the service node.

Steps to reproduce the issue:

  1. ./podman-remote version

Describe the results you received:

[root@localhost bin]# ./podman-remote version
Client:
Version:            1.3.2-dev
RemoteAPI Version:  1
Go Version:         go1.11.7
Git Commit:         ee1383a7b9a1fc7bda96b47fb9a1f38dc5e36d24
Built:              Fri May 17 14:11:45 2019
OS/Arch:            linux/amd64

Service:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1221561]

goroutine 1 [running]:
github.com/containers/libpod/pkg/adapter.GetRuntime(0x17dcb40, 0xc0000420c0, 0x0, 0xa, 0x0, 0x0)
	/root/go/src/github.com/containers/libpod/pkg/adapter/runtime_remote.go:54 +0x81
main.versionCmd(0x25d3bc0, 0x0, 0x0)
	/root/go/src/github.com/containers/libpod/cmd/podman/version.go:73 +0x476
main.glob..func69(0x2572900, 0x25f6ab0, 0x0, 0x0, 0x0, 0x0)
	/root/go/src/github.com/containers/libpod/cmd/podman/version.go:29 +0x86
github.com/containers/libpod/vendor/github.com/spf13/cobra.(*Command).execute(0x2572900, 0xc00000c070, 0x0, 0x0, 0x2572900, 0xc00000c070)
	/root/go/src/github.com/containers/libpod/vendor/github.com/spf13/cobra/command.go:762 +0x473
github.com/containers/libpod/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x2572dc0, 0xf, 0x25f8660, 0xc000280d00)
	/root/go/src/github.com/containers/libpod/vendor/github.com/spf13/cobra/command.go:852 +0x2fd
github.com/containers/libpod/vendor/github.com/spf13/cobra.(*Command).Execute(0x2572dc0, 0xc0006ea160, 0xc00008a058)
	/root/go/src/github.com/containers/libpod/vendor/github.com/spf13/cobra/command.go:800 +0x2b
main.main()
	/root/go/src/github.com/containers/libpod/cmd/podman/main.go:142 +0x3c

Describe the results you expected:
should show the version information of service end correctly as well.

Output of podman version:
remote node:

[root@localhost bin]# podman version
Version:            1.3.2-dev
RemoteAPI Version:  1
Go Version:         go1.11.7
Git Commit:         ee1383a7b9a1fc7bda96b47fb9a1f38dc5e36d24
Built:              Fri May 17 14:10:44 2019
OS/Arch:            linux/amd64

podman node:

[root@localhost ~]# podman version
Version:            1.3.2-dev
RemoteAPI Version:  1
Go Version:         go1.11.7
Git Commit:         ee1383a7b9a1fc7bda96b47fb9a1f38dc5e36d24
Built:              Fri May 17 14:08:01 2019
OS/Arch:            linux/amd64

Output of podman info --debug:
client node:

[root@localhost bin]# podman info --debug
debug:
  compiler: gc
  git commit: ee1383a7b9a1fc7bda96b47fb9a1f38dc5e36d24
  go version: go1.11.7
  podman version: 1.3.2-dev
host:
  BuildahVersion: 1.8.2
  Conmon:
    package: conmon-1.12.0-12.dev.gitc4f232a.fc29.x86_64
    path: /usr/libexec/crio/conmon
    version: 'conmon version 1.12.0-dev, commit: ed74efc8af284f786e041e8a98a910db4b2c0ec7'
  Distribution:
    distribution: fedora
    version: "29"
  MemFree: 1261670400
  MemTotal: 2089115648
  OCIRuntime:
    package: runc-1.0.0-92.dev.gitc1b8c57.fc29.x86_64
    path: /usr/bin/runc
    version: |-
      runc version 1.0.0-rc7+dev
      commit: 7f820969cc1cc8ea3357b39f2e2e1514f71c6fec
      spec: 1.0.1-dev
  SwapFree: 2146942976
  SwapTotal: 2147479552
  arch: amd64
  cpus: 1
  hostname: localhost.localdomain
  kernel: 4.18.16-300.fc29.x86_64
  os: linux
  rootless: false
  uptime: 216h 6m 28.46s (Approximately 9.00 days)
registries:
  blocked: null
  insecure: null
  search:
  - docker.io
  - registry.fedoraproject.org
  - quay.io
  - registry.access.redhat.com
  - registry.centos.org
store:
  ConfigFile: /etc/containers/storage.conf
  ContainerStore:
    number: 0
  GraphDriverName: overlay
  GraphOptions:
  - overlay.mountopt=nodev
  GraphRoot: /var/lib/containers/storage
  GraphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  ImageStore:
    number: 0
  RunRoot: /var/run/containers/storage
  VolumePath: /var/lib/containers/storage/volumes

podman node:

[root@localhost ~]# podman info --debug
debug:
  compiler: gc
  git commit: ee1383a7b9a1fc7bda96b47fb9a1f38dc5e36d24
  go version: go1.11.7
  podman version: 1.3.2-dev
host:
  BuildahVersion: 1.8.2
  Conmon:
    package: conmon-1.12.0-12.dev.gitc4f232a.fc29.x86_64
    path: /usr/libexec/crio/conmon
    version: 'conmon version 1.12.0-dev, commit: ed74efc8af284f786e041e8a98a910db4b2c0ec7'
  Distribution:
    distribution: fedora
    version: "29"
  MemFree: 1116770304
  MemTotal: 2089115648
  OCIRuntime:
    package: runc-1.0.0-92.dev.gitc1b8c57.fc29.x86_64
    path: /usr/bin/runc
    version: |-
      runc version 1.0.0-rc7+dev
      commit: 7f820969cc1cc8ea3357b39f2e2e1514f71c6fec
      spec: 1.0.1-dev
  SwapFree: 2147205120
  SwapTotal: 2147479552
  arch: amd64
  cpus: 1
  hostname: localhost.localdomain
  kernel: 4.18.16-300.fc29.x86_64
  os: linux
  rootless: false
  uptime: 215h 41m 35.35s (Approximately 8.96 days)
registries:
  blocked: null
  insecure: null
  search:
  - docker.io
  - registry.fedoraproject.org
  - quay.io
  - registry.access.redhat.com
  - registry.centos.org
store:
  ConfigFile: /etc/containers/storage.conf
  ContainerStore:
    number: 0
  GraphDriverName: overlay
  GraphOptions:
  - overlay.mountopt=nodev
  GraphRoot: /var/lib/containers/storage
  GraphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  ImageStore:
    number: 5
  RunRoot: /var/run/containers/storage
  VolumePath: /var/lib/containers/storage/volumes

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

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

Hi @Edward5hen, thanks for taking the time to open this issue. I can reproduce with the latest master as well.

vrothberg added a commit to vrothberg/libpod that referenced this issue May 17, 2019
Fix a nil dereference by passing the PodmanCommand to GetRuntime().

Fixes: containers#3145
Signed-off-by: Valentin Rothberg <rothberg@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 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

Successfully merging a pull request may close this issue.

3 participants