Skip to content

Run crashes on macOS Ventura 13.5 #114

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

Closed
michal-sankot opened this issue Aug 8, 2023 · 10 comments
Closed

Run crashes on macOS Ventura 13.5 #114

michal-sankot opened this issue Aug 8, 2023 · 10 comments

Comments

@michal-sankot
Copy link

michal-sankot commented Aug 8, 2023

I tried to run arango docker image as indicated in tutorial

docker run -p 8529:8529 -e ARANGO_ROOT_PASSWORD=openSesame arangodb/arangodb:3.11.2

And it crashes.

 ~/workspace/arangodb  docker run -p 8529:8529 -e ARANGO_ROOT_PASSWORD=openSesame arangodb/arangodb:3.11.2                        
Unable to find image 'arangodb/arangodb:3.11.2' locally
3.11.2: Pulling from arangodb/arangodb
c1d6d1b2d5a3: Pull complete
8d38d666a6cc: Pull complete
c2b0ae240f39: Pull complete
2ed1cc6cf126: Pull complete
2b33253e34bc: Pull complete
675c507860f7: Pull complete
350176059c1c: Pull complete
fe0c25583f89: Pull complete
2c699bb0da8d: Pull complete
17fc424bf7d2: Pull complete
Digest: sha256:aef44902df4ca26a7fd5322077799a130ad3772a9a3bf479bb7b0ec441f98b42
Status: Downloaded newer image for arangodb/arangodb:3.11.2
Initializing root user...Hang on...
<jemalloc>: MADV_DONTNEED does not work (memset will be used instead)
<jemalloc>: (This is the expected behaviour if you are running under QEMU)
qemu: uncaught target signal 4 (Illegal instruction) - core dumped
Illegal instruction
Initializing database...Hang on...
<jemalloc>: MADV_DONTNEED does not work (memset will be used instead)
<jemalloc>: (This is the expected behaviour if you are running under QEMU)
qemu: uncaught target signal 4 (Illegal instruction) - core dumped

ArangoDB didn't start correctly during init
cat: can't open '/tmp/init-log': No such file or directory

Is there any way to make it work?

System Version: macOS 13.5 (22G74)
Chip: Apple M1 Pro

@dothebart
Copy link
Contributor

Hi,
you need to make sure that the ARM-version of the container is used.
If it pulls x86, Rosetta is ran, which doesn't implement some cpu opcodes - hence you get SIG_ILL.

@michal-sankot
Copy link
Author

michal-sankot commented Aug 8, 2023

ok, thanks 👍

it worked with:

docker run --platform linux/arm64/v8 -p 8529:8529 -e ARANGO_ROOT_PASSWORD=openSesame arangodb/arangodb:3.11.2

it may be handy to add it as a note to https://www.arangodb.com/download-major/docker/ so that others on Mx don't hit the same issue.

@tianon
Copy link

tianon commented Dec 14, 2023

Was there any investigation done into why it's choosing linux/amd64 on a linux/arm64/v8 host? Docker shouldn't do that, and I've indeed verified that Docker pulls the correct thing on a native host. 😕 Is it possible your Docker VM was running in x86 mode or something somehow? Was this on Docker Desktop? A hand-maintained VM? There's a pretty serious bug here somewhere, and I think it's one worth pulling on. 😅

@dothebart
Copy link
Contributor

@tianon this seemed to be a MacOS host; It has a Rossetta x86 emulation by default. To the MacOS user it seems to be more or less opaque which binary he's running - unless its x86 and demands AVX2 - which isn't implemented in Rosettta.
So @michal-sankot would probably need to revalidate which docker etc. was in use on his machine.

@michal-sankot
Copy link
Author

hey, i can validate it. though i'm not strong with docker. so if you give me steps/commands to run, i happily fire them to check it.

@michal-sankot
Copy link
Author

i've listed defualt vars (on mac) and it sets default docker platform to linux/amd64. so that's why it assumed platform to be amd64 while it's arm (M1 chip).

DOCKER_DEFAULT_PLATFORM=linux/amd64

@dothebart
Copy link
Contributor

can you file the docker binary? is it ARM? or is it M1? or is it a fat binary?

@michal-sankot
Copy link
Author

it's ARM

/usr/local/bin/docker: Mach-O 64-bit executable arm64

@tianon
Copy link

tianon commented Dec 20, 2023

😬 setting DOCKER_DEFAULT_PLATFORM on your host in this way is very very extremely not recommended (I think it might not even be an officially documented environment variable for exactly that reason)

@michal-sankot
Copy link
Author

hmm, i was using intel mac before, so maybe it got carried over when migrating to m1 model 🤔

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