v15.0.0 Code signature invalid on Apple Silicon
Summary
I just attempted to upgrade Gitlab Runner from 14.10.1 to 15.0.0 on my M1 Mac Mini using the standard upgrade instructions and the latest binary url for ARM:
sudo curl --output /usr/local/bin/gitlab-runner "https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-darwin-arm64"
When I run gitlab-runner start, I get the following error:
zsh: killed gitlab-runner start
Looking in Console, I see that macOS killed the process for bad code signature: SIGKILL (Code Signature Invalid). I've confirmed that both the latest and v15.0.0 download URLs exhibit this problem. Rolling back to v14.10.1 has no problems.
Steps to reproduce
$ sudo curl --output /usr/local/bin/gitlab-runner "https://s3.amazonaws.com/gitlab-runner-downloads/latest/binaries/gitlab-runner-darwin-arm64"
# (alternate url) sudo curl --output /usr/local/bin/gitlab-runner "https://s3.amazonaws.com/gitlab-runner-downloads/v15.0.0/binaries/gitlab-runner-darwin-arm64"
$ sudo chmod +x /usr/local/bin/gitlab-runner
$ gitlab-runner start
zsh: killed gitlab-runner start
Actual behavior
gitlab-runner is killed by macOS.
Expected behavior
gitlab-runner should start and report its platform:
Runtime platform arch=arm64 os=darwin pid=##### revision=######## version=15.0.0
Relevant logs and/or screenshots
ips crash report
This is a partial crash report. It's partial because I only have cmd line access to the machine at the moment and the ips -> crash report converter I used has some errors.
Process: gitlab-runner [68599]
Path: /usr/local/bin/gitlab-runner
Identifier:
Version: (???)
Code Type: ARM-64
Parent Process: zsh [68587]
User ID: 502
Date/Time: 2022-05-24 13:17:45.2993 -0400
OS Version: macOS 12.3.1 (21E258)
Report Version: 12
Anonymous UUID: 74526BCD-A37F-4881-AE8F-919685E2AF5B
Time Awake Since Boot: 1700000 seconds
System Integrity Protection: enabled
Crashed Thread: Dispatch queue:
Exception Type: EXC_BAD_ACCESS (SIGKILL (Code Signature Invalid))
Exception Codes: UNKNOWN_0x32 at 0x00000001004a0000
Exception Codes: 0x0000000000000032, 0x00000001004a0000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace CODESIGNING,
Terminating Process: []
VM Region Info: 0x1004a0000 is in 0x1004a0000-0x101a54000; bytes after start: 0 bytes before end: 22757375
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
---> mapped file 1004a0000-101a54000 [ 21.7M] r-x/rwx SM=COW ...t_id=a5cd97df
mapped file 101a54000-102cb8000 [ 18.4M] rw-/rw- SM=COW ...t_id=a5cd97df
Thread crashed with :
<registers>
Binary Images:
0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ???
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Environment description
This is a custom runner installed on a M1 Mac Mini (2020) running macOS 12.3.1.
config.toml contents
concurrent = 1
check_interval = 0
[session_server]
session_timeout = 1800
[[runners]]
name = "avocado.1"
url = REDACTED
token = REDACTED
executor = "shell"
[runners.custom_build_dir]
[runners.cache]
[runners.cache.s3]
[runners.cache.gcs]
[runners.cache.azure]
[[runners]]
name = "avocado.1"
url = REDACTED
token = REDACTED
executor = "shell"
[runners.custom_build_dir]
[runners.cache]
[runners.cache.s3]
[runners.cache.gcs]
[runners.cache.azure]
Used GitLab Runner version
Program doesn't start so I can't get reported build version. Nominal version is 15.0.0.