nginx worker segfault, NULL pool

Bruno Prémont bruno.premont at restena.lu
Sat Jun 9 14:54:01 UTC 2012


Hallo Maxim,

On Sat, 09 June 2012 Maxim Dounin <mdounin at mdounin.ru> wrote:
> On Fri, Jun 08, 2012 at 11:40:46PM +0200, Bruno Prémont wrote:
> > > On Fri, 08 June 2012 Maxim Dounin <mdounin at mdounin.ru> wrote:
> > > > On Fri, Jun 08, 2012 at 02:40:52PM +0200, Bruno Prémont wrote:
> > > > > Running nginx on ARM I'm having it segfault at about any request (those
> > > > > known not to crash are /status/nginx and /status/php-fpm).
> > > > > Attaching it with GDB I get the following trace:
> > > > 
> > > > [...]
> > > > 
> > > > >         geoip_country  /usr/share/GeoIP/GeoIPv6.dat;
> > > > 
> > > > Is it works for you if you don't use GeoIP?
> > > 
> > > Just disabling it config side makes no difference.
> > > 
> > > I will try disabling it at configure time and see if it changes
> > > anything, though I doubt it will.
> > 
> > Exact same result when geoip support is not built at all.
> > 
> > 
> > Looking more exactly at the URLs I tested, static file like images
> > don't crash the worker, just those that get handled by php-fpm upstream
> > do (e.g. /collectd/ which implies /collectd/index.php).
> 
> You've claimed above "/status/php-fpm" works ok too.  Is it was 
> mistake?
> 
> Anyway, please make sure you have aligment problems properly 
> reported by a kernel.  It looks like the linux kernel has an 
> unfortunate default to silently ignore alignment problems on arm, 
> which results in data corruption on unaligned accesses instead of 
> immediate exit on SIGBUS when unaligned access happens.  You may 
> get proper behaviour with
> 
> echo 4 > /proc/cpu/alignment 
> 
> This should allow to trace a root of your problems.
> 
> See http://lecs.cs.ucla.edu/wiki/index.php/XScale_alignment for 
> more details.

Thanks for the pointer, will read trough it!

Seems to be that one, after echoing 4 to /proc/cpu/alignment nginx
does not even start anymore (and `nginx -t` fails as well), each time with
SIGBUS.

e.g. for `nginx -t` the first SIGBUS happens at

#0  0x0000d64c in ngx_set_cpu_affinity (cf=0xbe892358, cmd=<optimized out>, conf=<optimized out>) at src/core/nginx.c:1275
#1  0x0001cafc in ngx_conf_handler (last=13909340, cf=0xbe892358) at src/core/ngx_conf_file.c:394
#2  ngx_conf_parse (cf=0xbe892358, filename=0xd43d70) at src/core/ngx_conf_file.c:244
#3  0x0001aba4 in ngx_init_cycle (old_cycle=0xbe8923c0) at src/core/ngx_cycle.c:268
#4  0x0000e29c in main (argc=<optimized out>, argv=<optimized out>) at src/core/nginx.c:331

as backtraced with gdb.

Thanks,
Bruno



More information about the nginx mailing list