Welcome! Log In Create A New Profile

Advanced

Re: Fwd: 1.17.5 regression

Maxim Dounin
December 23, 2019 08:36AM
Hello!

On Thu, Dec 19, 2019 at 09:01:10AM -0800, Maksim Yevmenkin wrote:

> hello,
>
> [...]
>
> > > > > Thanks for the report, it indeed looks like a bug introduced
> > > > > in 9d2ad2fb4423.
> > > > >
> > > > > The problem is that c->read->handler is overwritted when switching
> > > > > to the next pipelined request, ngx_ssl_next_read_handler() is not
> > > > > called, and c->read->ready remains not set. I'll take a look how
> > > > > to fix it properly.
> > > >
> > > > Thanks for having a look.
> > > >
> > > > Please keep me updated when the fix gets applied.
>
> [...]
>
> > Not really. I meant the workaround in question won't work on
> > systems with kqueue. The problem itself is present with kqueue as
> > well.
>
> i suspect there is another instance of the same problem. it manifests
> itself when nginx is reading reueqst over https, i.e. ngx_ssl_recv()
> is interacting with ngx_http_process_request_line() and friends.
> rev->handler gets overwritten, and, ngx_ssl_next_read_handler() never
> gets called.

Yes, any change of connection read handlers can be problematic
here.

> i wonder if SSL_pending(3) can be of value here, i.e.

No, SSL_pending() only returns pending bytes from the SSL record
currently being parsed, and there can be additional records in SSL
library buffers even if SSL_pending() returns 0. Hence it is
useless.

The only working alternative solution I'm aware of is to use
BIO_set_callback() and count actual bytes read from the socket.
Unfortunately, BoringSSL removed BIO_set_callback(), making this
solution non-portable.

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Fwd: 1.17.5 regression

Gábor Boskovits 180 December 16, 2019 09:04AM

Re: Fwd: 1.17.5 regression

Maxim Dounin 49 December 18, 2019 12:26PM

Re: Fwd: 1.17.5 regression

Gábor Boskovits 49 December 18, 2019 12:36PM

Re: Fwd: 1.17.5 regression

ru@nginx.com 50 December 19, 2019 03:46AM

Re: Fwd: 1.17.5 regression

Gábor Boskovits 44 December 19, 2019 04:34AM

Re: Fwd: 1.17.5 regression

Maxim Dounin 46 December 19, 2019 07:46AM

Re: Fwd: 1.17.5 regression

Gábor Boskovits 50 December 19, 2019 09:02AM

Re: Fwd: 1.17.5 regression

Maksim Yevmenkin 50 December 19, 2019 12:02PM

Re: Fwd: 1.17.5 regression

Maxim Dounin 43 December 23, 2019 08:36AM

Re: Fwd: 1.17.5 regression

Maxim Dounin 49 December 23, 2019 02:30PM

Re: Fwd: 1.17.5 regression

Gábor Boskovits 44 December 24, 2019 10:46AM

Re: Fwd: 1.17.5 regression

Maxim Dounin 48 December 24, 2019 11:46AM

Re: Fwd: 1.17.5 regression

Gábor Boskovits 42 December 24, 2019 11:56AM

Re: Fwd: 1.17.5 regression

Maksim Yevmenkin 46 December 24, 2019 12:02PM

Re: Fwd: 1.17.5 regression

Maxim Dounin 48 December 24, 2019 12:28PM

Re: 1.17.5 regression

Sergey Kandaurov 79 December 25, 2019 05:16AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 71
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready