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

citgm-smoke-nobuild osx11 fails to run x64 binary on arm #1042

Open
BethGriggs opened this issue Dec 22, 2023 · 3 comments
Open

citgm-smoke-nobuild osx11 fails to run x64 binary on arm #1042

BethGriggs opened this issue Dec 22, 2023 · 3 comments

Comments

@BethGriggs
Copy link
Member

BethGriggs commented Dec 22, 2023

From https://ci.nodejs.org/job/citgm-smoker-nobuild/nodes=osx11/:

11:00:40 + curl -O https://nodejs.org/download/release/v20.10.0/node-v20.10.0-darwin-x64.tar.gz
...
11:00:49 /var/folders/1l/nz78mlkn2bx3p52l61053yqm0000gp/T/jenkins12141042854684170859.sh: line 34: /Users/iojs/build/workspace/citgm-smoker-nobuild/node/bin/node: Bad CPU type in executable

I also noticed that it works on test-nearform-macos11.0-arm64-1 - from speaking briefly to @richardlau it could be related to this NearForm machine having Rosetta 2 whereas the macstadium machines not (see trend).

This is confusing as tests will or will not run depending on which machine it happens to be scheduled on.

@targos
Copy link
Member

targos commented Dec 22, 2023

I would say that the actual bug is that we download the wrong binary.

@richardlau
Copy link
Member

richardlau commented Dec 22, 2023

This is a result of the job config that currently always picks "x64" for macOS:

case $nodes in
  *-ppcle|*-ppc64le) OS=linux; ARCH=ppc64le; EXT=tar.gz;;
  ubuntu*|debian*|fedora*|centos*|rhel*-x64) OS=linux; ARCH=x64; EXT=tar.gz;;
  osx*) OS=darwin; ARCH=x64; EXT=tar.gz;;
  *-s390x) OS=linux; ARCH=s390x; EXT=tar.gz;;
  aix*) OS=aix; ARCH=ppc64; EXT=tar.gz;;
  win*) OS=win; ARCH=x64; EXT=zip;;
esac

FWIW node-test-node-addon-api-new has something similar (maybe this logic should be shared in a shell script in this repository?) but there it always picks "arm64" for macOS 11 (which probably isn't right either):

case $nodes in
  centos7*-ppcle) OS=linux; ARCH=ppc64le; EXT=tar.gz; OLD_KERNEL=yes;;
  centos*-ppcle|*-ppc64le) OS=linux; ARCH=ppc64le; EXT=tar.gz;;
  ubuntu18*-64) OS=linux; ARCH=x64; EXT=tar.gz; OLD_KERNEL=yes;;
  ubuntu*-64|debian*-64|debian*-x64|fedora*|centos7*|rhel*-x64) OS=linux; ARCH=x64; EXT=tar.gz;;
  ubuntu*-32|debian*-32|fedora*) OS=linux; ARCH=x86; EXT=tar.gz;;
  osx11*) OS=darwin; ARCH=arm64; EXT=tar.gz;;
  osx*) OS=darwin; ARCH=x64; EXT=tar.gz;;
  rhel7*-s390x) OS=linux; ARCH=s390x; EXT=tar.gz OLD_KERNEL=yes;;
  *-s390x) OS=linux; ARCH=s390x; EXT=tar.gz;;
  aix*) OS=aix; ARCH=ppc64; EXT=tar.gz;;
  win*) OS=win; ARCH=x64; EXT=zip;;
  smart*) OS=sunos; ARCH=x64; EXT=tar.gz;;
esac

@richardlau
Copy link
Member

My suggestion would be to switch from using label osx11 for macOS 11 on arm64 to (new label) osx11-arm64. That would be easier to distinguish from the existing osx11-x64 label in the scripts.
e.g. we could then have

 osx*-arm64) OS=darwin; ARCH=arm64; EXT=tar.gz;;
 osx*-x64) OS=darwin; ARCH=x64; EXT=tar.gz;;

@targos targos mentioned this issue Mar 4, 2024
2 tasks
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