Re: buckets across threads - question

2015-03-31 Thread Jim Jagielski
Stefan,

One thing that was v useful about mod_spdy was the insight on
what changes/re-factoring might be done w/i the core httpd code
itself to make things easier, such as the idea of a slave
conn_rec (or a virtual connection). I started trying to fold
some of that into trunk, and so any insight you may have from
your mod_h2 work would be MOST APPRECIATED. I think we can
abstract out enough that we would not need a wholesale re-write
of large chunks of the core.

I also think that Serf and even APR would also benefit from
that as well.


motorz and 2.4.13

2015-03-31 Thread Jim Jagielski
Apologies for not hacking on motorz lately... will ramp up :)

BTW: Would it make sense to consider a release of 2.4.13 in April
to coincide w/ ApacheCon?


Re: buckets across threads - question

2015-03-31 Thread Stefan Eissing
Jim,

I am very happy to hear that and would like to compile some feedback/ideas in 
the next days. I also want to get some better performance comparison numbers 
for TLS+http/1 vs. TLS+http/2 in the infamous http2 gopher tiles example, not 
focussing on page load times but requests/sec.

The module itself has become more and more apr-ified, but there are still many 
areas to improve and some multi-thread walls I ran into. And I agree that it 
rather seems core needs some nudges here and there than a rebuilding. But I am 
far from claiming any expertise in that.

Cheers,

  Stefan

PS. As a small quid-pro-quo and because you were asking about a possibly 
2.4.13: there has so far not been a volunteer to integrate the ALPN patch I 
adapted from mod_spdy. It would be great if someone could take a look at it. It 
is the biggest obstacle so far for experimenters (early sufferers) of mod_h2 
and it would be very nice to have it out of the way. 



 Am 31.03.2015 um 17:20 schrieb Jim Jagielski j...@jagunet.com:
 
 Stefan,
 
 One thing that was v useful about mod_spdy was the insight on
 what changes/re-factoring might be done w/i the core httpd code
 itself to make things easier, such as the idea of a slave
 conn_rec (or a virtual connection). I started trying to fold
 some of that into trunk, and so any insight you may have from
 your mod_h2 work would be MOST APPRECIATED. I think we can
 abstract out enough that we would not need a wholesale re-write
 of large chunks of the core.
 
 I also think that Serf and even APR would also benefit from
 that as well.

green/bytes GmbH
Hafenweg 16, 48155 Münster, Germany
Phone: +49 251 2807760. Amtsgericht Münster: HRB5782





Re: buckets across threads - question

2015-03-31 Thread Jim Jagielski
 
 PS. As a small quid-pro-quo and because you were asking about a possibly 
 2.4.13: there has so far not been a volunteer to integrate the ALPN patch I 
 adapted from mod_spdy. It would be great if someone could take a look at it. 
 It is the biggest obstacle so far for experimenters (early sufferers) of 
 mod_h2 and it would be very nice to have it out of the way. 
 

I'll take a look. It's not currently in trunk, is that right?

Re: buckets across threads - question

2015-03-31 Thread Graham Leggett
On 31 Mar 2015, at 6:23 PM, Jim Jagielski j...@jagunet.com wrote:

 Another thing is that I'd like to see how mod_h2 and the motorz
 MPM would work together. 

I have been completely snowed under, but I would be also interested in how we 
could make the filter stacks support async behaviour too.

I think I cracked the basic principle with the last patch I sent, but wanted to 
extend it so that request filters also worked, instead of just connection 
filters. I have some ideas on how to do that, just need some more time to work 
on it.

Regards,
Graham
—



Re: buckets across threads - question

2015-03-31 Thread Jim Jagielski

 On Mar 31, 2015, at 11:34 AM, Stefan Eissing stefan.eiss...@greenbytes.de 
 wrote:
 
 Jim,
 
 I am very happy to hear that and would like to compile some feedback/ideas in 
 the next days. I also want to get some better performance comparison numbers 
 for TLS+http/1 vs. TLS+http/2 in the infamous http2 gopher tiles example, not 
 focussing on page load times but requests/sec.
 
 The module itself has become more and more apr-ified, but there are still 
 many areas to improve and some multi-thread walls I ran into. And I agree 
 that it rather seems core needs some nudges here and there than a rebuilding. 
 But I am far from claiming any expertise in that.
 

Another thing is that I'd like to see how mod_h2 and the motorz
MPM would work together. 



Re: svn commit: r1670397 - in /httpd/httpd/trunk/modules/ssl: mod_ssl.c mod_ssl.h ssl_engine_config.c ssl_engine_io.c ssl_private.h

2015-03-31 Thread Jim Jagielski
Hmmm.. missed a patch.

r1670434
 On Mar 31, 2015, at 2:28 PM, Jim Jagielski j...@jagunet.com wrote:
 
 Hmmm... let me double check.
 
 On Mar 31, 2015, at 2:22 PM, Ruediger Pluem rpl...@apache.org wrote:
 
 
 
 On 03/31/2015 08:08 PM, Jim Jagielski wrote:
 They are used by mod_spdy and/or mod_h2..., iirc
 
 They use private structures of mod_ssl directly? That does not sound like a 
 good idea.
 
 Regards
 
 Rüdiger
 
 
 On Mar 31, 2015, at 1:57 PM, Ruediger Pluem rpl...@apache.org wrote:
 
 
 
 On 03/31/2015 07:12 PM, j...@apache.org wrote:
 Author: jim
 Date: Tue Mar 31 17:12:51 2015
 New Revision: 1670397
 
 URL: http://svn.apache.org/r1670397
 Log:
 ALPN support, based on mod_spdy/mod_h2 patch set
 
 Modified:
  httpd/httpd/trunk/modules/ssl/mod_ssl.c
  httpd/httpd/trunk/modules/ssl/mod_ssl.h
  httpd/httpd/trunk/modules/ssl/ssl_engine_config.c
  httpd/httpd/trunk/modules/ssl/ssl_engine_io.c
  httpd/httpd/trunk/modules/ssl/ssl_private.h
 
 
 I don't know if I miss the obvious, but where do we use
 
 ssl_alpn_pref
 alpn_proposefns
 
 ?
 
 I can only see that we set it, but I fail to see where it is used.
 
 Regards
 
 Rüdiger
 
 
 



Re: buckets across threads - question

2015-03-31 Thread Stefan Eissing
Thanks, Jim!



 Am 31.03.2015 um 19:29 schrieb Jim Jagielski j...@jagunet.com:
 
 What I did is used the alpn patch as a guide and updated trunk
 to add the functionality:
 
http://svn.apache.org/r1670397
 
 I'll give it a few days to work out and then propose for a
 2.4 backport.
 
 On Mar 31, 2015, at 1:13 PM, Stefan Eissing stefan.eiss...@greenbytes.de 
 wrote:
 
 I think the old NPN patch is in trunk. The ALPN not AFAIK. I undertstand 
 there is a trunk first policy, but it'd be good to get it at least going 
 there... thanks. 
 
 Stefan
 
 
 
 Am 31.03.2015 um 18:22 schrieb Jim Jagielski j...@jagunet.com:
 
 
 PS. As a small quid-pro-quo and because you were asking about a possibly 
 2.4.13: there has so far not been a volunteer to integrate the ALPN patch 
 I adapted from mod_spdy. It would be great if someone could take a look at 
 it. It is the biggest obstacle so far for experimenters (early sufferers) 
 of mod_h2 and it would be very nice to have it out of the way.
 
 I'll take a look. It's not currently in trunk, is that right?
 


Re: svn commit: r1670397 - in /httpd/httpd/trunk/modules/ssl: mod_ssl.c mod_ssl.h ssl_engine_config.c ssl_engine_io.c ssl_private.h

2015-03-31 Thread Jim Jagielski
They are used by mod_spdy and/or mod_h2..., iirc

 On Mar 31, 2015, at 1:57 PM, Ruediger Pluem rpl...@apache.org wrote:
 
 
 
 On 03/31/2015 07:12 PM, j...@apache.org wrote:
 Author: jim
 Date: Tue Mar 31 17:12:51 2015
 New Revision: 1670397
 
 URL: http://svn.apache.org/r1670397
 Log:
 ALPN support, based on mod_spdy/mod_h2 patch set
 
 Modified:
httpd/httpd/trunk/modules/ssl/mod_ssl.c
httpd/httpd/trunk/modules/ssl/mod_ssl.h
httpd/httpd/trunk/modules/ssl/ssl_engine_config.c
httpd/httpd/trunk/modules/ssl/ssl_engine_io.c
httpd/httpd/trunk/modules/ssl/ssl_private.h
 
 
 I don't know if I miss the obvious, but where do we use
 
 ssl_alpn_pref
 alpn_proposefns
 
 ?
 
 I can only see that we set it, but I fail to see where it is used.
 
 Regards
 
 Rüdiger



Re: svn commit: r1670397 - in /httpd/httpd/trunk/modules/ssl: mod_ssl.c mod_ssl.h ssl_engine_config.c ssl_engine_io.c ssl_private.h

2015-03-31 Thread Ruediger Pluem


On 03/31/2015 07:12 PM, j...@apache.org wrote:
 Author: jim
 Date: Tue Mar 31 17:12:51 2015
 New Revision: 1670397
 
 URL: http://svn.apache.org/r1670397
 Log:
 ALPN support, based on mod_spdy/mod_h2 patch set
 
 Modified:
 httpd/httpd/trunk/modules/ssl/mod_ssl.c
 httpd/httpd/trunk/modules/ssl/mod_ssl.h
 httpd/httpd/trunk/modules/ssl/ssl_engine_config.c
 httpd/httpd/trunk/modules/ssl/ssl_engine_io.c
 httpd/httpd/trunk/modules/ssl/ssl_private.h


I don't know if I miss the obvious, but where do we use

ssl_alpn_pref
alpn_proposefns

?

I can only see that we set it, but I fail to see where it is used.

Regards

Rüdiger




Re: svn commit: r1670397 - in /httpd/httpd/trunk/modules/ssl: mod_ssl.c mod_ssl.h ssl_engine_config.c ssl_engine_io.c ssl_private.h

2015-03-31 Thread Ruediger Pluem


On 03/31/2015 08:08 PM, Jim Jagielski wrote:
 They are used by mod_spdy and/or mod_h2..., iirc

They use private structures of mod_ssl directly? That does not sound like a 
good idea.

Regards

Rüdiger

 
 On Mar 31, 2015, at 1:57 PM, Ruediger Pluem rpl...@apache.org wrote:



 On 03/31/2015 07:12 PM, j...@apache.org wrote:
 Author: jim
 Date: Tue Mar 31 17:12:51 2015
 New Revision: 1670397

 URL: http://svn.apache.org/r1670397
 Log:
 ALPN support, based on mod_spdy/mod_h2 patch set

 Modified:
httpd/httpd/trunk/modules/ssl/mod_ssl.c
httpd/httpd/trunk/modules/ssl/mod_ssl.h
httpd/httpd/trunk/modules/ssl/ssl_engine_config.c
httpd/httpd/trunk/modules/ssl/ssl_engine_io.c
httpd/httpd/trunk/modules/ssl/ssl_private.h


 I don't know if I miss the obvious, but where do we use

 ssl_alpn_pref
 alpn_proposefns

 ?

 I can only see that we set it, but I fail to see where it is used.

 Regards

 Rüdiger
 
 


Re: svn commit: r1670397 - in /httpd/httpd/trunk/modules/ssl: mod_ssl.c mod_ssl.h ssl_engine_config.c ssl_engine_io.c ssl_private.h

2015-03-31 Thread Jim Jagielski
Hmmm... let me double check.

 On Mar 31, 2015, at 2:22 PM, Ruediger Pluem rpl...@apache.org wrote:
 
 
 
 On 03/31/2015 08:08 PM, Jim Jagielski wrote:
 They are used by mod_spdy and/or mod_h2..., iirc
 
 They use private structures of mod_ssl directly? That does not sound like a 
 good idea.
 
 Regards
 
 Rüdiger
 
 
 On Mar 31, 2015, at 1:57 PM, Ruediger Pluem rpl...@apache.org wrote:
 
 
 
 On 03/31/2015 07:12 PM, j...@apache.org wrote:
 Author: jim
 Date: Tue Mar 31 17:12:51 2015
 New Revision: 1670397
 
 URL: http://svn.apache.org/r1670397
 Log:
 ALPN support, based on mod_spdy/mod_h2 patch set
 
 Modified:
   httpd/httpd/trunk/modules/ssl/mod_ssl.c
   httpd/httpd/trunk/modules/ssl/mod_ssl.h
   httpd/httpd/trunk/modules/ssl/ssl_engine_config.c
   httpd/httpd/trunk/modules/ssl/ssl_engine_io.c
   httpd/httpd/trunk/modules/ssl/ssl_private.h
 
 
 I don't know if I miss the obvious, but where do we use
 
 ssl_alpn_pref
 alpn_proposefns
 
 ?
 
 I can only see that we set it, but I fail to see where it is used.
 
 Regards
 
 Rüdiger
 
 



Re: buckets across threads - question

2015-03-31 Thread Stefan Eissing
I think the old NPN patch is in trunk. The ALPN not AFAIK. I undertstand there 
is a trunk first policy, but it'd be good to get it at least going there... 
thanks. 

Stefan



Am 31.03.2015 um 18:22 schrieb Jim Jagielski j...@jagunet.com:

 
 PS. As a small quid-pro-quo and because you were asking about a possibly 
 2.4.13: there has so far not been a volunteer to integrate the ALPN patch I 
 adapted from mod_spdy. It would be great if someone could take a look at it. 
 It is the biggest obstacle so far for experimenters (early sufferers) of 
 mod_h2 and it would be very nice to have it out of the way.
 
 I'll take a look. It's not currently in trunk, is that right?


Re: buckets across threads - question

2015-03-31 Thread Jim Jagielski
What I did is used the alpn patch as a guide and updated trunk
to add the functionality:

http://svn.apache.org/r1670397

I'll give it a few days to work out and then propose for a
2.4 backport.

 On Mar 31, 2015, at 1:13 PM, Stefan Eissing stefan.eiss...@greenbytes.de 
 wrote:
 
 I think the old NPN patch is in trunk. The ALPN not AFAIK. I undertstand 
 there is a trunk first policy, but it'd be good to get it at least going 
 there... thanks. 
 
 Stefan
 
 
 
 Am 31.03.2015 um 18:22 schrieb Jim Jagielski j...@jagunet.com:
 
 
 PS. As a small quid-pro-quo and because you were asking about a possibly 
 2.4.13: there has so far not been a volunteer to integrate the ALPN patch I 
 adapted from mod_spdy. It would be great if someone could take a look at 
 it. It is the biggest obstacle so far for experimenters (early sufferers) 
 of mod_h2 and it would be very nice to have it out of the way.
 
 I'll take a look. It's not currently in trunk, is that right?



ap_directory_walk() marking non existent files as APR_DIR

2015-03-31 Thread Graham Leggett
Hi all,

I am picking apart some strange behaviour where use of the Alias directive 
inside a Location along with a file path that doesn’t exist 
(/_thumbs/i/dont/exist.jpg) triggers a loop of redirects to 
…/index.html/index.html/index.html/…

The loop of redirects is caused by mod_dir being told that the non existent 
file is actually a directory (r-finfo.filetype == APR_DIR) instead of a 
nonexistent file (r-finfo.filetype == APR_NOFILE). Working backwards to find 
where a non existent file is being mislabelled as a directory, it leads me to 
ap_directory_walk(), specifically these lines:

do {
[snip]

if (*seg_name == '/')
++seg_name;

/* If nothing remained but a '/' string, we are finished
 * XXX: NO WE ARE NOT!!!  Now process this puppy!!! */
if (!*seg_name) {
break;
}

[snip]
} while (thisinfo.filetype == APR_DIR);

What is happening is that we are reaching the break, which aborts the loop but 
leaves the value thisinfo.filetype == APR_DIR, thus triggering the downstream 
mod_dir mayhem.

Further down in the loop, we have some code that looks like this that 
explicitly sets the file to APR_NOFILE before breaking:

if (APR_STATUS_IS_ENOENT(rv)) {
/* Nothing?  That could be nice.  But our directory
 * walk is done.
 */
thisinfo.filetype = APR_NOFILE;
break;
}

In theory following the pattern above, we might change the code above to:

if (!*seg_name) {
+thisinfo.filetype = APR_NOFILE;
break;
}

However I don’t fully understand what the comment XXX: NO WE ARE NOT!!!  Now 
process this puppy!!!” actually means.

Can anyone confirm?

Regards,
Graham
—