Skip to content

Quadlet container stucks in stopping state #26640

@NotSoFancyName

Description

@NotSoFancyName

Issue Description

I am trying to achieve the same behavior as with podman stop -t 0 <nameOrId> for a Quadlet container (I want to stop it immediately, regardless of its configuration). To do this, I use systemctl --user kill --signal=SIGKILL <service>. However, I am experiencing an issue while running this command when the container is already in stopping state, triggered by systemctl --user stop <service> . The container stays in the stopping state forever.

Since @mheon mentioned that this is expected behaviour I have also have created a question in the Discussion section.

Steps to reproduce the issue

Steps to reproduce the issue

  1. Create a quadlet container unit file ~/.config/containers/systemd/test.container with following content:
[Container]
Image=alpine
ContainerName=test
Exec=sleep 1000

[Service]
TimeoutStartSec=600
  1. Do systemctl --user daemon-reload
  2. Do systemctl --user start test
  3. Do systemctl --user stop test
  4. In the other terminal tab do systemctl --user kill --signal=SIGKILL test
  5. Do podman ps -a

Describe the results you received

After doing podman ps -a container stays in the stopping state:

322847aaa139  docker.io/library/alpine:latest             sleep 1000              33 seconds ago       Stopping                           test

and the systemd service status:

× test.service
     Loaded: loaded (/home/vova/.config/containers/systemd/test.container; generated)
    Drop-In: /etc/systemd/user/service.d
             └─10-timeout-abort.conf
     Active: failed (Result: signal) since Tue 2025-07-15 11:22:21 CEST; 53min ago
   Duration: 16.652s
 Invocation: fdec367daf91437fabe74e5f0504efe5
    Process: 2510870 ExecStart=/usr/bin/podman run --name test --cidfile=/run/user/1000/test.cid --replace --rm --cgroups=split --sdnotify=conmon -d alpine sleep 1000 (code=killed, signal=KILL)
    Process: 2511073 ExecStop=/usr/bin/podman rm -v -f -i --cidfile=/run/user/1000/test.cid (code=killed, signal=KILL)
    Process: 2511160 ExecStopPost=/usr/bin/podman rm -v -f -i --cidfile=/run/user/1000/test.cid (code=killed, signal=KILL)
   Main PID: 2510870 (code=killed, signal=KILL)
   Mem peak: 45.8M
        CPU: 306ms

Describe the results you expected

There is no container in the list after doing podman ps -a

podman info output

host:
  arch: amd64
  buildahVersion: 1.40.1
  cgroupControllers:
  - cpu
  - io
  - memory
  - pids
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.1.13-1.fc42.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.13, commit: '
  cpuUtilization:
    idlePercent: 94.52
    systemPercent: 1.94
    userPercent: 3.55
  cpus: 16
  databaseBackend: sqlite
  distribution:
    distribution: fedora
    variant: workstation
    version: "42"
  eventLogger: journald
  freeLocks: 2026
  hostname: dhcp-10-29-246-140
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 524288
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 524288
      size: 65536
  kernel: 6.15.3-200.fc42.x86_64
  linkmode: dynamic
  logDriver: journald
  memFree: 668872704
  memTotal: 32914616320
  networkBackend: netavark
  networkBackendInfo:
    backend: netavark
    dns:
      package: aardvark-dns-1.15.0-1.fc42.x86_64
      path: /usr/libexec/podman/aardvark-dns
      version: aardvark-dns 1.15.0
    package: netavark-1.15.2-1.fc42.x86_64
    path: /usr/libexec/podman/netavark
    version: netavark 1.15.2
  ociRuntime:
    name: crun
    package: crun-1.21-1.fc42.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 1.21
      commit: 10269840aa07fb7e6b7e1acff6198692d8ff5c88
      rundir: /run/user/1000/crun
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +LIBKRUN +WASM:wasmedge +YAJL
  os: linux
  pasta:
    executable: /usr/bin/pasta
    package: passt-0^20250611.g0293c6f-1.fc42.x86_64
    version: |
      pasta 0^20250611.g0293c6f-1.fc42.x86_64
      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: true
    path: /run/user/1000/podman/podman.sock
  rootlessNetworkCmd: pasta
  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: true
  serviceIsRemote: false
  slirp4netns:
    executable: ""
    package: ""
    version: ""
  swapFree: 7954321408
  swapTotal: 8589930496
  uptime: 167h 25m 13.00s (Approximately 6.96 days)
  variant: ""
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - docker.io
store:
  configFile: /home/vova/.config/containers/storage.conf
  containerStore:
    number: 15
    paused: 0
    running: 13
    stopped: 2
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /home/vova/.local/share/containers/storage
  graphRootAllocated: 1022488477696
  graphRootUsed: 87937064960
  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: 1265
  runRoot: /run/user/1000/containers
  transientStore: false
  volumePath: /home/vova/.local/share/containers/storage/volumes
version:
  APIVersion: 5.5.2
  BuildOrigin: Fedora Project
  Built: 1750723200
  BuiltTime: Tue Jun 24 02:00:00 2025
  GitCommit: e7d8226745ba07a64b7176a7f128e4ef53225a0e
  GoVersion: go1.24.4
  Os: linux
  OsArch: linux/amd64
  Version: 5.5.2

Podman in a container

No

Privileged Or Rootless

Rootless

Upstream Latest Release

Yes

Additional environment details

No response

Additional information

No response

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.triagedIssue has been triaged

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions