Description
Tengine version: Tengine/2.3.0 (nginx/1.15.9)
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC)
built with OpenSSL 1.1.0g 2 Nov 2017
nginx-upsync-module 使用的是master分支代码
有时进程会出现segfault error
gdb如下
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-64.el7
Copyright (C) 2013 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-redhat-linux-gnu".
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /usr/sbin/nginx...Reading symbols from /usr/lib/debug/usr/sbin/nginx.debug...done.
done.
[New LWP 7004]
[New LWP 8731]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `nginx: worker pr'.
Program terminated with signal 11, Segmentation fault.
#0 ngx_http_upstream_get_peer (rrp=0x14c5d84b04c8) at src/http/ngx_http_upstream_round_robin.c:626
626 if (peer->down) {
Missing separate debuginfos, use: debuginfo-install glibc-2.17-222.el7.x86_64 jemalloc-3.6.0-1.el7.x86_64 libgcc-4.8.5-28.el7_5.1.x86_64 nss-softokn-freebl-3.16.2.3-9.el7.x86_64 pcre-8.32-14.el7.x86_64 sssd-client-1.12.2-58.el7.x86_64 zlib-1.2.7-13.el7.x86_64
(gdb) list
621
622 if (rrp->tried[n] & m) {
623 continue;
624 }
625
626 if (peer->down) {
627 continue;
628 }
629
630 #if (NGX_HTTP_UPSTREAM_CHECK)
(gdb) bt
#0 ngx_http_upstream_get_peer (rrp=0x14c5d84b04c8) at src/http/ngx_http_upstream_round_robin.c:626
#1 ngx_http_upstream_get_round_robin_peer (pc=0x14c5db8989e8, data=0x14c5d84b04c8) at src/http/ngx_http_upstream_round_robin.c:520
#2 0x00000000004ee4ca in ngx_http_upstream_get_keepalive_peer (pc=0x14c5db8989e8, data=0x14c5d84b0490) at src/http/modules/ngx_http_upstream_keepalive_module.c:241
#3 0x0000000000478728 in ngx_event_connect_peer (pc=pc@entry=0x14c5db8989e8) at src/event/ngx_event_connect.c:34
#4 0x00000000004ab87a in ngx_http_upstream_connect (r=r@entry=0x14c5dbc64050, u=u@entry=0x14c5db8989d8) at src/http/ngx_http_upstream.c:1611
#5 0x00000000004acb42 in ngx_http_upstream_init_request (r=r@entry=0x14c5dbc64050) at src/http/ngx_http_upstream.c:871
#6 0x00000000004ad63d in ngx_http_upstream_init (r=r@entry=0x14c5dbc64050) at src/http/ngx_http_upstream.c:549
#7 0x000000000049ff07 in ngx_http_read_client_request_body (r=r@entry=0x14c5dbc64050, post_handler=0x4ad623 <ngx_http_upstream_init>) at src/http/ngx_http_request_body.c:77
#8 0x00000000004db181 in ngx_http_proxy_handler (r=0x14c5dbc64050) at src/http/modules/ngx_http_proxy_module.c:946
#9 0x0000000000493bb8 in ngx_http_core_content_phase (r=0x14c5dbc64050, ph=) at src/http/ngx_http_core_module.c:1314
#10 0x000000000048e6b3 in ngx_http_core_run_phases (r=r@entry=0x14c5dbc64050) at src/http/ngx_http_core_module.c:937
#11 0x000000000048e7c2 in ngx_http_handler (r=r@entry=0x14c5dbc64050) at src/http/ngx_http_core_module.c:920
#12 0x000000000049769d in ngx_http_process_request (r=r@entry=0x14c5dbc64050) at src/http/ngx_http_request.c:2204
#13 0x00000000004c763b in ngx_http_v2_run_request (r=0x14c5dbc64050) at src/http/v2/ngx_http_v2.c:3789
#14 0x00000000004c76c7 in ngx_http_v2_state_header_complete (h2c=h2c@entry=0x14c5d8476a20, pos=pos@entry=0x14c5dc94f1cf "\240\361\356Ke\370\211\t\032mDF\222\006\232\023\256\064\333\357\066",
end=end@entry=0x14c5dc94f1cf "\240\361\356Ke\370\211\t\032mDF\222\006\232\023\256\064\333\357\066") at src/http/v2/ngx_http_v2.c:1704
#15 0x00000000004c7f6e in ngx_http_v2_state_process_header (h2c=h2c@entry=0x14c5d8476a20, pos=0x14c5dc94f1cf "\240\361\356Ke\370\211\t\032mDF\222\006\232\023\256\064\333\357\066",
end=end@entry=0x14c5dc94f1cf "\240\361\356Ke\370\211\t\032mDF\222\006\232\023\256\064\333\357\066") at src/http/v2/ngx_http_v2.c:1675
#16 0x00000000004c86cd in ngx_http_v2_state_header_block (h2c=0x14c5d8476a20, pos=0x14c5dc94f1cf "\240\361\356Ke\370\211\t\032mDF\222\006\232\023\256\064\333\357\066", end=0x14c5dc94f1cf "\240\361\356Ke\370\211\t\032mDF\222\006\232\023\256\064\333\357\066")
at src/http/v2/ngx_http_v2.c:1273
#17 0x00000000004c665f in ngx_http_v2_read_handler (rev=rev@entry=0x14c5e544d028) at src/http/v2/ngx_http_v2.c:413
#18 0x00000000004c6b7c in ngx_http_v2_idle_handler (rev=0x14c5e544d028) at src/http/v2/ngx_http_v2.c:4536
#19 0x0000000000481ff5 in ngx_epoll_process_events (cycle=, timer=, flags=) at src/event/modules/ngx_epoll_module.c:973
#20 0x0000000000476ee2 in ngx_process_events_and_timers (cycle=cycle@entry=0x14c60bcae050) at src/event/ngx_event.c:255
#21 0x00000000004801ee in ngx_worker_process_cycle (cycle=0x14c60bcae050, data=) at src/os/unix/ngx_process_cycle.c:811
#22 0x000000000047c6bb in ngx_spawn_process (cycle=cycle@entry=0x14c60bcae050, proc=proc@entry=0x48017d <ngx_worker_process_cycle>, data=data@entry=0xb, name=name@entry=0x71b4e7 "worker process", respawn=respawn@entry=-3) at src/os/unix/ngx_process.c:199
#23 0x000000000047f45b in ngx_start_worker_processes (cycle=cycle@entry=0x14c60bcae050, n=20, type=type@entry=-3) at src/os/unix/ngx_process_cycle.c:395
#24 0x00000000004808ee in ngx_master_process_cycle (cycle=cycle@entry=0x14c60bcae050) at src/os/unix/ngx_process_cycle.c:138
#25 0x0000000000457ae4 in main (argc=, argv=) at src/core/nginx.c:418
(gdb) print peer
$1 = (ngx_http_upstream_rr_peer_t *) 0x0