Skip to content

Podman service silently fails if a handler panics #5151

@jwhonce

Description

@jwhonce

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

/kind bug

Description

If code in a handler panics, there is no report to the client.

Steps to reproduce the issue:

  1. curl --unix-socket /run/podman/podman.sock -v http://localhost/v1.40/containers/json?all=True

Describe the results you received:

  • Trying /run/podman/podman.sock:0...
  • Connected to localhost (/run/podman/podman.sock) port 80 (#0)

GET /v1.40/containers/json?all=True HTTP/1.1
Host: localhost
User-Agent: curl/7.66.0
Accept: /

  • Empty reply from server
  • Connection #0 to host localhost left intact
    curl: (52) Empty reply from server

Describe the results you expected:
Populated result from server. At a minimum a 500 with details logged on the server

Additional information you deem important (e.g. issue happens only occasionally):

Output of podman version:

Version:            1.7.1-dev
RemoteAPI Version:  1
Go Version:         go1.12.13
Git Commit:         8beeb067aac857deb29e91562cf4b6f068fe0328-dirty
Built:              Thu Jan 23 14:32:52 2020
OS/Arch:            linux/amd64

Output of podman info --debug:

debug:
  compiler: gc
  git commit: c02b3b5e139de90f7e03a5b08b5c49add8107380-dirty
  go version: go1.12.13
  podman version: 1.8.1-dev
host:
  BuildahVersion: 1.13.1
  CgroupVersion: v2
  Conmon:
    package: conmon-2.0.10-2.fc31.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.0.10, commit: 6b526d9888abb86b9e7de7dfdeec0da98ad32ee0'
  Distribution:
    distribution: fedora
    version: "31"
  IDMappings:
    gidmap:
    - container_id: 0
      host_id: 17945
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 17945
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
  MemFree: 1973223424
  MemTotal: 33487138816
  OCIRuntime:
    name: crun
    package: crun-0.10.6-1.fc31.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 0.10.6
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +YAJL
  SwapFree: 16298274816
  SwapTotal: 16877875200
  arch: amd64
  cpus: 8
  eventlogger: journald
  hostname: jhonce-fc.local
  kernel: 5.4.15-200.fc31.x86_64
  os: linux
  rootless: true
  slirp4netns:
    Executable: /usr/bin/slirp4netns
    Package: slirp4netns-0.4.0-20.1.dev.gitbbd6f25.fc31.x86_64
    Version: |-
      slirp4netns version 0.4.0-beta.3+dev
      commit: bbd6f25c70d5db2a1cd3bfb0416a8db99a75ed7e
  uptime: 95h 57m 32.96s (Approximately 3.96 days)
registries:
  search:
  - docker.io
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - registry.centos.org
  - quay.io
store:
  ConfigFile: /home/jhonce/.config/containers/storage.conf
  ContainerStore:
    number: 10
  GraphDriverName: overlay
  GraphOptions:
    overlay.mount_program:
      Executable: /usr/bin/fuse-overlayfs
      Package: fuse-overlayfs-0.7.5-2.fc31.x86_64
      Version: |-
        fusermount3 version: 3.6.2
        fuse-overlayfs: version 0.7.5
        FUSE library version 3.6.2
        using FUSE kernel interface version 7.29
  GraphRoot: /home/jhonce/.local/share/containers/storage
  GraphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "false"
  ImageStore:
    number: 16
  RunRoot: /run/user/17945
  VolumePath: /home/jhonce/.local/share/containers/storage/volumes```

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

Built from master


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

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.locked - please file new issue/PRAssist humans wanting to comment on an old issue or PR with locked comments.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions