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

uncaught target signal 11 (Segmentation fault) - core dumped, running a container on MacOS with M1 chip #253

Closed
PoladMahmudov opened this issue Apr 3, 2021 · 11 comments · Fixed by #403

Comments

@PoladMahmudov
Copy link

Error
Unable to start a container on new MacBook Pro with M1 chip

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
ERRO[0553] error waiting for container: invalid character 'u' looking for beginning of value...

Reproduce

docker run -p 9090:9090 -p 9191:9191 -t adobe/s3mock

System
macOS Big Sur v11.1
Apple M1 chip

Relevant issue
Quoted from here

This is a qemu bug, which is the upstream component we use for running Intel (amd64) containers on M1 (arm64) chips, and is unfortunately not something we control. In general we recommend running arm64 containers on M1 chips because (even ignoring any crashes) they will always be faster and use less memory.

Please encourage the author of this container to supply an arm64 or multi-arch image, not just an Intel one. Now that M1 is a mainstream platform, we think that most container authors will be keen to do this.

@vijjukumar
Copy link

Do we have any workaround for this. Still i am having the same issue.

@aleixmorgadas
Copy link

aleixmorgadas commented Apr 7, 2021

I've been trying to build the image by my own, but I failed 😅

image

I also tried building the image in a Linux machine targeting arm64/v8 but I think I would need more time to succeed.

PD: I had that much troubles using M1 chip that I just changed the laptop to use Intel i7 again. Whole Development ecosystem not ready to use M1.

@MoSattler
Copy link

Same problem here

@agudian
Copy link
Member

agudian commented Apr 23, 2021

I guess until a bit more general issues around Docker, the portability of common images and the various tools are resolved for the M1 chips, you'd have to revert back to using the mock as a library or as a JUnit rule/extension... 🤷

@reevik
Copy link

reevik commented May 10, 2021

Same here. Till the problem get fixed, you can build your own arm64-based docker image with a simple Dockerfile if this work-around works for you:

FROM arm64v8/openjdk
WORKDIR /
ADD s3mock-2.1.30-SNAPSHOT.jar s3mock.jar
EXPOSE 8080
CMD java -jar s3mock.jar

@ansman
Copy link

ansman commented Nov 2, 2021

FYI I have deployed a mirror that supports arm64 to bontouch/s3mock:2.2.2.

@afranken
Copy link
Member

Finally received my M1 MacBook.
There is only a warning when starting the S3Mock docker container:

$ docker --version
Docker version 20.10.10, build b485636
$ docker run -p 9090:9090 -p 9191:9191 -t adobe/s3mock:2.2.3
Unable to find image 'adobe/s3mock:2.2.3' locally
2.2.3: Pulling from adobe/s3mock
4e9f2cdf4387: Pull complete 
58876cffcbd9: Pull complete 
62226b93dc56: Pull complete 
ef406f6befde: Pull complete 
ba1e03aa99fc: Pull complete 
Digest: sha256:6bd3f929f64ddcf6c0f0aa256fedb7c346968434d704b04d6e2af3512f057fd4
Status: Downloaded newer image for adobe/s3mock:2.2.3
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested


  .-')              _   .-')                           .-. .-')  
 ( OO ).           ( '.( OO )_                         \  ( OO ) 
(_)---\_) .-----.   ,--.   ,--.).-'),-----.    .-----. ,--. ,--. 
/    _ | /  -.   \  |   `.'   |( OO'  .-.  '  '  .--./ |  .'   / 
\  :` `. '-' _'  |  |         |/   |  | |  |  |  |('-. |      /, 
 '..`''.)   |_  <   |  |'.'|  |\_) |  |\|  | /_) |OO  )|     ' _)
.-._)   \.-.  |  |  |  |   |  |  \ |  | |  | ||  |`-'| |  .   \  
\       /\ `-'   /  |  |   |  |   `'  '-'  '(_'  '--'\ |  |\   \ 
 `-----'  `----''   `--'   `--'     `-----'    `-----' `--' '--' 



2021-11-24 13:31:03.584  INFO 1 --- [           main] c.a.testing.s3mock.S3MockApplication     : Starting S3MockApplication on 30771aad844c with PID 1 (/opt/service/s3mock-2.2.3-exec.jar started by root in /)
[...]

Afterwards, the S3Mock just starts up.

@ansman
Copy link

ansman commented Nov 24, 2021

I saw that too, but it never actually answered any requests for me:

$ curl http://localhost:9090/
curl: (52) Empty reply from server

@ansman
Copy link

ansman commented Nov 24, 2021

Compare this to running our fork:

$ docker run -p 9090:9090 -p 9191:9191 -t bontouch/s3mock
Unable to find image 'bontouch/s3mock:latest' locally
latest: Pulling from bontouch/s3mock
Digest: sha256:3c905f0fe34967ec013be0592665a04462c771457f35dde49c9373d768a8c139
Status: Downloaded newer image for bontouch/s3mock:latest


  .-')              _   .-')                           .-. .-')
 ( OO ).           ( '.( OO )_                         \  ( OO )
(_)---\_) .-----.   ,--.   ,--.).-'),-----.    .-----. ,--. ,--.
/    _ | /  -.   \  |   `.'   |( OO'  .-.  '  '  .--./ |  .'   /
\  :` `. '-' _'  |  |         |/   |  | |  |  |  |('-. |      /,
 '..`''.)   |_  <   |  |'.'|  |\_) |  |\|  | /_) |OO  )|     ' _)
