echo-nginx-module and HTTP2

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

echo-nginx-module and HTTP2

A. Schulze

Hello,

The echo module (https://github.com/openresty/echo-nginx-module / v0.58)
produce segfaults while accessing the following location:

    # echo back the client request
    location /echoback {
      echo_duplicate 1 $echo_client_request_headers;
      echo "\r";

      echo_read_request_body;

      echo_request_body;
    }

that happen only if http2 is enabled (usually at https servers).

...
worker process 20658 exited on signal 11

Andreas

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: echo-nginx-module and HTTP2

Yichun Zhang (agentzh)
Hello!

On Thu, Jan 28, 2016 at 1:45 AM, A. Schulze wrote:

> The echo module (https://github.com/openresty/echo-nginx-module / v0.58)
> produce segfaults while accessing the following location:
>
>    # echo back the client request
>    location /echoback {
>      echo_duplicate 1 $echo_client_request_headers;
>      echo "\r";
>
>      echo_read_request_body;
>
>      echo_request_body;
>    }
>
> that happen only if http2 is enabled (usually at https servers).

Yeah, the ngx_echo module does not support the HTTP/2 mode yet (as the
maintainer, I've never tested it anyway). Patches welcome and
volunteers welcome :)

Best regards,
-agentzh

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: echo-nginx-module and HTTP2

A. Schulze

Yichun Zhang (agentzh):

> Yeah, the ngx_echo module does not support the HTTP/2 mode yet (as the
> maintainer, I've never tested it anyway). Patches welcome and
> volunteers welcome :)

thanks,

I could not support with patches but would do some beta testing.

Just to have ask:
disabling http2 for a location is not possible, isn't it?

Andreas


_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: echo-nginx-module and HTTP2

Yichun Zhang (agentzh)
Hello!

On Thu, Jan 28, 2016 at 11:19 PM, A. Schulze wrote:
> I could not support with patches but would do some beta testing.
>

Thanks.

> Just to have ask:
> disabling http2 for a location is not possible, isn't it?
>

Nope.

Regards,
-agentzh

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

echo-nginx-module and HTTP2

Kurt Cancemi
Hello,

I was doing some debugging and though I haven't found a fix. The problem is in the ngx_http_echo_client_request_headers_variable() function c->buffer is NULL when http v2 is used for some reason (internal to nginx).

--
Kurt Cancemi
https://www.x64architecture.com


--
--
Kurt Cancemi
https://www.x64architecture.com

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: echo-nginx-module and HTTP2

Yichun Zhang (agentzh)
Hello!

On Fri, Jan 29, 2016 at 8:40 PM, Kurt Cancemi wrote:
> I was doing some debugging and though I haven't found a fix. The problem is
> in the ngx_http_echo_client_request_headers_variable() function c->buffer is
> NULL when http v2 is used for some reason (internal to nginx).
>

This is expected since the HTTP/2 mode of NGINX reads the request
header into a different place. We should branch the code accordingly.

Regards,
-agentzh

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

echo-nginx-module and 1.11.12 (was: echo-nginx-module and HTTP2)

A. Schulze


Am 01.02.2016 um 23:53 schrieb Yichun Zhang (agentzh):

> Hello!
>
> On Fri, Jan 29, 2016 at 8:40 PM, Kurt Cancemi wrote:
>> I was doing some debugging and though I haven't found a fix. The problem is
>> in the ngx_http_echo_client_request_headers_variable() function c->buffer is
>> NULL when http v2 is used for some reason (internal to nginx).
>>
>
> This is expected since the HTTP/2 mode of NGINX reads the request
> header into a different place. We should branch the code accordingly.
>
> Regards,
> -agentzh

Hello,

unfortunately the module fail to compile on 1.11.12
while compiling was successfully up to 1.11.10

cc -c -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2  -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include -I objs -I src/http -I src/http/modules -I src/http/v2 -I src/stream \
        -o objs/addon/src/ngx_http_echo_request_info.o \
        ./echo-nginx-module-0.60//src/ngx_http_echo_request_info.c
./echo-nginx-module-0.60//src/ngx_http_echo_request_info.c: In function 'ngx_http_echo_client_request_headers_variable':
./echo-nginx-module-0.60//src/ngx_http_echo_request_info.c:219:15: error: incompatible types when assigning to type 'ngx_buf_t * {aka struct ngx_buf_s *}' from type 'ngx_chain_t {aka struct ngx_chain_s}'
             b = hc->busy[i];
               ^
./echo-nginx-module-0.60//src/ngx_http_echo_request_info.c:284:15: error: incompatible types when assigning to type 'ngx_buf_t * {aka struct ngx_buf_s *}' from type 'ngx_chain_t {aka struct ngx_chain_s}'
             b = hc->busy[i];
               ^
objs/Makefile:1523: recipe for target 'objs/addon/src/ngx_http_echo_request_info.o' failed

I guess, something changed from 1.11.10 to 1.11.12 ...

Andreas
_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: echo-nginx-module and 1.11.12

Lucas Rolff
When the pull request here gets merged into master, then it should work on 1.11.11 (and 1.11.12):

https://github.com/openresty/echo-nginx-module/pull/65

A. Schulze wrote:
Am 01.02.2016 um 23:53 schrieb Yichun Zhang (agentzh):
Hello!

On Fri, Jan 29, 2016 at 8:40 PM, Kurt Cancemi wrote:
I was doing some debugging and though I haven't found a fix. The problem is
in the ngx_http_echo_client_request_headers_variable() function c->buffer is
NULL when http v2 is used for some reason (internal to nginx).

This is expected since the HTTP/2 mode of NGINX reads the request
header into a different place. We should branch the code accordingly.

Regards,
-agentzh

Hello,

unfortunately the module fail to compile on 1.11.12
while compiling was successfully up to 1.11.10

cc -c -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2  -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include -I objs -I src/http -I src/http/modules -I src/http/v2 -I src/stream \
        -o objs/addon/src/ngx_http_echo_request_info.o \
        ./echo-nginx-module-0.60//src/ngx_http_echo_request_info.c
./echo-nginx-module-0.60//src/ngx_http_echo_request_info.c: In function 'ngx_http_echo_client_request_headers_variable':
./echo-nginx-module-0.60//src/ngx_http_echo_request_info.c:219:15: error: incompatible types when assigning to type 'ngx_buf_t * {aka struct ngx_buf_s *}' from type 'ngx_chain_t {aka struct ngx_chain_s}'
             b = hc->busy[i];
               ^
./echo-nginx-module-0.60//src/ngx_http_echo_request_info.c:284:15: error: incompatible types when assigning to type 'ngx_buf_t * {aka struct ngx_buf_s *}' from type 'ngx_chain_t {aka struct ngx_chain_s}'
             b = hc->busy[i];
               ^
objs/Makefile:1523: recipe for target 'objs/addon/src/ngx_http_echo_request_info.o' failed

I guess, something changed from 1.11.10 to 1.11.12 ...

Andreas
_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx


_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Loading...