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 service silently fails if a handler panics #5151

Closed
jwhonce opened this issue Feb 10, 2020 · 0 comments · Fixed by #5158
Closed

Podman service silently fails if a handler panics #5151

jwhonce opened this issue Feb 10, 2020 · 0 comments · Fixed by #5158
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

@jwhonce
Copy link
Member

jwhonce commented Feb 10, 2020

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.):**
@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Feb 10, 2020
@jwhonce jwhonce self-assigned this Feb 10, 2020
jwhonce added a commit to jwhonce/podman that referenced this issue Feb 17, 2020
On panic from handler: log warning and stack trace, report
InternalServerError to client

When using `podman system service` make determining the listening endpoint deterministic.

  // When determining _*THE*_ listening endpoint --
  // 1) User input wins always
  // 2) systemd socket activation
  // 3) rootless honors XDG_RUNTIME_DIR
  // 4) if varlink -- adapter.DefaultVarlinkAddress
  // 5) lastly adapter.DefaultAPIAddress

Fixes containers#5150
Fixes containers#5151

Signed-off-by: Jhon Honce <[email protected]>
snj33v pushed a commit to snj33v/libpod that referenced this issue May 31, 2020
On panic from handler: log warning and stack trace, report
InternalServerError to client

When using `podman system service` make determining the listening endpoint deterministic.

  // When determining _*THE*_ listening endpoint --
  // 1) User input wins always
  // 2) systemd socket activation
  // 3) rootless honors XDG_RUNTIME_DIR
  // 4) if varlink -- adapter.DefaultVarlinkAddress
  // 5) lastly adapter.DefaultAPIAddress

Fixes containers#5150
Fixes containers#5151

Signed-off-by: Jhon Honce <[email protected]>
@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.

2 participants