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

Running system service with --time=0 connections appear to grow without limit #8208

Closed
mwhahaha opened this issue Oct 31, 2020 · 1 comment · Fixed by #8209
Closed

Running system service with --time=0 connections appear to grow without limit #8208

mwhahaha opened this issue Oct 31, 2020 · 1 comment · Fixed by #8209
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

@mwhahaha
Copy link
Contributor

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

/kind bug

Description

When you run the podman system service to provide the api, each request looks like it creates connections for each request and the number doesn't shrink. If you're using socket activation it's probably not a problem, but if the service never stops it might become an issue. I don't know if this is an actual issue or if the numbers being reported are incorrect.

Steps to reproduce the issue:

  1. sudo podman --log-level debug system service --time=0 unix:///tmp/podman.sock

  2. sudo chmod a+rw /tmp/podman.sock

  3. curl --unix-socket /tmp/podman.sock "http:/libpod/_ping" && curl --unix-socket /tmp/podman.sock "http:/libpod/_ping" && curl --unix-socket /tmp/podman.sock "http:/libpod/_ping"

Describe the results you received:

Logging indicates connections growing for each request

DEBU[0000] API Server idle for 0s
DEBU[0000] APIServer.Shutdown ignored as Duration is UnlimitedService.
DEBU[0068] IdleTracker 0xc000010008:new 0/0 connection(s)
DEBU[0068] IdleTracker 0xc000010008:active 1/1 connection(s)
DEBU[0068] APIHandler -- Method: GET URL: /_ping
DEBU[0068] IdleTracker 0xc000010008:idle 1/2 connection(s)
DEBU[0068] IdleTracker 0xc000010008:closed 0/2 connection(s)
DEBU[0069] IdleTracker 0xc000010148:new 0/2 connection(s)
DEBU[0069] IdleTracker 0xc000010148:active 1/3 connection(s)
DEBU[0069] APIHandler -- Method: GET URL: /_ping
DEBU[0069] IdleTracker 0xc000010148:idle 1/4 connection(s)
DEBU[0069] IdleTracker 0xc000010148:closed 0/4 connection(s)
DEBU[0069] IdleTracker 0xc000010218:new 0/4 connection(s)
DEBU[0069] IdleTracker 0xc000010218:active 1/5 connection(s)
DEBU[0069] APIHandler -- Method: GET URL: /_ping
DEBU[0069] IdleTracker 0xc000010218:idle 1/6 connection(s)
DEBU[0069] IdleTracker 0xc000010218:closed 0/6 connection(s)
DEBU[0070] IdleTracker 0xc000114178:new 0/6 connection(s)
DEBU[0070] IdleTracker 0xc000114178:active 1/7 connection(s)

Describe the results you expected:

Connections shouldn't grow

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

Output of podman version:

Version:      2.1.1
API Version:  2.0.0
Go Version:   go1.14.9
Built:        Wed Sep 30 13:31:11 2020
OS/Arch:      linux/amd64

Output of podman info --debug:

host:
  arch: amd64
  buildahVersion: 1.16.1
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.0.21-2.fc32.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.0.21, commit: 81d18b6c3ffc266abdef7ca94c1450e669a6a388'
  cpus: 8
  distribution:
    distribution: fedora
    version: "32"
  eventLogger: journald
  hostname: aschultz.scyph.us
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 5.8.16-200.fc32.x86_64
  linkmode: dynamic
  memFree: 9043550208
  memTotal: 33504477184
  ociRuntime:
    name: crun
    package: crun-0.15-5.fc32.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 0.15
      commit: 56ca95e61639510c7dbd39ff512f80f626404969
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +YAJL
  os: linux
  remoteSocket:
    exists: true
    path: /run/podman/podman.sock
  rootless: false
  slirp4netns:
    executable: ""
    package: ""
    version: ""
  swapFree: 16823349248
  swapTotal: 16823349248
  uptime: 102h 9m 31.45s (Approximately 4.25 days)
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - registry.centos.org
  - docker.io
store:
  configFile: /etc/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions:
    overlay.mountopt: nodev,metacopy=on
  graphRoot: /var/lib/containers/storage
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "true"
  imageStore:
    number: 2
  runRoot: /var/run/containers/storage
  volumePath: /var/lib/containers/storage/volumes
version:
  APIVersion: 2.0.0
  Built: 1601494271
  BuiltTime: Wed Sep 30 13:31:11 2020
  GitCommit: ""
  GoVersion: go1.14.9
  OsArch: linux/amd64
  Version: 2.1.1

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

podman-remote-2.1.1-7.fc32.x86_64
podman-compose-0.1.5-3.git20191107.fc32.noarch
podman-2.1.1-7.fc32.x86_64
podman-plugins-2.1.1-7.fc32.x86_64

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

No

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 Oct 31, 2020
@mwhahaha
Copy link
Contributor Author

mwhahaha commented Nov 1, 2020

Never mind I looked in the code, that's the total number of connections that have been made. There does seem to be a bug in the count however because the number of connections gets increased when the state is New and Active so it's double counting.

mwhahaha added a commit to mwhahaha/podman that referenced this issue Nov 1, 2020
Currently it double counts connections because it's incrementing the
total for both the new and active states. Based on the comments, we
should only count new connections for the total count and perform the
timer stop actions when the connection has transitioned to an active
state.

Closes containers#8208

Signed-off-by: Alex Schultz <[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 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
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