Welcome! Log In Create A New Profile

Advanced

Re: nginx -t > Illegal instruction

Maxim Dounin
October 15, 2013 11:40AM
Hello!

On Tue, Oct 15, 2013 at 06:14:21PM +0300, Sergey Talchuk wrote:

> Всем привет!
>
> собрал nginx для своей системы без проблем (собирал на ней же). Только
> похоже при запуске nginx -t не может определить тип процессора. К
> сожалению, система находится на носителе доступном только для чтения.
> Поэтому отдебажить системные библиотеки не представляется возможным.
> Надеюсь на помощь.

[...]

> Program received signal SIGILL, Illegal instruction.
> 0x0805dca5 in ngx_cpuid (i=0, buf=0xbffff950) at src/core/ngx_cpuinfo.c:30
> 30 src/core/ngx_cpuinfo.c: No such file or directory.
> in src/core/ngx_cpuinfo.c
> (gdb) bt
> #0 0x0805dca5 in ngx_cpuid (i=0, buf=0xbffff950) at
> src/core/ngx_cpuinfo.c:30
> #1 0x0805dbbb in ngx_cpuinfo () at src/core/ngx_cpuinfo.c:84
> #2 0x0806e4f7 in ngx_os_init (log=0x80c27a8) at
> src/os/unix/ngx_posix_init.c:60

[...]

> cat /proc/cpuinfo
> processor : 0
> vendor_id : CyrixInstead
> cpu family : 4
> model : 1
> model name : Cx486SLC
> stepping : unknown
> fdiv_bug : no
> hlt_bug : no
> f00f_bug : no
> coma_bug : no
> fpu : no
> fpu_exception : no
> cpuid level : -1
> wp : yes
> flags :
> bogomips : 44.33

Ваш процессор настолько старый, что не поддерживает инструкцию
cpuid. Quick and dirty workaround - добавить return в самом
начале функции ngx_cpuinfo() в src/core/ngx_cpuinfo.c:

diff --git a/src/core/ngx_cpuinfo.c b/src/core/ngx_cpuinfo.c
--- a/src/core/ngx_cpuinfo.c
+++ b/src/core/ngx_cpuinfo.c
@@ -75,6 +75,8 @@ ngx_cpuinfo(void)
u_char *vendor;
uint32_t vbuf[5], cpu[4], model;

+ return;
+
vbuf[0] = 0;
vbuf[1] = 0;
vbuf[2] = 0;


--
Maxim Dounin
http://nginx.org/en/donation.html

_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

nginx -t > Illegal instruction

Sergey Talchuk October 15, 2013 11:16AM

Re: nginx -t > Illegal instruction

Maxim Dounin October 15, 2013 11:40AM

Re: nginx -t > Illegal instruction

Sergey Kandaurov October 15, 2013 01:08PM

Re: nginx -t > Illegal instruction

Gena Makhomed October 15, 2013 01:38PM

Re: nginx -t > Illegal instruction

Igor Sysoev October 15, 2013 02:02PM

Re: nginx -t > Illegal instruction

Gena Makhomed October 15, 2013 03:20PM

Re: nginx -t > Illegal instruction

Sergey Talchuk October 18, 2013 02:44AM

Re: nginx -t > Illegal instruction

Maxim Dounin October 15, 2013 02:10PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 166
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready