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

Killed: 9 #174

Open
jebl01 opened this issue Sep 23, 2022 · 8 comments
Open

Killed: 9 #174

jebl01 opened this issue Sep 23, 2022 · 8 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jebl01
Copy link

jebl01 commented Sep 23, 2022

I'm on Apple silicon running Monterey 12.6 (21G115). The only thing that happens when I try to run codeowners-validator locally is that I get a Killed: 9 message.

 $ codeowners-validator
Killed: 9
@jebl01 jebl01 added the bug Something isn't working label Sep 23, 2022
@mszostok
Copy link
Owner

mszostok commented Sep 24, 2022

Hi @jebl01

Could you tell me how you installed the codeowners-validator? And which version?

CI produces the ARM64 binary for macOS (with Apple Silicon chips) but I have Intel for now so I was not able to test it.

The issue that you reported looks like the binary was wrongly compressed by upx that I use on CI (I found a related issue upx/upx#446).

Here is a binary that I built from 0.7.4 tag for darwin/arm64 without running the upx tool
codeowners-validator.zip

Let me know if that worked. If yes, I will exclude the upx for arm architectures.


You can also do the same on your local machine:

  1. Checkout this repository: git clone git@github.com:mszostok/codeowners-validator.git
  2. Checkout to v0.7.4 tag: git co v0.7.4
  3. Run goreleaser: goreleaser release --rm-dist --skip-publish --skip-validate --snapshot
    NOTE: To run it successfully, install Go and goreleaser
  4. Use the binary from ./bin/codeowners-validator_darwin_arm64/codeowners-validator.

@mszostok mszostok added this to the v0.8.0 milestone Sep 24, 2022
@jebl01
Copy link
Author

jebl01 commented Sep 26, 2022

your zip didn't work (same error), but building locally did!

got this error at the end?!:

⨯ release failed after 24s                 error=post hook failed: failed to run 'upx -9 /Users/jesperblomquist/dev/codeowners-validator/bin/codeowners-validator_darwin_arm64/codeowners-validator': exec: "upx": executable file not found in $PATH

@Moser-ss
Copy link

Hey, I was able to build the binary in a Mac M1 and the result is the same

➜  codeowners-validator git:(7f3f5e2)  ./bin/codeowners-validator_darwin_arm64/codeowners-validator
[1]    87227 killed     ./bin/codeowners-validator_darwin_arm64/codeowners-validator

@jamesonwilliams
Copy link

jamesonwilliams commented Feb 2, 2023

Same here, codeowners-validator version 0.7.4, running on Mac OS X Ventura 13.2, Apple M1 silicon.

I installed via Homebrew:

brew install mszostok/tap/codeowners-validator

But I get:

$ codeowners-validator
Killed: 9

Running it from Docker, the output is a bit more explicit as to the nature of the problem:

$ docker run --rm -v $(pwd):/repo -w /repo   -e REPOSITORY_PATH="."   -e GITHUB_ACCESS_TOKEN="$GH_TOKEN"   -e EXPERIMENTAL_CHECKS="notowned"   -e OWNER_CHECKER_REPOSITORY="org-name/rep-name"   mszostok/codeowners-validator:v0.7.4
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
qemu: uncaught target signal 11 (Segmentation fault) - core dumped

I'm able to use the tool by checking out the repo and building it, though.

$ git clone git@github.com:mszostok/codeowners-validator.git
$ make build 
$ ./codeowners-validator 

@pdeschen
Copy link

pdeschen commented Mar 2, 2023

I'm also experiencing this very same bug on Apple silicon chip. No hands on knowledge of go releaser but I feel the config could be updated to something similar to this one which provides a dedicated build entry for the Darwin/arm64

@duxbuse
Copy link

duxbuse commented Jul 10, 2023

Yeah i'm getting the same issue on M2.
Also when running it with docker

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
qemu: uncaught target signal 11 (Segmentation fault) - core dumped

@blakebarnett
Copy link

blakebarnett commented Dec 22, 2023

Looks like the file may have been corrupted when UPX was run on it here:

post: upx -9 "{{ .Path }}"

❯ upx -d ./codeowners-validator
                       Ultimate Packer for eXecutables
                          Copyright (C) 1996 - 2023
UPX 4.1.0       Markus Oberhumer, Laszlo Molnar & John Reiser    Aug 8th 2023

        File size         Ratio      Format      Name
   --------------------   ------   -----------   -----------
upx: ./codeowners-validator: CantUnpackException: file corrupted

@katerberg
Copy link

katerberg commented Mar 14, 2024

Calling out that this appears to still be an issue on a M2 that installed via brew.

Interestingly, it works fine when installed with Go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: In Progress
Development

No branches or pull requests

8 participants