Any update? > Message: 2 > Date: Fri, 10 Dec 2021 10:43:40 +0300 > From: Vladimir Homutov <vl@nginx.com> > To: nginx-devel@nginx.org > Subject: Re: Congestion control questions > Message-ID: <YbMFLKtAeCbVMGqj@vl.krasnogorsk.ru> > Content-Type: text/plain; charset=utf-8 ________________________________ > On Tue, Dec 07, 2021 at 06:05:48PM +0800, sun edby gaoyan09 - Nginx Development
Can nginx use sendmmsg directly instead of sendmsg? Gao,Yan(ACG VCP) _______________________________________________ nginx-devel mailing list -- nginx-devel@nginx.org To unsubscribe send an email to nginx-devel-leave@nginx.orgby gaoyan09 - Nginx Development
Hi HTTP/2 follow the keepalive config and ignore ngx_exiting, but HTTP/1 and upstream not Gao,Yan(ACG VCP) _______________________________________________ nginx-devel mailing list -- nginx-devel@nginx.org To unsubscribe send an email to nginx-devel-leave@nginx.orgby gaoyan09 - Nginx Development
HI ngx_quic_create_datagrams use sendmsg in loop when without gso. Can use sendmmsg directly? Gao,Yan(ACG VCP) _______________________________________________ nginx-devel mailing list -- nginx-devel@nginx.org To unsubscribe send an email to nginx-devel-leave@nginx.orgby gaoyan09 - Nginx Development
HI ngx_quic_create_datagrams use sendmsg in loop when without gso. Can use sendmmsg directly? Gao,Yan(ACG VCP) _______________________________________________ nginx-devel mailing list -- nginx-devel@nginx.org To unsubscribe send an email to nginx-devel-leave@nginx.orgby gaoyan09 - Nginx Development
> c->quic is never set on main connection (it is not really needed there). > ngx_http_v3_init() is first called with main connection, and later it is > called with _another_ connection that is a stream, and it has c->quic set. > ngx_ssl_shutdown() is not supposed to do something on stream > connections, ssl object is shared with main connection. all necessary > cleanby gaoyan09 - Nginx Development
# HG changeset patch # User Gao,Yan(ACG VCP) <gaoyan09@baidu.com> # Date 1643364731 -28800 # Fri Jan 28 18:12:11 2022 +0800 # Branch quic # Node ID ea58c4329a4b03594737cbe8af1003366f9d1160 # Parent 30cad5a0931e5fd418e2e304b4a6ed5252d39aa2 all udp connection event should not add to events group diff -r 30cad5a0931e -r ea58c4329a4b src/event/ngx_event.c --- a/src/event/ngx_eveby gaoyan09 - Nginx Development
> first time you get there with main nginx connection, when a first QUIC > packet arrives. Thus test c->quic. and if it is NULL it means we need > to create main quic connection and proceed with the handshake. > When the handshake is complete, a stream will be created, and the > ngx_quic_init_stream_handler() will be called which will invoke > listening handler, and weby gaoyan09 - Nginx Development
> The main quic connection is created in ngx_quic_new_connection(), which > calls ngx_quic_open_sockets() and it sets c->udp for the first time. > When packet arrives, c->udp is updated by ngx_lookup_udp_connection(). > The main connection does not have c->quic set; this is used in stream > connections. To access main connection from quic stream, c->quic->pareby gaoyan09 - Nginx Development
> the case you are describing is not what see in backtrace. And in > described case connection is main quic connection which has process > c->quic pointer set. I only find sc->quic = qs; in ngx_quic_create_stream,and this is stream connection, not the main quic connection. How the main quic connection c->quic set? And the local code at this position: changeset: 8813by gaoyan09 - Nginx Development
Why sc->type = SOCK_STREAM in ngx_quic_create_stream? Should it be SOCK_DGRAM? Gao,Yan(ACG VCP) 发件人: "Gao,Yan(媒体云)" <gaoyan09@baidu.com> 日期: 2022年1月26日 星期三 下午2:13 收件人: "nginx-devel@nginx.org" <nginx-devel@nginx.org> 主题: Re: ngx_quic_input_handler Segmentation fault because c->udp->dgram is null I guessby gaoyan09 - Nginx Development
I guess the problem function call chain: final_early_data(openssl)-> quic_set_encryption_secrets-> ngx_quic_set_encryption_secrets -> ngx_quic_init_streams -> ngx_ssl_ocsp_validate-> ngx_handle_read_event But this connection->quic would always be null, and cannot jump to quic if branch in ngx_handle_read_event Gao,Yan(ACG VCP) 发件人: "Gao,Yan(媒体云)" <by gaoyan09 - Nginx Development
> Thank you for report! > Can you please enable debug and provide debug log? Sorry, this is a very rare case, and do not know how to trigger this bug steadily here is more data from the stack p *c $1 = {data = 0x7efd695c74c0, read = 0xf2aa990, write = 0xfa72ca0, fd = 5547, recv = 0x4a7c9a <ngx_udp_shared_recv>, send = 0x4ab5b9 <ngx_udp_unix_send>, recv_chain = 0x0,by gaoyan09 - Nginx Development
loggingHost:kfcm-jorcol-82 2022/01/24 09:09:13 2224#0: *1007558770 quic unknown transport param id:0x20, skipped while SSL handshaking, client: 223.90.188.154, server: 0.0.0.0:7232 loggingHost:kfcm-jorcol-82 2022/01/24 09:09:13 2224#0: *1007558770 quic unknown transport param id:0x3127, skipped while SSL handshaking, client: 223.90.188.154, server: 0.0.0.0:7232 loggingHost:kfcm-jorcol-82 2022/by gaoyan09 - Nginx Development
Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00000000004bc3f9 in ngx_quic_input_handler (rev=0x2a119170) at src/event/quic/ngx_event_quic.c:497 497 src/event/quic/ngx_event_quic.c: No such file or directory. (gdb) bt #0 0x00000000004bc3f9 in ngx_quic_input_handler (rev=0x2a119170) at src/event/quic/ngx_event_quic.c:497 #1 0x00000000004b011e in ngx_epoll_pby gaoyan09 - Nginx Development
Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00000000004bc3f9 in ngx_quic_input_handler (rev=0x2a119170) at src/event/quic/ngx_event_quic.c:497 497 src/event/quic/ngx_event_quic.c: No such file or directory. (gdb) bt #0 0x00000000004bc3f9 in ngx_quic_input_handler (rev=0x2a119170) at src/event/quic/ngx_event_quic.c:497 #1 0x00000000004b011e in ngx_epoll_process_events (cycleby gaoyan09 - Nginx Development
ngx_quic_bpf_module_init: Should continue when ngx_quic_bpf_group_add_socket failed with adding one socket during reloading? Gao,Yan(ACG VCP) _______________________________________________ nginx-devel mailing list nginx-devel@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx-develby gaoyan09 - Nginx Development
Console client: ~/ngtcp2/examples/client 127.0.0.1 443 https://example.com:443/index.html --dcid=00000000000000166142cdef2ef2ca5e4be5 Bpf log: <...>-43083 [001] d.s1 94117.746924: bpf_trace_printk: nginx quic socket len 0x1d <...>-43083 [001] d.s1 94117.746936: bpf_trace_printk: nginx quic default route for key 0x16 <...>-43083 [000]by gaoyan09 - Nginx Development
I test nginx-quic with ngtcp2: ~/ngtcp2/examples/client 127.0.0.1 443 https://example.com:443/index.html --dcid=1a812bf8290b2bd5 And same dcid not always hash to same worker,as access.log: 127.0.0.1 - - [10/Mar/2021:14:04:00 +0800] "GET /index.html HTTP/3.0" 200 788 "-" "nghttp3/ngtcp2 client" "quic" "h3-29" 88 9149 127.0.0.1 - - [10/Mar/20by gaoyan09 - Nginx Development
Hello Vladimir Homutov, >I'm not sure I understand what you are trying to do. >Do you have some issues with existing quic implementations in nginx? I just want to know how nginx handle old and new quic connections when reload. Nginx keep quic connections open when reload to complete old connections. But new connections can still be handled by old workers. Can the listening fd detby gaoyan09 - Nginx Development
We cannot close quic fd to let old session complete when reload. Can detach ebpf reuseport group manually when ngx_close_listening_sockets? Linxu kernel commit e57892f50a07953053dcb1e0c9431197e569c258 Merge: bfdfa51702de 0ab5539f8584 Author: Alexei Starovoitov <ast@kernel.org> Date: Fri Jul 17 20:18:18 2020 -0700 Merge branch 'bpf-socket-lookup' Jakub Sitnicki says: BPF sk_by gaoyan09 - Nginx Development
ngx_quic_select_socket_by_dcid advance_data(sizeof(struct udphdr)); /* skip UDP header */ advance_data(1); /* QUIC flags */ if (data[0] & NGX_QUIC_PKT_LONG) { advance_data(4); /* skip QUIC version */ len = data[0]; /* read DCID length */ if (len < 8) { /* it's useless to search for key in such short DCID */ returnby gaoyan09 - Nginx Development
2021/03/03 19:34:49 176572#0: *19974 recvmsg: 111.206.214.32:59242 fd:12 n:1350 2021/03/03 19:34:49 176572#0: *19974 quic run 2021/03/03 19:34:49 176572#0: *19974 quic packet rx long flags:c8 version:ff00001d 2021/03/03 19:34:49 176572#0: *19974 quic packet rx init len:1332 2021/03/03 19:34:49 176572#0: *19974 quic packet rx dcid len:8 92545cbefeb0567c 2021/03/03 19:34:49 176572#0: *199by gaoyan09 - Nginx Development
How to handle udp/quic logical connection with reuseport when reload/restart. For tcp, old worker can only handle old established connection, and do not accept new connection ever. It is possible with BPF? Although it is not good solution PS, why do not add conn after accept when using epoll? if (ngx_add_conn && (ngx_event_flags & NGX_USE_EPOLL_EVENT) == 0) { if (ngx_add_conn(c)by gaoyan09 - Nginx Development
Hi, all Quic connection can be migrated by the ID. And nginx-quic load balancing by reuseport, which using a hash based on 4-tuple of the connection. How to migrate quic connection when reload/restart? We can change reuseport behavior by bpf which using a hash based on the quic ID, but it seems useless, because listen processes/pids doubles when nginx reload/restart, and hash result woulby gaoyan09 - Nginx Development
Njs js_content can only call js function for now.by gaoyan09 - Nginx Mailing List - English
Hello, Nginx 1.15 brought udp stream session, it seems that nginx has been ready for http3. Do nginx have any plan to support http3?by gaoyan09 - Nginx Mailing List - English
Do they have a develop plan?by gaoyan09 - Nginx Mailing List - English
figure it out, would jump one position for 3 bytes separatorby gaoyan09 - Nginx Mailing List - English
also ngx_http_upstream_response_time_variable and ngx_http_upstream_response_length_variable, + 2 for separator if (state.peer) { *p++ = ','; *p++ = ' '; } else { *p++ = ' '; *p++ = ':'; *p++ = ' '; if (++i == r->upstream_states->nelts) { break; } continuby gaoyan09 - Nginx Mailing List - English