.-._)   \.-.  |  |  |  |   |  |  \ |  | |  | ||  |`-'| |  .   \
\       /\ `-'   /  |  |   |  |   `'  '-'  '(_'  '--'\ |  |\   \
 `-----'  `----''   `--'   `--'     `-----'    `-----' `--' '--'



2021-11-24 18:26:43.726  INFO 7 --- [           main] c.a.testing.s3mock.S3MockApplication     : Starting S3MockApplication on 103b81ecf415 with PID 7 (/opt/s3mock-exec.jar started by root in /opt)
2021-11-24 18:26:43.728  INFO 7 --- [           main] c.a.testing.s3mock.S3MockApplication     : No active profile set, falling back to default profiles: default
2021-11-24 18:26:44.099  INFO 7 --- [           main] org.eclipse.jetty.util.log               : Logging initialized @812ms to org.eclipse.jetty.util.log.Slf4jLog
2021-11-24 18:26:44.167  INFO 7 --- [           main] o.s.b.w.e.j.JettyServletWebServerFactory : Server initialized with port: 9191
2021-11-24 18:26:44.175  INFO 7 --- [           main] org.eclipse.jetty.server.Server          : jetty-9.4.42.v20210604; built: 2021-06-04T17:33:38.939Z; git: 5cd5e6d2375eeab146813b0de9f19eda6ab6e6cb; jvm 11.0.3+7
2021-11-24 18:26:44.189  INFO 7 --- [           main] o.e.j.s.h.ContextHandler.application     : Initializing Spring embedded WebApplicationContext
2021-11-24 18:26:44.190  INFO 7 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 434 ms
2021-11-24 18:26:44.209  INFO 7 --- [           main] org.eclipse.jetty.server.session         : DefaultSessionIdManager workerName=node0
2021-11-24 18:26:44.209  INFO 7 --- [           main] org.eclipse.jetty.server.session         : No SessionScavenger set, using defaults
2021-11-24 18:26:44.210  INFO 7 --- [           main] org.eclipse.jetty.server.session         : node0 Scavenging every 600000ms
2021-11-24 18:26:44.214  INFO 7 --- [           main] o.e.jetty.server.handler.ContextHandler  : Started o.s.b.w.e.j.JettyEmbeddedWebAppContext@57abad67{application,/,[file:///tmp/jetty-docbase.9191.12279946017681716824/],AVAILABLE}
2021-11-24 18:26:44.214  INFO 7 --- [           main] org.eclipse.jetty.server.Server          : Started @927ms
2021-11-24 18:26:44.220  INFO 7 --- [           main] c.adobe.testing.s3mock.domain.FileStore  : Using "/s3mockroot" as root folder. Will retain files on exit: false
2021-11-24 18:26:44.221  INFO 7 --- [           main] c.a.testing.s3mock.FileStoreController   : Creating initial buckets: []
2021-11-24 18:26:44.297  INFO 7 --- [           main] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'
2021-11-24 18:26:44.382  INFO 7 --- [           main] o.e.j.s.h.ContextHandler.application     : Initializing Spring DispatcherServlet 'dispatcherServlet'
2021-11-24 18:26:44.382  INFO 7 --- [           main] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'
2021-11-24 18:26:44.385  INFO 7 --- [           main] o.s.web.servlet.DispatcherServlet        : Completed initialization in 3 ms
2021-11-24 18:26:44.511  INFO 7 --- [           main] o.e.jetty.util.ssl.SslContextFactory     : x509=X509@2a65bb85(selfsigned,h=[unknown],a=[],w=[]) for Server@4b85880b[provider=null,keyStore=jar:file:/opt/s3mock-exec.jar!/BOOT-INF/classes!/s3mock.jks,trustStore=null]
2021-11-24 18:26:44.549  INFO 7 --- [           main] o.e.jetty.server.AbstractConnector       : Started SslValidatingServerConnector@1b835480{SSL, (ssl, http/1.1)}{0.0.0.0:9191}
2021-11-24 18:26:44.550  INFO 7 --- [           main] o.e.jetty.server.AbstractConnector       : Started ServerConnector@6fb365ed{HTTP/1.1, (http/1.1)}{0.0.0.0:9090}
2021-11-24 18:26:44.551  INFO 7 --- [           main] o.s.b.web.embedded.jetty.JettyWebServer  : Jetty started on port(s) 9191 (ssl, http/1.1), 9090 (http/1.1) with context path '/'
2021-11-24 18:26:44.556  INFO 7 --- [           main] c.a.testing.s3mock.S3MockApplication     : Started S3MockApplication in 1.042 seconds (JVM running for 1.269)

@PoladMahmudov
Copy link
Author

PoladMahmudov commented Jan 7, 2022

It works well now for me. Feel free to close this issue, if nothing else is left about it. Thanks for the fix!

  • S3Mock (v 2.3.2)
  • Docker (v 4.3.2)

@afranken afranken mentioned this issue Jan 26, 2022
afranken added a commit that referenced this issue Jan 31, 2022
This supports linux/amd64 and linux/arm64 for now.

Fixes #253 #287 #389
afranken added a commit that referenced this issue Jan 31, 2022
This supports linux/amd64 and linux/arm64 for now.

Fixes #253 #287 #389
@afranken
Copy link
Member

afranken commented Feb 1, 2022

just released version 2.4.6 which is multi arch for arm64 and amd64.
https://hub.docker.com/r/adobe/s3mock/tags?page=1&ordering=last_updated

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

Successfully merging a pull request may close this issue.

8 participants