-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Panic on container stop #9615
Comments
@mheon looks like a locking issue. |
Panic is unlocking a lock that is already unlocked. I'll look deeper. |
Think I've got it, but I have no idea how to write a test. |
#9624 should fix. |
Unlocking an already unlocked lock is a panic. As such, we have to make sure that the deferred c.lock.Unlock() in c.StopWithTimeout() always runs on a locked container. There was a case in c.stop() where we could return an error after we unlock the container to stop it, but before we re-lock it - thus allowing for a double-unlock to occur. Fix the error return to not happen until after the lock has been re-acquired. Fixes containers#9615 Signed-off-by: Matthew Heon <[email protected]>
Unlocking an already unlocked lock is a panic. As such, we have to make sure that the deferred c.lock.Unlock() in c.StopWithTimeout() always runs on a locked container. There was a case in c.stop() where we could return an error after we unlock the container to stop it, but before we re-lock it - thus allowing for a double-unlock to occur. Fix the error return to not happen until after the lock has been re-acquired. Fixes containers#9615 Signed-off-by: Matthew Heon <[email protected]>
Unlocking an already unlocked lock is a panic. As such, we have to make sure that the deferred c.lock.Unlock() in c.StopWithTimeout() always runs on a locked container. There was a case in c.stop() where we could return an error after we unlock the container to stop it, but before we re-lock it - thus allowing for a double-unlock to occur. Fix the error return to not happen until after the lock has been re-acquired. Fixes containers#9615 Signed-off-by: Matthew Heon <[email protected]>
Is there any way to manually change the state of the container? I can't afford to remove it the container. After stopping, there was a panic and now it's in a perpetual "is in state stopping: container state improper" state |
A newer Podman should not have the issue? Alternatively, restarting the system should force it back to a sane state. |
Is there any other alternative to restarting the system? Unfortunately, it's a HPC with about a dozen or so people running experiments around the clock, so I'm not sure I can get timely authorisation (if at all) to restart the system |
Manually stopping all Podman containers (including ensuring the container in I continue to strongly recommend a system upgrade to pick up a newer Podman, I'm fairly certain this fix was backported widely. |
Lifesaver! Thank you very much! |
Hello, I have a podman container in "stopping" status. I use podman kill, podman stop, podman restart does not work. Is there any way to stop this container without restarting the system?Thank you. |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
podman stop <container>
command causes panic and does not stop the container. The container stucks in state "stopping"Steps to reproduce the issue:
I did not found a reliable way of reproducing the issue. This problem pops up from time to time. Longer container lives - more chances to encounter the problem
Describe the results you received:
Container did not stop after invoking the
podman stop <container>
command. The command showed a panic with the backtracepodman_stop.log
The container stuck in the "stopping" state and I did not found a way to switch its state (only removing works)
Describe the results you expected:
The container should stop
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
Podman runs in QEMU VM with CentOS 7 as a guest OS
The text was updated successfully, but these errors were encountered: