Opened 10 years ago

Closed 10 years ago

#636 closed defect (invalid)

CPU 100% nginx/1.7.6

Reported by: Alex Storn Owned by:
Priority: minor Milestone:
Component: nginx-core Version: 1.7.x
Keywords: cpu, overhead Cc:
uname -a: FreeBSD example.com 10.1-RC1 FreeBSD 10.1-RC1 #0 r272463: Fri Oct 3 01:47:10 UTC 2014 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
nginx -V: nginx version: nginx/1.7.6
TLS SNI support enabled
configure arguments: --prefix=/usr/local/etc/nginx --with-cc-opt='-I/root/make/boringssl/.openssl/include -I /usr/local/include' --with-ld-opt='-L/root/make/boringssl/.openssl/lib -L /usr/local/lib' --conf-path=/usr/local/etc/nginx/nginx.conf --sbin-path=/usr/local/sbin/nginx --pid-path=/var/run/nginx.pid --error-log-path=/var/log/nginx-error.log --user=www --group=www --with-file-aio --with-ipv6 --with-google_perftools_module --http-client-body-temp-path=/var/tmp/nginx/client_body_temp --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi_temp --http-proxy-temp-path=/var/tmp/nginx/proxy_temp --http-scgi-temp-path=/var/tmp/nginx/scgi_temp --http-uwsgi-temp-path=/var/tmp/nginx/uwsgi_temp --http-log-path=/var/log/nginx-access.log --add-module=/usr/ports/www/nginx-devel/work/openresty-headers-more-nginx-module-0c6e05d --with-http_image_filter_module --with-http_stub_status_module --with-pcre --with-http_spdy_module --with-http_ssl_module

Description

  • Last version BoringSSL
# ps aux | grep nginx
www      20573 100.0  0.2  145548  33760  -  RN    7:14PM    39:47.66 nginx: worker process (nginx)
www      20576 100.0  0.2  145548  34832  -  RN    7:14PM   148:02.64 nginx: worker process (nginx)
www      20574   0.5  0.2  145548  31476  -  SN    7:14PM     7:10.77 nginx: worker process (nginx)
root     20572   0.0  0.1  125068  10152  -  Ss    7:14PM     0:00.00 nginx: master process /usr/local/sbin/nginx
www      20575   0.0  0.2  145548  33036  -  SN    7:14PM     7:13.49 nginx: worker process (nginx)
root     45299   0.0  0.0   18820   2328  2  S+    7:19AM     0:00.00 grep nginx

nginx.conf = http://trac.nginx.org/nginx/ticket/618

gdb$ bt full
#0  0x00000000004f01af in ssl23_accept ()
No symbol table info available.
#1  0x0000000000511eee in SSL_do_handshake ()
No symbol table info available.
#2  0x0000000000447a6c in ngx_ssl_handshake (c=0x48425060) at src/event/ngx_event_openssl.c:1031
        n = 0x0
        sslerr = 0x48425060
        err = 0x0
#3  0x00000000004618a3 in ngx_http_ssl_handshake (rev=0x43818830) at src/http/ngx_http_request.c:717
        p = 0x890480 <ngx_event_timer_sentinel> ""
        buf = "\264\345\377\377\377\177\000\000\260CD\000\000\000\000\000@]\302H", '\000' <repeats 12 times>, "P\345\377\377\000\000\000\000\300\244FC\000\000\000\000\300\001@H\000\000\000\000`PBH\000\000\000\000\030\230FC\000\000\000\000\060\210\301H\000\000\000\000\060\210\201C\000\000\000\000p\034\211\000&\000\000\000\340`\200C\000\000\000\000`\271aC"
        size = 0x1
        n = 0x1
        err = 0x23
        rc = 0x0
        c = 0x48425060
        hc = 0x4361b9b8
        sscf = 0x434a68c8
#4  0x00000000004361ee in ngx_event_process_posted (cycle=0x43469050, posted=0x891c60 <ngx_posted_events>) at src/event/ngx_event_posted.c:33
        q = 0x43818888
        ev = 0x43818830
#5  0x0000000000434f1d in ngx_process_events_and_timers (cycle=0x43469050) at src/event/ngx_event.c:265
        flags = 0x3
        timer = 0x93
        delta = 0x2
#6  0x00000000004420b4 in ngx_worker_process_cycle (cycle=0x43469050, data=0x0) at src/os/unix/ngx_process_cycle.c:822
        worker = 0x0
        i = 0x7fffffffe520
        c = 0x7fffffffe630
#7  0x000000000043e1e6 in ngx_spawn_process (cycle=0x43469050, proc=0x441f00 <ngx_worker_process_cycle>, data=0x0, name=0x60cec6 "worker process", respawn=0xfffffffffffffffd) at src/os/unix/ngx_process.c:198
        on = 0x1
        pid = 0x0
        s = 0x0
#8  0x000000000043ff2f in ngx_start_worker_processes (cycle=0x43469050, n=0x4, type=0xfffffffffffffffd) at src/os/unix/ngx_process_cycle.c:368
        i = 0x0
        ch = {command = 0x1, pid = 0x0, slot = 0x0, fd = 0x0}
#9  0x000000000043f82a in ngx_master_process_cycle (cycle=0x43469050) at src/os/unix/ngx_process_cycle.c:140
        title = 0x435f6290 "master process /usr/local/sbin/nginx"
        p = 0x435f62b4 ""
        size = 0x25
        i = 0x1
        n = 0x7fffffffe840
        sigio = 0x43469068
        set = {__bits = {0x0, 0x0, 0x0, 0x0}}
        itv = {it_interval = {tv_sec = 0x0, tv_usec = 0x0}, it_value = {tv_sec = 0x0, tv_usec = 0x6}}
        live = 0x0
        delay = 0x0
        ls = 0x0
        ccf = 0x4346a158
#10 0x0000000000404c55 in main (argc=0x1, argv=0x7fffffffeae8) at src/core/nginx.c:407
        i = 0x36
        log = 0x88de10 <ngx_log>
        cycle = 0x43469050
        init_cycle = {conf_ctx = 0x0, pool = 0x43406800, log = 0x88de10 <ngx_log>, new_log = {log_level = 0x0, file = 0x0, connection = 0x0, handler = 0x0, data = 0x0, writer = 0x0, wdata = 0x0, action = 0x0, next = 0x0}, log_use_stderr = 0x0, files = 0x0, free_connections = 0x0, free_connection_n = 0x0, reusable_connections_queue = {prev = 0x0, next = 0x0}, listening = {elts = 0x0, nelts = 0x0, size = 0x0, nalloc = 0x0, pool = 0x0}, paths = {elts = 0x0, nelts = 0x0, size = 0x0, nalloc = 0x0, pool = 0x0}, open_files = {last = 0x0, part = {elts = 0x0, nelts = 0x0, next = 0x0}, size = 0x0, nalloc = 0x0, pool = 0x0}, shared_memory = {last = 0x0, part = {elts = 0x0, nelts = 0x0, next = 0x0}, size = 0x0, nalloc = 0x0, pool = 0x0}, connection_n = 0x0, files_n = 0x0, connections = 0x0, read_events = 0x0, write_events = 0x0, old_cycle = 0x0, conf_file = {len = 0x1f, data = 0x60a058 "/usr/local/etc/nginx/nginx.conf"}, conf_param = {len = 0x0, data = 0x0}, conf_prefix = {len = 0x15, data = 0x60a058 "/usr/local/etc/nginx/nginx.conf"}, prefix = {len = 0x15, data = 0x60a042 "/usr/local/etc/nginx/"}, lock_file = {len = 0x0, data = 0x0}, hostname = {len = 0x0, data = 0x0}}
        ccf = 0x4346a158

Change History (2)

comment:1 by Maxim Dounin, 10 years ago

What makes you think that the problem is in nginx? Backtrace suggests it's in ssl23_accept(), i.e., in BoringSSL code.

comment:2 by Maxim Dounin, 10 years ago

Resolution: invalid
Status: newclosed

Feedback timeout.

Note: See TracTickets for help on using tickets.