podman: kill cpcontainer: could not be stopped... sending SIGKILL... container state improper
[+0401s] not ok 127 podman cp file from host to container
....
# podman cp /tmp/podman_bats.rNSXlF/cp-test-file-host-to-ctr/hostfile0 cpcontainer:/IdoNotExist/
Error: "/IdoNotExist/" could not be found on container cpcontainer: no such file or directory
[ rc=125 (expected) ]
# podman kill cpcontainer
cpcontainer
# podman rm -t 0 -f cpcontainer
open pidfd: No such process
Error: cannot remove container <ID> as it could not be stopped: sending SIGKILL to container <ID>: container state improper
[ rc=2 (** EXPECTED 0 **) ]
[sys] 127 podman cp file from host to container
- fedora-36-aarch64 : sys podman fedora-36-aarch64 root host
- fedora-36-aarch64 : sys remote fedora-36-aarch64 root host [remote]
Only two instances so far, both on f36 aarch64 root.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (9 by maintainers)
Commits related to this issue
- KillContainer: improve error message To improve the error message reported in #16142 where the container is reported to be in the wrong state but we do not know which. This is not a fix for #16142 b... — committed to vrothberg/libpod by vrothberg 2 years ago
- kill: wait for the container Make sure to wait for the container to exit after kill. While the cleanup process will take care eventually of transitioning the state, we need to give a guarantee to the... — committed to vrothberg/libpod by vrothberg 2 years ago
- kill: wait for the container Make sure to wait for the container to exit after kill. While the cleanup process will take care eventually of transitioning the state, we need to give a guarantee to the... — committed to vrothberg/libpod by vrothberg 2 years ago
- KillContainer: improve error message To improve the error message reported in #16142 where the container is reported to be in the wrong state but we do not know which. This is not a fix for #16142 b... — committed to mheon/libpod by vrothberg 2 years ago
- kill: wait for the container Make sure to wait for the container to exit after kill. While the cleanup process will take care eventually of transitioning the state, we need to give a guarantee to the... — committed to mheon/libpod by vrothberg 2 years ago
- container kill: handle stopped/exited container The container lock is released before stopping/killing which implies certain race conditions with, for instance, the cleanup process changing the conta... — committed to vrothberg/libpod by vrothberg a year ago
https://github.com/containers/podman/pull/16320 should fix the issue. It’s slightly different but effectively a similar scenario as before. When sending signals to the container, Podman releases the lock to prevent
podman stopfrom blocking any other command trying to do something with the container. In the last failure above, the container exited so the container wasn’t running anymore.