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

Unable to run on macOS GitHub runner with brew installation #1023

Open
1 of 5 tasks
undergroundwires opened this issue May 4, 2024 · 5 comments
Open
1 of 5 tasks

Comments

@undergroundwires
Copy link

undergroundwires commented May 4, 2024

Description

First of all, thank you for building and maintaining this project. I've been using it has been successfully empowering CI/CD builds for privacy.sexy and private mac computers.

This has been working without any issues, but the CI/CD workflows started failing since last week.

This is step that's failing:

brew install docker
brew install colima
colima start

See related source code.

Version

I cannot run the command as this runs in GitHub CI/CD runners, but parsing the logs I find out that:

  • colima: ==> Pouring colima--0.6.8.arm64_sonoma.bottle.tar.gz
  • lima: ==> Pouring lima--0.21.0.arm64_sonoma.bottle.tar.gz
  • qemu: ==> Pouring qemu--8.2.2.arm64_sonoma.bottle.tar.gz

Operating System

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

Additional context

Logs:

==> Fetching colima
==> Downloading https://ghcr.io/v2/homebrew/core/colima/blobs/sha256:69af395c2207b9e0b9c917cdff036b3e2b968053a1a8b697cccb0bc6a59f66b6
==> Installing dependencies for colima: capstone, dtc, libslirp, libssh, ncurses, snappy, vde, qemu and lima
==> Installing colima dependency: capstone
==> Downloading https://ghcr.io/v2/homebrew/core/capstone/manifests/5.0.1
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/eb17389103bcda1a9712be38238eb72e8056accea2c41fe32618aada1d7e1d79--capstone-5.0.1.bottle_manifest.json
==> Pouring capstone--5.0.1.arm64_sonoma.bottle.tar.gz
🍺  /opt/homebrew/Cellar/capstone/5.0.1: 30 files, 22.3MB
==> Installing colima dependency: dtc
==> Downloading https://ghcr.io/v2/homebrew/core/dtc/manifests/1.7.0
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/00668efdbca5875f420621ff3011ae53448a6324636c2a27fe2323933c1ef3fa--dtc-1.7.0.bottle_manifest.json
==> Pouring dtc--1.7.0.arm64_sonoma.bottle.tar.gz
🍺  /opt/homebrew/Cellar/dtc/1.7.0: 18 files, 619.6KB
==> Installing colima dependency: libslirp
==> Downloading https://ghcr.io/v2/homebrew/core/libslirp/manifests/4.7.0
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/d8b5de971474690b01b484c84652c487b14a22eded9d5b91cecae2995692c598--libslirp-4.7.0.bottle_manifest.json
==> Pouring libslirp--4.7.0.arm64_sonoma.bottle.tar.gz
🍺  /opt/homebrew/Cellar/libslirp/4.7.0: 11 files, 387.3KB
==> Installing colima dependency: libssh
==> Downloading https://ghcr.io/v2/homebrew/core/libssh/manifests/0.10.6
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/a4ff6d890d834da2f865bf30651aa0ed1423be8e2684d4586895f1d9c887449b--libssh-0.10.6.bottle_manifest.json
==> Pouring libssh--0.10.6.arm64_sonoma.bottle.tar.gz
🍺  /opt/homebrew/Cellar/libssh/0.10.6: 23 files, 1.3MB
==> Installing colima dependency: ncurses
==> Downloading https://ghcr.io/v2/homebrew/core/ncurses/manifests/6.4-1
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/548168356558130632a3202b3fc2f3069f554bd5c1010b30e61f1180cf1f6b09--ncurses-6.4-1.bottle_manifest.json
==> Pouring ncurses--6.4.arm64_sonoma.bottle.1.tar.gz
🍺  /opt/homebrew/Cellar/ncurses/6.4: 4,001 files, 9.7MB
==> Installing colima dependency: snappy
==> Downloading https://ghcr.io/v2/homebrew/core/snappy/manifests/1.1.10
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/66500196008160ff18d67179e002e417a71c59707d74a6706c2e89a8aa2411b8--snappy-1.1.10.bottle_manifest.json
==> Pouring snappy--1.1.10.arm64_sonoma.bottle.tar.gz
🍺  /opt/homebrew/Cellar/snappy/1.1.10: 18 files, 164.6KB
==> Installing colima dependency: vde
==> Downloading https://ghcr.io/v2/homebrew/core/vde/manifests/2.3.3
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/4e9503141162571c2cd21e89a9e61f524a7403ffe5ffe269f4a39ce5aef9f210--vde-2.3.3.bottle_manifest.json
==> Pouring vde--2.3.3.arm64_sonoma.bottle.tar.gz
🍺  /opt/homebrew/Cellar/vde/2.3.3: 66 files, 1.3MB
==> Installing colima dependency: qemu
==> Downloading https://ghcr.io/v2/homebrew/core/qemu/manifests/8.2.2
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/c681de3cfaf9aab96d9ea8dd837fe86e28c5191bfccc9068792ed8cd3a18f237--qemu-8.2.2.bottle_manifest.json
==> Pouring qemu--8.2.2.arm64_sonoma.bottle.tar.gz
🍺  /opt/homebrew/Cellar/qemu/8.2.2: 162 files, 562.0MB
==> Installing colima dependency: lima
==> Downloading https://ghcr.io/v2/homebrew/core/lima/manifests/0.21.0
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/3902e93ee213e42997af864ec73a19fb8f9d5cab76f87474a24f4f1d3986e784--lima-0.21.0.bottle_manifest.json
==> Pouring lima--0.21.0.arm64_sonoma.bottle.tar.gz
🍺  /opt/homebrew/Cellar/lima/0.21.0: 108 files, 175.6MB
==> Installing colima
==> Pouring colima--0.6.8.arm64_sonoma.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
  /opt/homebrew/etc/bash_completion.d

To start colima now and restart at login:
  brew services start colima
Or, if you don't want/need a background service you can just run:
  /opt/homebrew/opt/colima/bin/colima start -f
==> Summary
🍺  /opt/homebrew/Cellar/colima/0.6.8: 10 files, 5.7MB
==> Caveats
==> colima
Bash completion has been installed to:
  /opt/homebrew/etc/bash_completion.d

To start colima now and restart at login:
  brew services start colima
Or, if you don't want/need a background service you can just run:
  /opt/homebrew/opt/colima/bin/colima start -f
time="2024-05-04T10:11:45Z" level=info msg="starting colima"
time="2024-05-04T10:11:45Z" level=info msg="runtime: docker"
time="2024-05-04T10:11:46Z" level=info msg="creating and starting ..." context=vm
time="2024-05-04T10:11:46Z" level=info msg="Terminal is not available, proceeding without opening an editor"
time="2024-05-04T10:11:47Z" level=info msg="Starting the instance \"colima\" with VM driver \"qemu\""
time="2024-05-04T10:11:47Z" level=info msg="QEMU binary \"/opt/homebrew/bin/qemu-system-aarch64\" seems properly signed with the \"com.apple.security.hypervisor\" entitlement"
time="2024-05-04T10:11:47Z" level=info msg="Attempting to download the image" arch=aarch64 digest="sha512:00e3339bdebd98c3e003570ffb3ad4b01630fe4fcecd15061d5d58e14c07b211c718ed20fa3e4cce227d3b1c59fd98241eaa3e9e2cdfa04acfe32b4bc385428c" location="https://github.com/abiosoft/colima-core/releases/download/v0.6.8-2/ubuntu-23.10-minimal-cloudimg-arm64.qcow2"
Downloading the image (ubuntu-23.10-minimal-cloudimg-arm64.qcow2)

315.51 MiB / 405.01 MiB (77.90%) ? p/s
405.01 MiB / 405.01 MiB (100.00%) 279.33 MiB/stime="2024-05-04T10:11:54Z" level=info msg="Downloaded the image from \"[https://github.com/abiosoft/colima-core/releases/download/v0.6.8-2/ubuntu-23.10-minimal-cloudimg-arm64.qcow2\](https://github.com/abiosoft/colima-core/releases/download/v0.6.8-2/ubuntu-23.10-minimal-cloudimg-arm64.qcow2/)""
time="2024-05-04T10:11:54Z" level=info msg="[hostagent] hostagent socket created at /Users/runner/.colima/_lima/colima/ha.sock"
time="2024-05-04T10:11:54Z" level=info msg="[hostagent] Using system firmware (\"/opt/homebrew/share/qemu/edk2-aarch64-code.fd\")"
time="2024-05-04T10:11:54Z" level=info msg="[hostagent] Starting QEMU (hint: to watch the boot progress, see \"/Users/runner/.colima/_lima/colima/serial*.log\")"
time="2024-05-04T10:11:54Z" level=info msg="SSH Local Port: 49212"
time="2024-05-04T10:11:54Z" level=info msg="[hostagent] Waiting for the essential requirement 1 of 4: \"ssh\""
time="2024-05-04T10:11:54Z" level=info msg="[hostagent] Driver stopped due to error: \"signal: abort trap\""
time="2024-05-04T10:11:54Z" level=info msg="[hostagent] Shutting down the host agent"
time="2024-05-04T10:11:54Z" level=warning msg="[hostagent] failed to exit SSH master" error="failed to execute `ssh -O exit -p 49212 127.0.0.1`, out=\"Control socket connect(/Users/runner/.colima/_lima/colima/ssh.sock): No such file or directory\\r\\n\": exit status 255"
time="2024-05-04T10:11:54Z" level=info msg="[hostagent] Shutting down QEMU with ACPI"
time="2024-05-04T10:11:54Z" level=warning msg="[hostagent] Failed to remove SSH binding for port 49212"
time="2024-05-04T10:11:54Z" level=warning msg="[hostagent] failed to open the QMP socket \"/Users/runner/.colima/_lima/colima/qmp.sock\", forcibly killing QEMU" error="dial unix /Users/runner/.colima/_lima/colima/qmp.sock: connect: connection refused"
time="2024-05-04T10:11:54Z" level=info msg="[hostagent] QEMU has already exited"
time="2024-05-04T10:11:54Z" level=fatal msg="exiting, status={Running:false Degraded:false Exiting:true Errors:[] SSHLocalPort:0} (hint: see \"/Users/runner/.colima/_lima/colima/ha.stderr.log\")"
time="2024-05-04T10:11:54Z" level=fatal msg="error starting vm: error at 'creating and starting': exit status 1"
Error: Process completed with exit code 1.
@AkihiroSuda
Copy link
Contributor

AkihiroSuda commented May 7, 2024

macos-14 (ARM) on GitHub Actions does not support Hypervisor.framework.

Older versions (Intel) should work.

undergroundwires added a commit to undergroundwires/privacy.sexy that referenced this issue May 13, 2024
The GitHub workflow for testing Docker builds on macOS was consistently
failing. This commit downgrades the macOS version used for Docker tests
to `macos-13`, which is the latest Intel-based macOS runner, instead of
the ARM-based `macos-14` which `macos-latest` points to.

This change is necessary because the hypervisor framework required for
Docker is not supported on the ARM-based macOS runners provided by
GitHub. This issue was causing failures when attempting to run Colima
with QEMU using `-accel hvf`, which is unsupported on these runners.
Switching to an Intel-based runner resolves this issue.

Related issues:
- actions/runner-images#9460
- actions/runner-images#9741
- abiosoft/colima#1023
undergroundwires added a commit to undergroundwires/privacy.sexy that referenced this issue May 13, 2024
The GitHub workflow for testing Docker builds on macOS was consistently
failing. This commit downgrades the macOS version used for Docker tests
to `macos-13`, which is the latest Intel-based macOS runner, instead of
the ARM-based `macos-14` which `macos-latest` points to.

This change is necessary because the hypervisor framework required for
Docker is not supported on the ARM-based macOS runners provided by
GitHub. This issue was causing failures when attempting to run Colima
with QEMU using `-accel hvf`, which is unsupported on these runners.
Switching to an Intel-based runner resolves this issue.

Related issues:
- actions/runner-images#9460
- actions/runner-images#9741
- abiosoft/colima#1023
@undergroundwires
Copy link
Author

Using macos-13 has resolved it, thank you @AkihiroSuda ❤️

undergroundwires added a commit to undergroundwires/privacy.sexy that referenced this issue May 13, 2024
The GitHub workflow for testing Docker builds on macOS was consistently
failing. This commit downgrades the macOS version used for Docker tests
to `macos-13`, which is the latest Intel-based macOS runner, instead of
the ARM-based `macos-14` which `macos-latest` points to.

This change is necessary because the hypervisor framework required for
Docker is not supported on the ARM-based macOS runners provided by
GitHub. This issue was causing failures when attempting to run Colima
with QEMU using `-accel hvf`, which is unsupported on these runners.
Switching to an Intel-based runner resolves this issue.

Related issues:
- actions/runner-images#9460
- actions/runner-images#9741
- abiosoft/colima#1023
@undergroundwires
Copy link
Author

macos-13 does no longer work. Microsoft seems to push out ARM64 default for macos-13 too. Does anyone know how to configure the runner so we request an intel instance of it? Both seems to co-exist.

@undergroundwires
Copy link
Author

FYI: GitHub just today has changed macos-13 back to be Intel by default.. Pipelines have been getting broken a lot due to this..

I guess adding an architecture check in code, and aborting the operation if arm64 is received would be the only way to go if they keep breaking this inconsistently like this.

@SmartManoj
Copy link

time="2024-05-04T10:11:54Z" level=info msg="[hostagent] Driver stopped due to error: "signal: abort trap""

This is the starting point of the error?

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

3 participants