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

Illegal instruction (core dumped) #49

Closed
Luffbee opened this issue Aug 14, 2017 · 1 comment
Closed

Illegal instruction (core dumped) #49

Luffbee opened this issue Aug 14, 2017 · 1 comment

Comments

@Luffbee
Copy link

Luffbee commented Aug 14, 2017

When I run docker run -i -t --rm openresty/openresty:alpine on a virtual machine, it will finish immediately with a 132 return value. This has never happened when I run it on my laptop. So I run docker run -i -t --rm --entrypoint=/bin/sh openresty/openresty:alpine to get a shell and see what happened. I get this:

$ docker run -i -t --rm --entrypoint=/bin/sh openresty/openresty:alpine 
/ # /usr/local/openresty/bin/openresty 
Illegal instruction (core dumped)
/ # /usr/local/openresty/luajit/bin/luajit
Illegal instruction (core dumped)

Because the nginx installed by apk add runs well, I think it maybe caused by luajit. As you can see luajit do failed.

I have tried to build the image from Dockerfile which will compile the source on that virtual machine, but it also failed. I have also tried centos tag, still failed.
Howerver, the openresty/openresty:latest image runs well. It is an old version with alpine:3.4, and not in the tags list of docker hub now.

I am not familiar with the 'illegal instruction' error. I only know that it is related to cpus. So, here is some cpu information of the virtual machine:

$ uname -a
Linux xxx.xxx.xxx.com 3.10.0-514.26.2.el7.x86_64 #1 SMP Tue Jul 4 15:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
$ cat /proc/cpuinfo 
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 23
model name	: Intel(R) Xeon(R) CPU           X5450  @ 3.00GHz
stepping	: 6
microcode	: 0x60f
cpu MHz		: 2991.330
cache size	: 6144 KB
physical id	: 0
siblings	: 1
core id		: 0
cpu cores	: 1
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 10
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts mmx fxsr sse sse2 ss syscall nx lm constant_tsc arch_perfmon pebs bts nopl tsc_reliable nonstop_tsc aperfmperf pni ssse3 cx16 sse4_1 tsc_deadline_timer hypervisor lahf_lm dtherm tsc_adjust
bogomips	: 5985.00
clflush size	: 64
cache_alignment	: 64
address sizes	: 43 bits physical, 48 bits virtual
power management:

processor	: 1
vendor_id	: GenuineIntel
cpu family	: 6
model		: 23
model name	: Intel(R) Xeon(R) CPU           X5450  @ 3.00GHz
stepping	: 6
microcode	: 0x60f
cpu MHz		: 2991.330
cache size	: 6144 KB
physical id	: 2
siblings	: 1
core id		: 0
cpu cores	: 1
apicid		: 2
initial apicid	: 2
fpu		: yes
fpu_exception	: yes
cpuid level	: 10
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts mmx fxsr sse sse2 ss syscall nx lm constant_tsc arch_perfmon pebs bts nopl tsc_reliable nonstop_tsc aperfmperf pni ssse3 cx16 sse4_1 tsc_deadline_timer hypervisor lahf_lm dtherm tsc_adjust
bogomips	: 5985.00
clflush size	: 64
cache_alignment	: 64
address sizes	: 43 bits physical, 48 bits virtual
power management:

Could any body help me to solve this problem? Should I change the configuration of the VM, or there are some other ways?

@Luffbee
Copy link
Author

Luffbee commented Aug 14, 2017

I have found the reason of this problem. The cpu of my VM doesn't support sse4.2, but the default configure added that flag. See the discussion here https://groups.google.com/forum/#!topic/openresty/EC_ohjV5ROA.
I modified the configure and build the image by myself. Now it's running successfully, so I'm going to close this issue.

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

1 participant