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 stop container hanging #22671

Closed
mah454 opened this issue May 11, 2024 · 4 comments
Closed

Podman stop container hanging #22671

mah454 opened this issue May 11, 2024 · 4 comments
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. stale-issue

Comments

@mah454
Copy link

mah454 commented May 11, 2024

Issue Description

podman does not stop my simple container .
actually i found this problem on busybox with /bin/sh cmd . but i also tested on my own simple c programming application .

#include <stdio.h> 
void main() {
        while (1) {
             printf("Hello\n");
        }
}

i just compile this code with --static-pie and create container image from that .
container started but does not stop !

CONTAINER ID  IMAGE                  COMMAND     CREATED         STATUS      PORTS       NAMES
2ae1a3f7fbcd  localhost/main:latest  /main       22 seconds ago  Stopping                test
podman version
---------------------------------
Client:       Podman Engine
Version:      4.9.3
API Version:  4.9.3
Go Version:   go1.22.1
Built:        Thu Jan  1 03:30:00 1970
OS/Arch:      linux/amd64

Steps to reproduce the issue

Steps to reproduce the issue

  1. create simple c code
  2. compile :
gcc main.c -o main --static-pie
  1. Create archive :
tar -cvf main.tar main
  1. import image:
podman import main.tar main:latest
  1. run container:
podman run -d --name=test main:latest /main 

Describe the results you received

Describe the results you received

Describe the results you expected

Describe the results you expected

podman info output

host:
  arch: amd64
  buildahVersion: 1.33.5
  cgroupControllers:
  - memory
  - pids
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon_2.0.25+ds1-1.1_amd64
    path: /usr/bin/conmon
    version: 'conmon version 2.0.25, commit: unknown'
  cpuUtilization:
    idlePercent: 88.71
    systemPercent: 3.91
    userPercent: 7.39
  cpus: 8
  databaseBackend: sqlite
  distribution:
    codename: jammy
    distribution: ubuntu
    version: "22.04"
  eventLogger: journald
  freeLocks: 2035
  hostname: skynet-laptop
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
  kernel: 5.15.0-40-generic
  linkmode: dynamic
  logDriver: journald
  memFree: 5711282176
  memTotal: 16484937728
  networkBackend: cni
  networkBackendInfo:
    backend: cni
    dns: {}
    package: containernetworking-plugins_1.1.1+ds1-3build1_amd64
    path: /usr/lib/cni
  ociRuntime:
    name: crun
    package: crun_0.17+dfsg-1.1_amd64
    path: /usr/bin/crun
    version: |-
      crun version 0.17
      commit: 0e9229ae34caaebcb86f1fde18de3acaf18c6d9a
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +YAJL
  os: linux
  pasta:
    executable: /usr/bin/pasta
    package: passt_0.0~git20240220.1e6f92b-1_amd64
    version: |
      pasta unknown version
      Copyright Red Hat
      GNU General Public License, version 2 or later
        <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
      This is free software: you are free to change and redistribute it.
      There is NO WARRANTY, to the extent permitted by law.
  remoteSocket:
    exists: false
    path: /run/user/1000/podman/podman.sock
  security:
    apparmorEnabled: false
    capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
    rootless: true
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: false
  serviceIsRemote: false
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns_1.0.1-2_amd64
    version: |-
      slirp4netns version 1.0.1
      commit: 6a7b16babc95b6a3056b33fb45b74a6f62262dd4
      libslirp: 4.7.0
  swapFree: 2147479552
  swapTotal: 2147479552
  uptime: 0h 47m 13.00s
  variant: ""
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
  docker.io:
    Blocked: false
    Insecure: false
    Location: docker.io
    MirrorByDigestOnly: false
    Mirrors: null
    Prefix: docker.io
    PullFromMirror: ""
  registry.access.redhat.com:
    Blocked: false
    Insecure: false
    Location: registry.access.redhat.com
    MirrorByDigestOnly: false
    Mirrors: null
    Prefix: registry.access.redhat.com
    PullFromMirror: ""
  registry.docker.ir:
    Blocked: false
    Insecure: false
    Location: registry.docker.ir
    MirrorByDigestOnly: false
    Mirrors: null
    Prefix: registry.docker.ir
    PullFromMirror: ""
  registry.fedoraproject.org:
    Blocked: false
    Insecure: false
    Location: registry.fedoraproject.org
    MirrorByDigestOnly: false
    Mirrors: null
    Prefix: registry.fedoraproject.org
    PullFromMirror: ""
  search:
  - registry.docker.ir
  - registry.fedoraproject.org
  - quay.io
  - docker.io
store:
  configFile: /home/mah454/.config/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /home/mah454/.local/share/containers/storage
  graphRootAllocated: 125362855936
  graphRootUsed: 56783327232
  graphStatus:
    Backing Filesystem: btrfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Supports shifting: "false"
    Supports volatile: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 2
  runRoot: /run/user/1000/containers
  transientStore: false
  volumePath: /home/mah454/.local/share/containers/storage/volumes
version:
  APIVersion: 4.9.3
  Built: 0
  BuiltTime: Thu Jan  1 03:30:00 1970
  GitCommit: ""
  GoVersion: go1.22.1
  Os: linux
  OsArch: linux/amd64
  Version: 4.9.3

Podman in a container

No

Privileged Or Rootless

None

Upstream Latest Release

Yes

Additional environment details

Additional environment details

Additional information

Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting

@mah454 mah454 added the kind/bug Categorizes issue or PR as related to a bug. label May 11, 2024
@mheon
Copy link
Member

mheon commented May 13, 2024

How long are you waiting? Your simple executable isn't registering a handler for SIGTERM, the default stop signal, so we'll try SIGTERM, it will fail, and 10 seconds later (default stop timeout) we'll move on to SIGKILL which will actually remove the container.

@Luap99
Copy link
Member

Luap99 commented May 13, 2024

@mah454 Please run the stop command with --log-level debug and show the output, I wonder if this has something to do with https://bugs.launchpad.net/ubuntu/+source/libpod/+bug/2040483

Copy link

A friendly reminder that this issue had no activity for 30 days.

@Luap99
Copy link
Member

Luap99 commented Jun 13, 2024

Closing as there is was no reply to my question

@Luap99 Luap99 closed this as not planned Won't fix, can't repro, duplicate, stale Jun 13, 2024
@stale-locking-app stale-locking-app 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 12, 2024
@stale-locking-app stale-locking-app bot locked as resolved and limited conversation to collaborators Sep 12, 2024
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. stale-issue
Projects
None yet
Development

No branches or pull requests

3 participants