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

entrypoint.sh Illegal instruction #25

Open
azambranogalbis-etraid opened this issue Apr 20, 2018 · 6 comments
Open

entrypoint.sh Illegal instruction #25

azambranogalbis-etraid opened this issue Apr 20, 2018 · 6 comments

Comments

@azambranogalbis-etraid
Copy link

Hi,

I am facing this issue when trying to start the container in clean machine. The docker container never starts.

$ docker run -d -p 27017:27017 --name mongo khezen/mongo:latest
1dc83708724e879933d3f5443591c88b4d721f007f7f5be2aaa1b8d25498edae
$ docker logs mongo
$@
/entrypoint.sh: line 11:     7 Illegal instruction     (core dumped) $@

The docker version I am using:

$ docker version
Client:
 Version:       18.03.0-ce
 API version:   1.37
 Go version:    go1.9.4
 Git commit:    0520e24
 Built: Wed Mar 21 23:10:01 2018
 OS/Arch:       linux/amd64
 Experimental:  false
 Orchestrator:  swarm

Server:
 Engine:
  Version:      18.03.0-ce
  API version:  1.37 (minimum version 1.12)
  Go version:   go1.9.4
  Git commit:   0520e24
  Built:        Wed Mar 21 23:08:31 2018
  OS/Arch:      linux/amd64
  Experimental: false

Thanks for the support!

@khezen
Copy link
Owner

khezen commented Apr 23, 2018

I can not reproduce.

Could you try to run the following
docker run -d -p 27017:27017 --name mongo -v /:{path} khezen/mongo:latest
replace {path} by whatever you want on your host.

Then you should have the following {path}/core. This file should contain logs pointing which instruction caused the core dump.

@azambranogalbis-etraid
Copy link
Author

Hi,

core file is not being created due to the core_pattern configuration inside the container (which apparently cannot be changed...). Nevertheless, I managed to run mongod inside the container with gdb:

$ docker run -it khezen/mongo:latest bash
$@
root@f2f2642c5d53:/# apt-get install gdb
[...]
root@f2f2642c5d53:/# gdb -ex=r mongod
GNU gdb (Debian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from mongod...(no debugging symbols found)...done.
Starting program: /bin/mongod
warning: Error disabling address space randomization: Operation not permitted
During startup program terminated with signal SIGILL, Illegal instruction.
(gdb)

So, mongod is terminating with signal SIGILL, no further information is given...

@khezen
Copy link
Owner

khezen commented Apr 24, 2018

How about running docker run -d -p 27017:27017 --name mongo --ulimit core=-1 -v /:{path} khezen/mongo:latest and check if there is a core dump generated.

@khezen
Copy link
Owner

khezen commented Apr 30, 2018

I fail to reproduce this issue. If anyone here is having the same and is willing to share some of his investigation that'd be great.

@azambranogalbis-etraid
Copy link
Author

Hi!

I managed to generate the core dump (attached)
core.mongod.16.bab995a4c647.1525247014.tar.gz

@GermanAizek
Copy link

@khezen,
Most likely this is due to the fact that MongoDB 5.0+ requires AVX instructions, to solve this problem you need to build with my patch, or edit SConstruct build configuration file yourself.
https://github.com/GermanAizek/mongodb-without-avx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants