On Thu, Aug 21, 2025 at 2:13 PM Yann Ylavic <ylavic....@gmail.com> wrote: > > On Thu, Aug 21, 2025 at 10:13 AM Branko Čibej <br...@apache.org> wrote: > > > >> On 21. 8. 25 09:58, Joe Orton wrote: > >> > >> The pool-debug tests for httpd have started failing with SIGSEGV, I am > >> guessing related to this change since these have been very stable for a > >> long time. I think this is the relevant part of the traceback: > > > > It's probably related to what Yann pointed out yesterday. My bad. Will fix > > as soon as I can, or indeed Yann could just commit and backport his > > patches; I'm a bit swamped ATM. > > Looks like it's not related, my patch only fixes some error cases > (which need some cleanup after the code move), but I don't think httpd > fails on creating a pool. > > I think what happens is that now apr_pool_create_ex_debug() will > attach the pool to its parent before creating the mutex, but then an > apr_pool_walk_tree() on the parent (or any ancestor) running > concurrently might find the new pool with ->mutex == NULL, and > segfault in pool_lock(). > > ISTM that apr_pool_check_lifetime() could simply ignore any pool with > ->parent == NULL (this includes the global pool and unmanaged pools), > and then we can move back the mutex creation before the pool is > attached to its parent. > > Something like the attached patch?
Pushed in r1927948, and backported to 1.[78].x, let's see if httpd feels better. > > Cheers; > Yann.