On 2021-11-03 17:14+0100, Stefan Sperling wrote: > On Wed, Nov 03, 2021 at 04:47:39PM +0100, Thomas Weißschuh wrote: > > The svn_atomic__init_once() inside svn_repos_authz_initialize() seems to > > work > > correctly. synchronized_authz_initialize() is only executed once. > > > > I am arguing that it should *not* be executed only once because the pools > > that > > it gets called with the first time will be invalid when it is called the > > second > > time. So it should rebuild authz_pool with the new parent pool. > > > > Replacing the call through svn_atomic__init_once() with an unconditional > > call > > makes the issue go away. > > I see. So for some reason, under httpd's control, the SVN module's > post_config hook is invoked several times, each time with a different > pool? Do we know why this is happening? > > If this is valid httpd behaviour then the code in authz.c is making > an invalid assumption. And there could similar problems elsewhere, > in svn_fs_initialize() for example.
Looking at server/main.c from httpd: ( https://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/server/main.c?view=markup&pathrev=1874286 ) svn_repos_authz_initialize() is called from the post_config hook (the function called "init" in mod_dav_svn.c) of mod_dav_svn using the pool passed as the first argument to the hook. That hook is invoked from httpds src/main.c in lines 740 and 807, both times with the same pool "pconf" as the first argument. But in line 750, between those hooks, the function reset_process_pconf() is invoked. This clears the pconf pool of the process which is also the same pool that is passed to the hooks and where mod_dav_svn has instantiated its subpools from. (See line 490) I'll open a ticket for that tomorrow.