Bug in mod_proxvy_fdpass?

2015-11-27 Thread Christophe JAILLET

Hi,

smatch compains that:
/modules/proxy/mod_proxy_fdpass.c:152 proxy_fdpass_handler() warn: 
this array is probably non-NULL. 'worker->s->flusher'


I think that:
const char *flush_method = worker->s->flusher ? 
worker->s->flusher : "flush";

should be turned into:
const char *flush_method = *worker->s->flusher ? 
worker->s->flusher : "flush";



'flusher' is defined as follow:
/* Runtime worker status informations. Shared in scoreboard */
typedef struct {
[...]
char  flusher[PROXY_WORKER_MAX_SCHEME_SIZE];  /* flush 
provider used by mod_proxy_fdpass */

[...]
} proxy_worker_shared;

So, it can not be NULL.
I think that the logic is "If the flusher name is defined, use it, 
otherwise use the default"

Correct?



BTW, the 'flusher' parameter (mod_proxy.c:269) seems to be 
un-documented. 
(http://httpd.apache.org/docs/trunk/mod/mod_proxy.html#proxypass)



What puzzles me is that, with the current code, if the "flusher" 
parameter is not defined, then the code should always trigger an 01153 
error.
And if this parameter is not documented, how one could know that it has 
to be set?


Either no-one ever used this, either the users know that an undocumented 
parameter has to be used. (either I missed something :) )

Doc and code should be fixed.


CJ




RE: No H2 Window updates!

2015-11-27 Thread Bert Huijben
Well… it is not a regression, so can it be a show stopper? ☺…
But I would like to see this fixed.

I have no idea how hard it would be to fix this though. It could be as simple 
as removing that config line (which was probably added somewhere early on if I 
look at that comment). But windowing correctly for optimal performance isn’t 
easy.

Luckily most of the windowing works in the other direction.

Bert



From: Jim Jagielski
Sent: vrijdag 27 november 2015 17:55
To: dev@httpd.apache.org
Subject: Re: No H2 Window updates!


Hmmm... this seems to me enough to warrant a hold on my T
until we dig into this deeper.




Re: No H2 Window updates!

2015-11-27 Thread Jim Jagielski
Hmmm... this seems to me enough to warrant a hold on my T
until we dig into this deeper.


No H2 Window updates!

2015-11-27 Thread Bert Huijben
Hi,

 

I finally took the time to diagnose that segfault I had, and I think it
points to a serious bug in httpd.

 

To summarize this: I don't receive window updates.

 

In this specific test we set a very huge amount of small requests (bodies of
95 and 113 bytes), until we get out of the 65535 (or 65536) bytes of window
space I get from httpd at the connection level.

(Each stream doesn't get near its limit. I can try if I can receive window
updates there. but currently I can't reproduce ever receiving a window
update)

 

 

Originally this caused a segfault in my code, but I fixed that one. But now
I'm just stuck waiting to receive a window update from httpd.

 

 

My last testing was against 2.4.x (to get the 2.4.18 goodness)

 

Bert



RE: No H2 Window updates!

2015-11-27 Thread Bert Huijben
> -Original Message-
> From: Bert Huijben [mailto:b...@qqmail.nl]
> Sent: vrijdag 27 november 2015 13:56
> To: b...@qqmail.nl
> Subject:
> 
>     Hi,
> 
> I finally took the time to diagnose that segfault I had, and I think it
> points to a serious bug in httpd.
> 
> To summarize this: I don’t receive window updates.
> 
> In this specific test we set a very huge amount of small requests (bodies
of
> 95 and 113 bytes), until we get out of the 65535 (or 65536) bytes of
window
> space I get from httpd at the connection level.
> (Each stream doesn’t get near its limit. I can try if I can receive window
> updates there… but currently I can’t reproduce ever receiving a window
> update)
> 
> 
> Originally this caused a segfault in my code, but I fixed that one. But
now
> I’m just stuck waiting to receive a window update from httpd…
> 
> 
> My last testing was against 2.4.x (to get the 2.4.18 goodness)

And I think the combination of:

=== h2_session.c around line 707 ===
/* We need to handle window updates ourself, otherwise we
 * get flooded by nghttp2. */
nghttp2_option_set_no_auto_window_update(options, 1);


And not a single call to nghttp2_submit_window_update() to find, explains
the situation.

I haven't tried what happens when I disable this auto_window call... but
sending window updates is really required by the H2 specs.



And I totally understand that this wasn't high priority... I worked around
not sending updates in my implementation until yesterday :-)


Bert 



Re: No H2 Window updates!

2015-11-27 Thread Jan Ehrhardt
Bert Huijben in gmane.comp.apache.devel (Fri, 27 Nov 2015 20:04:14 +0100):
>Well… it is not a regression, so can it be a show stopper? ?…
>But I would like to see this fixed.

Curious: are you still testing this on Windows? If so, I guess you
compiled your own httpd. I tried to do the same a couple of days ago, but
ran into problems with Drupal7: the admin menu sometimes showed and
sometimes did not show at all. I could not lay my finger on what went
wrong.

Because I did not have the problems with Apachelounge's 2.4.18-dev at
https://www.apachelounge.com/viewtopic.php?t=6842 I checked out an earlier
revision of the alpha branch:
| svn co -r 1715218 
http://svn.apache.org/repos/asf/httpd/httpd/branches/2.4-http2-alpha

That revision compiled into a httpd with no problems. I am waiting now for
Stefan Eissing to finish his work on mod_http2.

BTW: did you switch to nghttp2 1.5.0 already?
-- 
Jan



Re: No H2 Window updates!

2015-11-27 Thread Jan Ehrhardt
Jan Ehrhardt in gmane.comp.apache.devel (Fri, 27 Nov 2015 22:34:53 +0100):
>Bert Huijben in gmane.comp.apache.devel (Fri, 27 Nov 2015 20:04:14 +0100):
>>Well… it is not a regression, so can it be a show stopper? ?…
>>But I would like to see this fixed.
>
>Curious: are you still testing this on Windows? If so, I guess you
>compiled your own httpd. I tried to do the same a couple of days ago, but
>ran into problems with Drupal7: the admin menu sometimes showed and
>sometimes did not show at all. I could not lay my finger on what went
>wrong.
>
>Because I did not have the problems with Apachelounge's 2.4.18-dev at
>https://www.apachelounge.com/viewtopic.php?t=6842 I checked out an earlier
>revision of the alpha branch:
>| svn co -r 1715218 
>http://svn.apache.org/repos/asf/httpd/httpd/branches/2.4-http2-alpha
>
>That revision compiled into a httpd with no problems. I am waiting now for
>Stefan Eissing to finish his work on mod_http2.

Probably Stefan Eissing already completed his work for 2.4.18. I checked
out the current 2.4.x branch with mod_http2 1.8.0 from
http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/http2/

I rebuilt the complete branch with VC14 x86 and encountered the same
problems with Drupal7. On my dev-server with Win 2008 R2 I now have 3
mod_http2's:

#LoadModule http2_module modules/mod_http2.so
LoadModule http2_module modules/mod_http2-r1715218.so
#LoadModule http2_module modules/mod_http2_al.so 

The first one is mod_http 1.8.0, the second and the third are 1.5.0 (my
build and Apachelounge's). PHP is 5.6.16 loaded with mod_fcgid 2.3.9,
nghttp2 is version 1.4.0 (but I also tested with 1.5.0).
Only mod_http2 1.8.0 sometimes just does not show the admin menu in
Drupal7, the other 2 work fine.

The same difference exists for VC9 httpd with nghttp2 1.5.0 compiled
statically into mod_http2.so. mod_http2 1.5.0 runs without problems,
mod_http2 1.8.0 sometimes just goes not show the Drupal 7 admin menu.

@Steffen Land of Apachelounge: could you build mod_http2 1.8.0 before
2.4.18 before it goes into T?
-- 
Jan