On Fri, Mar 02, 2018 at 06:20:48PM +0000, Philip Martin wrote:
> Stefan Sperling <s...@elego.de> writes:
> 
> > Hmmm. Does this help? The authz_tests pass with it.
> >
> > Index: subversion/mod_authz_svn/mod_authz_svn.c
> > ===================================================================
> > --- subversion/mod_authz_svn/mod_authz_svn.c        (revision 1825730)
> > +++ subversion/mod_authz_svn/mod_authz_svn.c        (working copy)
> > @@ -395,10 +395,11 @@ resolve_repos_relative_url(const char **path, cons
> >  }
> >  
> >  /*
> > - * Get the, possibly cached, svn_authz_t for this request.
> > + * Get the svn_authz_t for this request.
> >   */
> >  static svn_authz_t *
> >  get_access_conf(request_rec *r, authz_svn_config_rec *conf,
> > +                apr_pool_t *result_pool,
> >                  apr_pool_t *scratch_pool)
> >  {
> >    const char *access_file;
> > @@ -467,7 +468,7 @@ get_access_conf(request_rec *r, authz_svn_config_r
> >    svn_err = svn_repos_authz_read3(&access_conf,
> >                                    access_file, groups_file,
> >                                    TRUE, NULL,
> > -                                  r->connection->pool, scratch_pool);
> > +                                  result_pool, scratch_pool);
> >  
> >    if (svn_err)
> >      {
> > @@ -687,7 +688,7 @@ req_check_access(request_rec *r,
> >      }
> >  
> >    /* Retrieve/cache authorization file */
> > -  access_conf = get_access_conf(r,conf, r->pool);
> > +  access_conf = get_access_conf(r,conf, r->pool, r->pool);
> >    if (access_conf == NULL)
> >      return DECLINED;
> >  
> > @@ -804,7 +805,7 @@ subreq_bypass2(request_rec *r,
> >      }
> >  
> >    /* Retrieve authorization file */
> > -  access_conf = get_access_conf(r, conf, scratch_pool);
> > +  access_conf = get_access_conf(r, conf, scratch_pool, scratch_pool);
> >    if (access_conf == NULL)
> >      return HTTP_FORBIDDEN;
> 
> Yes, that solves the memory use problem.

Nice, I'll commit it then. This might not be a final fix but at least
it's a step forward.

> There is still a time penalty:
> 
> Your patch:
> 
>  $ time svn log -q http://localhost:8888/repo/asf/subversion > /dev/null
> 
>  real 0m7.695s
>  user 0m0.429s
>  sys  0m0.283s
> 
>  apache httpd cpu: 7.30
> 
> Revert r1779188,1778923
> 
>  $ time svn log -q http://localhost:8888/repo/asf/subversion > /dev/null
> 
>  real 0m5.102s
>  user 0m0.460s
>  sys  0m0.250s
> 
>  apache httpd cpu: 5.10

If I understand it correctly, that's because 1778923 disabled caching
on a per-connection basis? I don't really understand the log message.

Reply via email to