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

Colima hangs on macOS, cannot stop #987

Open
1 of 5 tasks
erickrf opened this issue Feb 19, 2024 · 19 comments
Open
1 of 5 tasks

Colima hangs on macOS, cannot stop #987

erickrf opened this issue Feb 19, 2024 · 19 comments

Comments

@erickrf
Copy link

erickrf commented Feb 19, 2024

Description

Colima hanged on my macOS installation. The VMs I try to start simply get stuck. If I run colima status, it just hangs there forever.

colima stop returns INFO[0000] stopping colima and then also hangs.

colima start just returns WARN[0000] already running, ignoring.

The only way out was to manually kill the process qemu-system_x86_64 and restart colima, but then it froze again after running a VM. Even after that, colima start would print

INFO[0000] starting colima                              
INFO[0000] runtime: docker

and then again get stuck.

Version

colima version 0.6.8
git commit: 9b0809d0ed9ad3ff1e57c405f27324e6298ca04f
limactl version 0.20.1
qemu-img version 8.2.1
Copyright (c) 2003-2023 Fabrice Bellard and the QEMU Project developers

While it was in the stuck behavior, only the first two lines are displayed, then it hangs.

Operating System

  • macOS Intel <= 13 (Ventura)
  • macOS Intel >= 14 (Sonoma)
  • Apple Silicon <= 13 (Ventura)
  • Apple Silicon >= 14 (Sonoma)
  • Linux

Output of colima status

(hangs)

Reproduction Steps

It happens when running some specific VM.

Expected behaviour

No response

Additional context

No response

@rommelfreddy
Copy link

can confirm. i have the same issue on Sonoma 14.2 / Colima 0.6.7

Using it with DDEV - projects working properly, and after some times the containers does not respond can colima is not stoppable.

After killing all colima/lima processes, and starting colima and the containers again, the containers does response but very slowly.

Also having performance issues with xdebug - but this may also be a problem on the DDEV or xdebug.

@ngamsomset
Copy link

same here. it stuck while trying to download something.
image

@dsmooot
Copy link

dsmooot commented Feb 21, 2024

same issue as @ngamsomset..
M1 MBP Sonoma 14.2.1 Colima 0.6.8

Edit:
I ended up downgrading to 0.6.7 to get colima to a working state.. it introduced another issue, which I was able to resolve. Here are the steps I took:

colima delete
sudo mkdir -p /usr/local/bin
sudo curl -L -o /usr/local/bin/colima https://github.com/abiosoft/colima/releases/download/v0.6.7/colima-Darwin-arm64 && sudo chmod +x /usr/local/bin/colima
 colima start --arch aarch64 --vm-type=vz --cpu 4 --memory 8

hit error:

exiting, status={Running:false Degraded:false Exiting:true Errors:[] SSHLocalPort:0} (hint: see "/Users/***/.colima/_lima/colima/ha.stderr.log")
FATA[0185] error starting vm: error at 'creating and starting': exit status 1

log:
{"error":"close tcp4 127.0.0.1:443-\u003e127.0.0.1:51217: shutdown: socket is not connected","level":"debug","msg":"failed to call CloseWrite","time":"2024-02-21T17:05:17-03:00"}
fixed with:
rm -rf ~/.colima/_lima/_networks/user-v2
ran colima start again... worked.

@thejan2009
Copy link

I can confirm the above, MBP M1 Pro, Sonoma 14.3.1, Colima 0.6.8. After starting the disk expansion, the whole system becomes slow. Activity monitor reports around 15MB/sec is written to the disk. That keeps happening even after I stop colima. Only a reboot stops this behavior.

@megalucio
Copy link

megalucio commented Feb 26, 2024

Can confirm as well MBP M1 Pro Ventura 13.6.3, hangs and no way to fix other than reboot/killing all colima associated processes

@rsau
Copy link

rsau commented Mar 4, 2024

I am having same issue as well on M1 MacOS Sonoma 14.3.1

@AKorzeniowski
Copy link

Same here on M1 Pro running Sonoma 14.3.1. Will try downgrading to 0.6.7 as suggested.

@rsau
Copy link

rsau commented Mar 6, 2024

I don't know if it is related but I did the fix in #710 (comment)
Colima has been stable for more than 4 hours now.

@rsau
Copy link

rsau commented Mar 6, 2024

Looks like above fixed it for me

I have 34 containers running at the moment

cpu: 4
memory: 12
disk: 100
vmType: qemu
rosetta: false
mountType: sshfs

image

@rBrda
Copy link

rBrda commented Mar 6, 2024

@rsau You mean the comment that you linked? I just did the same because I don't really want to downgrade if it's not necessary.

@rsau
Copy link

rsau commented Mar 6, 2024

@rsau You mean the comment that you linked? I just did the same because I don't really want to downgrade if it's not necessary.

Yeah.

  • colima ssh
  • sudo chmod 666 /var/run/docker.sock

image

@rBrda
Copy link

rBrda commented Mar 14, 2024

@rsau You mean the comment that you linked? I just did the same because I don't really want to downgrade if it's not necessary.

Yeah.

  • colima ssh
  • sudo chmod 666 /var/run/docker.sock

image

Just a feedback about this fix. It solved the issue for me. Colima has been running stable since I made this change.

@dberzano
Copy link

I have just tested 9b0809d (installed on macOS Sonoma via brew install --HEAD colima). It seems to be working - thanks @rsau!

@dsmooot
Copy link

dsmooot commented Mar 15, 2024

update: was able to run latest version using qemu instead of vz to prevent freeze on starting process, but more recently reinstalled colima at --HEAD after colima delete default and seems to work again (using vz).

@ngamsomset
Copy link

Look like it's now working.

Steps to run.

  • brew install --HEAD colima
  • colima start -> stuck.
  • colima delete default
  • colima start -> working.

@david-sabata
Copy link

david-sabata commented Apr 3, 2024

The above didn't fix it for me. Installed HEAD, started, and deleted defaults, but still stuck at expanding.

Apple Sillicon, M3 Pro
macOS 14.4.1
colima HEAD-281757a

$ colima start              
INFO[0000] starting colima                              
INFO[0000] runtime: docker                              
INFO[0001] creating and starting ...                     context=vm
> 2.60 GiB / 3.50 GiB (74.22%) 67.92 MiB/s
> 2.66 GiB / 3.50 GiB (75.92%) 64.32 MiB/s
> 2.73 GiB / 3.50 GiB (77.87%) 61.07 MiB/s
> 2.79 GiB / 3.50 GiB (79.58%) 57.92 MiB/s
> 3.50 GiB / 3.50 GiB (100.00%) 63.63 MiB/s
> 3.50 GiB / 3.50 GiB (100.00%) 34.10 MiB/stime="2024-04-03T16:34:32+02:00" level=info msg="Expanding to 60GiB"

@SubhashC37
Copy link

below worked for me,
brew install --HEAD colima
colima delete default
colima start --vm-type vz --mount-type virtiofs

@mcyleung
Copy link

mcyleung commented Apr 5, 2024

Tried all of the above solution, none of them worked. Work around downgrading to 0.6.7 worked
colima start --vm-type=vz --vz-rosetta=true --mount-type=virtiofs

MacOS 14.4
M1 Pro

@luisdavim
Copy link

I have the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests