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 coredumps when commiting through varlink with wrong arguments #3897

Closed
marusak opened this issue Aug 28, 2019 · 0 comments · Fixed by #3907
Closed

podman coredumps when commiting through varlink with wrong arguments #3897

marusak opened this issue Aug 28, 2019 · 0 comments · Fixed by #3907
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. remote Problem is in podman-remote

Comments

@marusak
Copy link
Contributor

marusak commented Aug 28, 2019

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

/kind bug

Description
With new version of podman (podman-1.5.1-3.fc30.x86_64) podman coredumps when I am trying to commit and I provide wrong arguments. This works fine when done with commandline directly.

Steps to reproduce the issue:

  1. sudo podman run --name c1 fedora
  2. sudo varlink call unix:/run/podman/io.podman/io.podman.Commit '{ "image_name": "FOO", "format": "oci", "name": "c1" }'
Call failed with error: io.podman.ErrorOccurred
{
  "reason": "error resolving name \"FOO\": error parsing image name \"FOO\": invalid reference format: repository name must be lowercase"
}

I know that the name cannot be uppercase. However it should not coredump. When I do

$ sudo podman commit c1 FOO
Error: error resolving name "FOO": error parsing image name "FOO": invalid reference format: repository name must be lowercase

it ends up with the same error message but podman does not coredump. Also calling the same varlink command on previous version (1.4.0) of podman also does not coredump. So this is current regression.

Describe the results you received:
I see coredump in journal and also io.podman.service fails:

sudo systemctl status io.podman.service
● io.podman.service - Podman Remote API Service
   Loaded: loaded (/usr/lib/systemd/system/io.podman.service; disabled; vendor preset: disabled)
   Active: failed (Result: signal) since Wed 2019-08-28 10:47:22 CEST; 2s ago
     Docs: man:podman-varlink(1)
  Process: 13837 ExecStart=/usr/bin/podman varlink unix:/run/podman/io.podman (code=killed, signal=ABRT)
 Main PID: 13837 (code=killed, signal=ABRT)
    Tasks: 30 (limit: 4915)
   Memory: 681.0M
   CGroup: /system.slice/io.podman.service
           ├─ 7180 /usr/bin/podman varlink unix:/run/podman/io.podman
           └─24701 /usr/bin/podman varlink unix:/run/podman/io.podman

Aug 28 10:47:22 localhost.localdomain podman[13837]: net.(*conn).Close(0xc00052a150, 0x0, 0x0)
Aug 28 10:47:22 localhost.localdomain podman[13837]:         /usr/lib/golang/src/net/net.go:201 +0x4d fp=0xc0004e9ed0 sp=0xc0004e9e98 pc=0x5632eda3316d
Aug 28 10:47:22 localhost.localdomain podman[13837]: github.com/containers/libpod/vendor/github.com/varlink/go/varlink.(*Service).handleConnection(0xc0000d6840, 0x5632ef38aaa0, 0xc00052a150, 0xc0003defe0)
Aug 28 10:47:22 localhost.localdomain podman[13837]:         /builddir/build/BUILD/libpod-00057929f5acfd98341964d85722383363376d52/_build/src/github.com/containers/libpod/vendor/github.com/varlink/go/varlink/service.go:144 +0x21a fp=0xc0>
Aug 28 10:47:22 localhost.localdomain podman[13837]: runtime.goexit()
Aug 28 10:47:22 localhost.localdomain podman[13837]:         /usr/lib/golang/src/runtime/asm_amd64.s:1337 +0x1 fp=0xc0004e9fc8 sp=0xc0004e9fc0 pc=0x5632ed921521
Aug 28 10:47:22 localhost.localdomain podman[13837]: created by github.com/containers/libpod/vendor/github.com/varlink/go/varlink.(*Service).Listen
Aug 28 10:47:22 localhost.localdomain podman[13837]:         /builddir/build/BUILD/libpod-00057929f5acfd98341964d85722383363376d52/_build/src/github.com/containers/libpod/vendor/github.com/varlink/go/varlink/service.go:290 +0x1e6
Aug 28 10:47:22 localhost.localdomain systemd[1]: io.podman.service: Main process exited, code=killed, status=6/ABRT
Aug 28 10:47:22 localhost.localdomain systemd[1]: io.podman.service: Failed with result 'signal'.

Describe the results you expected:
I except it to fail with error but service should not fail nor coredump happen.
If needed I can also get proper tracebacks, but it seems it is 100% easily reproducible.

Output of podman version:

Version:            1.5.1
RemoteAPI Version:  1
Go Version:         go1.12.7
OS/Arch:            linux/amd64

Output of podman info --debug:

debug:
  compiler: gc
  git commit: ""
  go version: go1.12.7
  podman version: 1.5.1
host:
  BuildahVersion: 1.10.1
  Conmon:
    package: podman-1.5.1-3.fc30.x86_64
    path: /usr/libexec/podman/conmon
    version: 'conmon version 2.0.0, commit: d728afa06cd2df86a27f32a4692c7099a56acc97-dirty'
  Distribution:
    distribution: fedora
    version: "30"
  MemFree: 591347712
  MemTotal: 16452161536
  OCIRuntime:
    package: containerd.io-1.2.1-2.0.rc.0.1.fc29.x86_64
    path: /usr/sbin/runc
    version: |-
      runc version 1.0.0-rc5+dev
      commit: 10d38b660a77168360df3522881e2dc2be5056bd
      spec: 1.0.1-dev
  SwapFree: 0
  SwapTotal: 0
  arch: amd64
  cpus: 4
  eventlogger: journald
  hostname: localhost.localdomain
  kernel: 5.2.7-200.fc30.x86_64
  os: linux
  rootless: true
  uptime: 154h 0m 22.36s (Approximately 6.42 days)
registries:
  blocked: null
  insecure: null
  search:
  - docker.io
  - registry.fedoraproject.org
  - quay.io
  - registry.access.redhat.com
  - registry.centos.org
store:
  ConfigFile: /home/mmarusak/.config/containers/storage.conf
  ContainerStore:
    number: 1
  GraphDriverName: overlay
  GraphOptions:
  - overlay.mount_program=/usr/bin/fuse-overlayfs
  GraphRoot: /home/mmarusak/.local/share/containers/storage
  GraphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "false"
  ImageStore:
    number: 2
  RunRoot: /run/user/1000
  VolumePath: /home/mmarusak/.local/share/containers/storage/volumes

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

podman-1.5.1-3.fc30.x86_64

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Aug 28, 2019
marusak added a commit to marusak/cockpit-podman that referenced this issue Aug 28, 2019
See containers/podman#3897
I haven't done naughty, since this is not that super important thing to
test and also things that follow are more important for us to test.

Once it is fixed, this commit should be reverted.
@mheon mheon added the remote Problem is in podman-remote label Aug 28, 2019
KKoukiou pushed a commit to cockpit-project/cockpit-podman that referenced this issue Aug 28, 2019
See containers/podman#3897
I haven't done naughty, since this is not that super important thing to
test and also things that follow are more important for us to test.

Once it is fixed, this commit should be reverted.
baude added a commit to baude/podman that referenced this issue Aug 29, 2019
when using an upper case image name for container commit, we observed
panics due to a channel closing early.

Fixes: containers#3897

Signed-off-by: baude <bbaude@redhat.com>
weirdwiz pushed a commit to weirdwiz/libpod that referenced this issue Sep 5, 2019
when using an upper case image name for container commit, we observed
panics due to a channel closing early.

Fixes: containers#3897

Signed-off-by: baude <bbaude@redhat.com>
marusak added a commit to marusak/cockpit-podman that referenced this issue Jan 7, 2020
Issue containers/podman#3897 has been fixed a
few months ago, it reached Fedora 30 and 31 as well as RHEL 8.2.
marusak added a commit to marusak/cockpit-podman that referenced this issue Jan 7, 2020
Issue containers/podman#3897 has been fixed a
few months ago, it reached Fedora 30 and 31 as well as RHEL 8.2.

Closes cockpit-project#284
marusak added a commit to marusak/cockpit-podman that referenced this issue Jan 8, 2020
Issue containers/podman#3897 has been fixed a
few months ago, it reached Fedora 30 and 31 as well as RHEL 8.2.

Closes cockpit-project#284
marusak added a commit to cockpit-project/cockpit-podman that referenced this issue Jan 8, 2020
Issue containers/podman#3897 has been fixed a
few months ago, it reached Fedora 30 and 31 as well as RHEL 8.2.

Closes #284
@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. remote Problem is in podman-remote
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants