NGINX-日志显示 libc-2.23.so 的段错误

NGINX-日志显示 libc-2.23.so 的段错误

我们最近在运行 Ubuntu 16.04 的服务器上调整了 FPM 和 NGINX。我们已尽最大努力配置了 FPM 和 NGINX,但在压力测试期间,我们在 syslog 文件中看到了异常错误。

Mar 14 15:09:07 preprod kernel: [744222.773760] nginx[22589]: segfault at 557a0bf09100 ip 00007f214b88e52f sp 00007ffcbfd3d450 error 4 in libc-2.23.so[7f214b80c000+1c0000]

Mar 14 15:09:10 preprod kernel: [744225.439276] nginx[22609]: segfault at 557a0bfa78c0 ip 00007f214b88e52f sp 00007ffcbfd3cf70 error 4 in libc-2.23.so[7f214b80c000+1c0000]

Mar 14 15:09:12 preprod kernel: [744227.707396] nginx[22287]: segfault at 5579a7016288 ip 00007f214b88e52f sp 00007ffcbfd3d5a0 error 4 in libc-2.23.so[7f214b80c000+1c0000]

Mar 14 15:09:12 preprod kernel: [744227.790616] nginx[22610]: segfault at 557a0c045210 ip 00007f214b88e52f sp 00007ffcbfd3cd60 error 4 in libc-2.23.so[7f214b80c000+1c0000]

Mar 14 15:09:14 preprod kernel: [744229.909503] nginx[22638]: segfault at 557a0bf91960 ip 00007f214b88e52f sp 00007ffcbfd3d370 error 4 in libc-2.23.so[7f214b80c000+1c0000]

Mar 14 15:09:21 preprod kernel: [744236.728542] nginx[22671]: segfault at 557a0bfce230 ip 00007f214b88a478 sp 00007ffcbfd3d3e0 error 4 in libc-2.23.so[7f214b80c000+1c0000]

我将 NGINX 升级到最新稳定版本,希望它能解决这个问题。不幸的是,它似乎仍然崩溃。然后我配置 NGINX 将转储文件写入 /tmp/,但当我运行 gdb 后跟“bt”时,我只看到以下输出...:

(gdb) bt
#0  0x00007f3bb4d2c428 in ?? ()
#1  0x00007f3bb4d2e02a in ?? ()
#2  0x0000000000000020 in ?? ()
#3  0x0000000000000000 in ?? ()

编辑:GDB BT 的输出如下...:

(gdb) bt
#0  0x00007f3bb4d2c428 in __GI_raise (sig=sig@entry=6) at 
../sysdeps/unix/sysv/linux/raise.c:54
#1  0x00007f3bb4d2e02a in __GI_abort () at abort.c:89
#2  0x00007f3bb4d6e7ea in __libc_message (do_abort=2, 
fmt=fmt@entry=0x7f3bb4e87ed8 "*** Error in `%s': %s: 0x%s ***\n")
   at ../sysdeps/posix/libc_fatal.c:175
#3  0x00007f3bb4d77dfb in malloc_printerr (ar_ptr=0x7f3bb50bbb20 
<main_arena>, ptr=0x555ca9650fe0, str=0x7f3bb4e84c75 "corrupted size vs. prev_size",
   action=3) at malloc.c:5006
#4  _int_free (av=0x7f3bb50bbb20 <main_arena>, p=<optimized out>, 
have_lock=0) at malloc.c:4014
#5  0x00007f3bb4d7b53c in __GI___libc_free (mem=<optimized out>) at 
malloc.c:2968
#6  0x0000555ca82ef537 in ngx_destroy_pool ()
#7  0x0000555ca8330ce1 in ngx_http_free_request ()
#8  0x0000555ca836a0bb in ngx_http_v2_close_stream ()
#9  0x0000555ca8344d45 in ?? ()
#10 0x0000555ca8343e3f in ?? ()
#11 0x0000555ca8319d94 in ?? ()
#12 0x0000555ca830ed2a in ngx_process_events_and_timers ()
#13 0x0000555ca8317bb5 in ?? ()
#14 0x0000555ca8315fce in ngx_spawn_process ()
#15 0x0000555ca8317260 in ?? ()
#16 0x0000555ca83188fd in ngx_master_process_cycle ()
#17 0x0000555ca82ecbfe in main ()

我不知道该怎么办。我们从一开始就开始进行故障排除,因为我们看到间歇性的连接错误,而 NGINX / FPM 日志没有显示太多内容。

任何建议或指导都将不胜感激!

相关内容