webserver-llc / angie

Angie - drop-in replacement for Nginx
https://en.angie.software
BSD 2-Clause "Simplified" License
1.2k stars 65 forks source link

Coredump #102

Open doublex opened 4 hours ago

doublex commented 4 hours ago

Angie 1.7.0 dumps core using proxy_http_version 3. If it helps I can compile -O0 - to provide the content of some variables.

Our config is a bit awkward: we want to test http/3 only for certain requests:

    map $http_authorization $upstream_server {
        ''                      http://upstream_http11;
        default                 https://1.2.3.4:5678;
    }
    server {
        location / {
            proxy_pass                      $upstream_server;
            proxy_http_version              1.1;
            if ($http_authorization) {
                proxy_http_version          3;
            }
        }
    }
(gdb) backtrace
#0  ngx_http_v3_decode_insert_count (c=c@entry=0x7ffc11741830, insert_count=insert_count@entry=0x1b39e48) at src/http/v3/ngx_http_v3_table.c:526
#1  0x00000000004b0fe2 in ngx_http_v3_parse_field_section_prefix (b=<optimized out>, st=<optimized out>, c=<optimized out>) at src/http/v3/ngx_http_v3_parse.c:477
#2  ngx_http_v3_parse_headers (c=c@entry=0x7ffc11741830, st=st@entry=0x1b39e18, b=b@entry=0x1b39b50) at src/http/v3/ngx_http_v3_parse.c:340
#3  0x00000000004c7cb9 in ngx_http_v3_proxy_process_status_line (r=0x1a984c0) at src/http/modules/ngx_http_proxy_module.c:6875
#4  0x00000000004929f9 in ngx_http_upstream_process_header (r=0x1a984c0, u=0x1b39848) at src/http/ngx_http_upstream.c:2815
#5  0x000000000048e430 in ngx_http_upstream_handler (ev=0x7ff495100e90) at src/http/ngx_http_upstream.c:1405
#6  0x000000000043aa3b in ngx_event_process_posted (cycle=cycle@entry=0x1696de0, posted=0x52e310 <ngx_posted_events>) at src/event/ngx_event_posted.c:34
#7  0x000000000043a525 in ngx_process_events_and_timers (cycle=cycle@entry=0x1696de0) at src/event/ngx_event.c:263
#8  0x0000000000443c21 in ngx_worker_process_cycle (cycle=0x1696de0, data=<optimized out>) at src/os/unix/ngx_process_cycle.c:733
#9  0x0000000000441feb in ngx_spawn_process (cycle=cycle@entry=0x1696de0, proc=proc@entry=0x443b1d <ngx_worker_process_cycle>, data=data@entry=0x3, name=name@entry=0x4e0396 "worker process", respawn=respawn@entry=-4) at src/os/unix/ngx_process.c:200
#10 0x0000000000442dde in ngx_start_worker_processes (cycle=cycle@entry=0x1696de0, n=8, type=type@entry=-4) at src/os/unix/ngx_process_cycle.c:355
#11 0x0000000000444a0f in ngx_master_process_cycle (cycle=0x1696de0, cycle@entry=0x1692dd0) at src/os/unix/ngx_process_cycle.c:211
#12 0x0000000000418847 in main (argc=<optimized out>, argv=<optimized out>) at src/core/nginx.c:419
doublex commented 4 hours ago

Can't reproduce on a development machine. This is the line in question:

max_entries = h3scf->max_table_capacity / 32;