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

Crash on MacOS Sequioa 15.0 beta (24A5320a) from 13-08-2024 #1109

Closed
1 of 5 tasks
peterforeman opened this issue Aug 13, 2024 · 8 comments · Fixed by #1110
Closed
1 of 5 tasks

Crash on MacOS Sequioa 15.0 beta (24A5320a) from 13-08-2024 #1109

peterforeman opened this issue Aug 13, 2024 · 8 comments · Fixed by #1110

Comments

@peterforeman
Copy link

peterforeman commented Aug 13, 2024

Description

Since today, after installing the latest Sequioa beta, colima crashes on start. Previous beta worked fine.

$ colima start
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x50 pc=0x102fd4d28]

goroutine 1 [running]:
github.com/abiosoft/colima/cmd.prepareConfig(0x10329ee20)
	github.com/abiosoft/colima/cmd/start.go:455 +0xa88
github.com/abiosoft/colima/cmd.init.func18(0x10329ee20, {0x10331bb80?, 0x0?, 0x102fdc1c4?})
	github.com/abiosoft/colima/cmd/start.go:96 +0x70
github.com/spf13/cobra.(*Command).execute(0x10329ee20, {0x10331bb80, 0x0, 0x0})
	github.com/spf13/cobra@v1.8.1/command.go:970 +0x7e8
github.com/spf13/cobra.(*Command).ExecuteC(0x1032a0240)
	github.com/spf13/cobra@v1.8.1/command.go:1117 +0x344
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/cobra@v1.8.1/command.go:1041
github.com/abiosoft/colima/cmd/root.Execute()
	github.com/abiosoft/colima/cmd/root/root.go:68 +0x24
main.main()
	github.com/abiosoft/colima/cmd/colima/main.go:12 +0x1c

I was using vz, but reset config by using 'colima delete' and 'colima start'. The colima delete did work, but start still crashes.

Config:

cpu: 2
disk: 100
memory: 2
arch: aarch64
runtime: docker
hostname: colima
kubernetes:
  enabled: false
  version: v1.30.0+k3s1
  k3sArgs:
    - --disable=traefik
autoActivate: true
network:
  address: false
  dns: []
  dnsHosts: {}
forwardAgent: false
docker: {}
vmType: qemu
rosetta: false
mountType: sshfs
mountInotify: true
cpuType: ""
provision: []
sshConfig: true
sshPort: 0
mounts: []
env: {}

After deleting the colima.yaml configuration file, I tried colima start again:

$ colima start
INFO[0000] starting colima
INFO[0000] runtime: docker
INFO[0001] creating and starting ...                     context=vm
INFO[0001] downloading disk image ...                    context=vm
> QEMU binary "/opt/homebrew/bin/qemu-system-aarch64" seems properly signed with the "com.apple.security.hypervisor" entitlement
> "Attempting to download the image" arch=aarch64 digest= location=/Users/xxx/Library/Caches/colima/caches/fc0bfb9256e1f61294f2c41fc95ff4feb6c0daafccfb3b435e2d972e39bc8432.raw
> Downloaded the image from "/Users/xxx/Library/Caches/colima/caches/fc0bfb9256e1f61294f2c41fc95ff4feb6c0daafccfb3b435e2d972e39bc8432.raw"
> [hostagent] hostagent socket created at /Users/xxx/.colima/_lima/colima/ha.sock
> [hostagent] Using system firmware ("/opt/homebrew/share/qemu/edk2-aarch64-code.fd")
> exiting, status={Running:false Degraded:false Exiting:true Errors:[] SSHLocalPort:0} (hint: see "/Users/xxx/.colima/_lima/colima/ha.stderr.log")
FATA[0021] error starting vm: error at 'creating and starting': exit status 1

$ colima start
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x50 pc=0x1028c0d28]

goroutine 1 [running]:
github.com/abiosoft/colima/cmd.prepareConfig(0x102b8ae20)
	github.com/abiosoft/colima/cmd/start.go:455 +0xa88
github.com/abiosoft/colima/cmd.init.func18(0x102b8ae20, {0x102c07b80?, 0x0?, 0x1028c81c4?})
	github.com/abiosoft/colima/cmd/start.go:96 +0x70
github.com/spf13/cobra.(*Command).execute(0x102b8ae20, {0x102c07b80, 0x0, 0x0})
	github.com/spf13/cobra@v1.8.1/command.go:970 +0x7e8
github.com/spf13/cobra.(*Command).ExecuteC(0x102b8c240)
	github.com/spf13/cobra@v1.8.1/command.go:1117 +0x344
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/cobra@v1.8.1/command.go:1041
github.com/abiosoft/colima/cmd/root.Execute()
	github.com/abiosoft/colima/cmd/root/root.go:68 +0x24
main.main()
	github.com/abiosoft/colima/cmd/colima/main.go:12 +0x1c

It seems to crash on the line with "MacOS13OrNewer" in start.go (line 455):

	if util.MacOS() {
		if !cmd.Flag("network-address").Changed {
			startCmdArgs.Network.Address = current.Network.Address
		}
		if util.MacOS13OrNewer() {    // <---- here
			if !cmd.Flag("vm-type").Changed {
				startCmdArgs.VMType = current.VMType
			}
		}
		if util.MacOS13OrNewerOnArm() {
			if !cmd.Flag("vz-rosetta").Changed {
				startCmdArgs.VZRosetta = current.VZRosetta
			}
		}
		if util.MacOS15OrNewer() {
			if !cmd.Flag("nested-virtualization").Changed {
				startCmdArgs.NestedVirtualization = current.NestedVirtualization
			}
		}
	}

Version

$ uname -a
Darwin MacBook-Pro-xxx.local 24.0.0 Darwin Kernel Version 24.0.0: Wed Aug  7 03:09:20 PDT 2024; root:xnu-11215.1.9~22/RELEASE_ARM64_T6000 arm64
$ colima version && limactl --version && qemu-img --version
colima version 0.7.1
git commit: ce7b155dbeb7843ac0d9966a6ad19dc8e3b56bb8
limactl version 0.22.0
qemu-img version 9.0.2

Operating System

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

Output of colima status

$ colima status
FATA[0000] colima is not running

Reproduction Steps

  1. Update to latest beta of Sequioa
  2. colima start
  3. crash

Expected behaviour

No response

Additional context

No response

@abiosoft
Copy link
Owner

I think I have found the issue. What device are you using?

@peterforeman
Copy link
Author

Macbook-Pro 16" 2021 (MacBookPro18,1 / Z14V000PRN/A)

@abiosoft
Copy link
Owner

I would push out a hotfix release once the PR finish building and gets merged.

@Tom1206
Copy link

Tom1206 commented Aug 13, 2024

Exactly the same issue here on my Macbook-Pro 16" 2021 on MacOS Sequoia Public Beta 4. I will try the hotfix when it will be released.

@abiosoft
Copy link
Owner

abiosoft commented Aug 13, 2024

The fix has been merged. Can you kindly try the current development version.

# remove stable version
brew uninstall colima

# install development version
brew install --head colima

@Tom1206
Copy link

Tom1206 commented Aug 13, 2024

For me this is working with the development version! Thank you!

INFO[0000] starting colima                              
INFO[0000] runtime: docker                              
INFO[0003] creating and starting ...                     context=vm
INFO[0015] provisioning ...                              context=docker
INFO[0015] starting ...                                  context=docker
INFO[0016] done

@abiosoft
Copy link
Owner

abiosoft commented Aug 13, 2024

New release published https://github.com/abiosoft/colima/releases/tag/v0.7.3.

It may take a while for the new version to show up on homebrew.

If you prefer to move back to stable version later as things can occasionally break on the development versions.

# remove current version
brew uninstall colima

# install stable version
brew install colima

@Tom1206
Copy link

Tom1206 commented Aug 13, 2024

Thank you very much!

tmeijn pushed a commit to tmeijn/dotfiles that referenced this issue Aug 15, 2024
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [abiosoft/colima](https://github.com/abiosoft/colima) | patch | `v0.7.1` -> `v0.7.3` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>abiosoft/colima (abiosoft/colima)</summary>

### [`v0.7.3`](https://github.com/abiosoft/colima/releases/tag/v0.7.3)

[Compare Source](abiosoft/colima@v0.7.2...v0.7.3)

#### Highlights

This is an hotfix release to address crashes during startup on macOS Sequoia 15 beta for M1 and M2 devices. [#&#8203;1109](abiosoft/colima#1109)

#### Commits

-   cli: fix broken flag for non-m3 devices on macOS 15 by [@&#8203;abiosoft](https://github.com/abiosoft) in abiosoft/colima#1110

**Full Changelog**: abiosoft/colima@v0.7.2...v0.7.3

### [`v0.7.2`](https://github.com/abiosoft/colima/releases/tag/v0.7.2)

[Compare Source](abiosoft/colima@v0.7.1...v0.7.2)

#### Highlights

This is an hotfix release to address regressions introduced in v0.7.1.

#### Fixes

-   Incorrect checksum for macOS binaries on Github releases. Fixes [#&#8203;1106](abiosoft/colima#1106)
-   Port mapping to specific host IP addresses has been moved behind `--network-host-addresses` flag and disabled by default. Fixes [#&#8203;1103](abiosoft/colima#1103)

#### Commits

-   chore: generate checksum files after signing assets by codesign by [@&#8203;suzuki-shunsuke](https://github.com/suzuki-shunsuke) in abiosoft/colima#1105
-   net: put host ip address replication behind a flag by [@&#8203;abiosoft](https://github.com/abiosoft) in abiosoft/colima#1107

#### New Contributors

-   [@&#8203;suzuki-shunsuke](https://github.com/suzuki-shunsuke) made their first contribution in abiosoft/colima#1105

**Full Changelog**: abiosoft/colima@v0.7.1...v0.7.2

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
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

Successfully merging a pull request may close this issue.

3 participants