-
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
Error: qemu exited unexpectedly with exit code 1, stderr: qemu-system-x86_64: cannot create PID file: Cannot lock pid file: Resource temporarily unavailable #16054
Comments
I've removed old machine and created a new one. For a NEW working machine I have:
info
|
This error is coming from qemu, likely a bug in qemu and not podman. |
I have met the same issue, but I didn't use podman, only qemu. |
A friendly reminder that this issue had no activity for 30 days. |
I recently also hit this issue, so it's still relevant (not stale). |
Since this is a qemu bug there is little Podman can do. |
It was solved when I restarted the computer. You can restart your computer. I have no idea about the problem. |
For me it's also solved by waiting a little bit. It seems some process (podman or QEMU I don't know) is slower in shutdown than the Podman Desktop UI is indicating. |
This is very strange~ |
I had this same issue today, what I did to "solve" it is to kill the qemu process with a |
this saved my day. I have experienced the problem multiple times, ending on having to reboot my Mac, but this did the trick. |
Today I also got into this problem. I tried to start podman machine and it gave me exit status 255. Next try was unsuccessfully and the The session with my shell: % podman machine start
Starting machine "podman-machine-default"
Waiting for VM ...
Mounting volume... /Users/oherrala:/Users/oherrala
Error: exit status 255
% podman machine start
Starting machine "podman-machine-default"
Waiting for VM ...
<I kept waiting and waiting and waiting, then hit CTRL-C to end the waiting>
^C
% podman machine start
Starting machine "podman-machine-default"
Waiting for VM ...
Error: qemu exited unexpectedly with exit code 1, stderr: qemu-system-aarch64: cannot create PID file: Cannot lock pid file: Resource temporarily unavailable
% ps auxwww|grep podman
% kill 63230
% podman machine start
Starting machine "podman-machine-default"
Waiting for VM ...
Mounting volume... /Users/oherrala:/Users/oherrala
This machine is currently configured in rootless mode. If your containers
require root permissions (e.g. ports < 1024), or if you run into compatibility
issues with non-podman clients, you can switch using the following command:
podman machine set --rootful
API forwarding listening on: /var/run/docker.sock
Docker API clients default to this address. You do not need to set DOCKER_HOST.
Machine "podman-machine-default" started successfully |
It was a failed shutdown for me. Thanks @oherrala! More simply
|
Just also run into this issue on an M1 Macbook. Started with podman not being able to do anything. The virtual machine did not react. Stopping the machine with "podman machine stop" did hang forever. Afterwards i killed the qemu process and started the machine again. Not very user friendly. Any chance podman can detect a non-responsive vm? This would help a lot. Happens every x days after resuming from suspend unfortunately. |
Same here, also M1 macbook. Needs to restart podman machine several times a day due to frequent hanging. |
I don't know up to which level this is relevant (perhaps virtualisation-wise?) but I have noticed Docker for macOS also behaving like that after resuming from suspend on an M1, but not on Intel. Killing the process and starting the VM again (both on Docker and Podman) fixes the issue. Edit: running macOS 13.2.1 (22D68) |
I have the same problem on latest macOS |
Same problem M1 |
if your qemu is upgraded, try remove podman machine and initialize again
|
Occasionally this situation is required and the process needs to be manually killed |
I get the same error on Intel mac |
Except if I'm wrong your solution @lihuanshuai (#16054 (comment)) removes all images locally. Any workaround to keep them? (The initial issue is pretty annoying, it's been 3 times in a few weeks... wondering if it's due to my macos going inactive/sleep) |
@deboer-tim, with #19210 I am unable to see any flake in |
They are in sequence. Initially I thought it was when I stopped and quickly restarted (because that's what I was doing at the time, and I couldn't always reproduce), but it doesn't appear to be timing related. When I opened #18648 I thought there were times when I couldn't restart in the UI but it worked from CLI, but my memory is a bit foggy. Today I have a machine that's failing in both cases:
If there's anything you want me to check feel free to ping. |
Thanks, @deboer-tim ! Can you try running #19210? |
As per DMs, I get the same behaviour with one of my machines even with #19210. I did try to start it without first, but fails consistently now. |
@deboer-tim, can you try again with the latest main branch? |
After a failed start, we can run into (somehow inconsistent) states where the machine won't start because a previous QEMU process is still running and the PID file is being used. Stop didn't resolve the issue as this state wasn't detected. Allow to recover from this state by a) detecting it during start and error out with a more helpful message than the error QEMU would otherwise spit out, and b) by enabling stop to kill the dangling QEMU process - even after a failed stop. With the changes, a recovery may look as follows: ``` _ podman git:(main) _ ./bin/darwin/podman machine start Starting machine "podman-machine-default" Error: cannot start VM "podman-machine-default": another instance of "/opt/homebrew/bin/qemu-system-aarch64" is already running with process ID 970: please stop and restart the VM _ podman git:(main) _ ./bin/darwin/podman machine stop Machine "podman-machine-default" stopped successfully _ podman git:(main) _ ./bin/darwin/podman machine start Starting machine "podman-machine-default" Waiting for VM ... ``` Please note that this change does not prevent us from running into such inconsistent states but only allows for recovering from them. [NO NEW TESTS NEEDED] - there is no reliable reproducer. Fixes: containers#16054 Signed-off-by: Valentin Rothberg <[email protected]>
I ran into this issue as well today with:
Here is a oneliner to solve the issue:
You may then run |
podman fails to start
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Steps to reproduce the issue:
Stop machine.
Start machine.
Machine starts or not starts very unpredictably.
Describe the results you received:
Describe the results you expected:
Stuff to work? More descriptive error messages?
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info
:Package info (e.g. output of
rpm -q podman
orapt list podman
orbrew info podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)
No
Additional environment details (AWS, VirtualBox, physical, etc.): mac
The text was updated successfully, but these errors were encountered: