On Tue, Aug 12, 2025 at 07:37:36PM +0200, Branko Čibej wrote: > [Sent from the wrong e-mail address the first time] > > Found this while trying to use pool debugging to track down an issue in > Serf. Apparently testing pool debugging hasn't been much of a priority, heh. > > Related to this, with lifetime and owner checking enabled, some of our tests > break; I haven't tracked these down yet, but the symptoms are that the test > program aborts when it tries to destroy a pool, due to ownership checks; > apparently the pool is destroyed by a different thread than the one that > created it. This happens in testlockperf, testmutexscope and testall. > > Given that this is a likely scenario when multiple threads create pools, and > then the main thread calls apr_terminate(), I wonder if these ownership > checks are necessary. Or, conversely, if they should be disabled during > [global] pool destruction. They're actually triggered by apr_pool_clear(), > which /should/ pass a strict ownership check under normal circumstances.
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: https://github.com/apache/httpd/actions/runs/17119658578/job/48557501177#step:11:10017 Thread 1 (Thread 0x7f054ffff6c0 (LWP 67524)): #0 ___pthread_mutex_lock (mutex=0x8) at ./nptl/pthread_mutex_lock.c:80 type = <optimized out> __PRETTY_FUNCTION__ = "___pthread_mutex_lock" id = <optimized out> #1 0x00007f06066566e4 in apr_thread_mutex_lock (mutex=0x0) at locks/unix/thread_mutex.c:139 rv = 21939 #2 0x00007f0606657249 in pool_lock (pool=0x55b3a7f44c30) at memory/unix/apr_pools.c:1463 No locals. #3 0x00007f060665731b in apr_pool_walk_tree (pool=0x55b3a7f44c30, fn=0x7f0606658075 <pool_find>, data=0x7f054fffe570) at memory/unix/apr_pools.c:1511 rv = 0 child = 0x7f0580002fc0 #4 0x00007f0606657340 in apr_pool_walk_tree (pool=0x7f0580002fc0, fn=0x7f0606658075 <pool_find>, data=0x7f054fffe570) at memory/unix/apr_pools.c:1515 rv = 0 child = 0x55b3a7f44c30 #5 0x00007f0606657340 in apr_pool_walk_tree (pool=0x55b3a8518760, fn=0x7f0606658075 <pool_find>, data=0x7f054fffe570) at memory/unix/apr_pools.c:1515 rv = 0 child = 0x7f0580002fc0 #6 0x00007f0606657340 in apr_pool_walk_tree (pool=0x55b3a7f12cd0, fn=0x7f0606658075 <pool_find>, data=0x7f054fffe570) at memory/unix/apr_pools.c:1515 rv = 0 child = 0x55b3a8518760 #7 0x00007f0606657340 in apr_pool_walk_tree (pool=0x55b3a7f12750, fn=0x7f0606658075 <pool_find>, data=0x7f054fffe570) at memory/unix/apr_pools.c:1515 rv = 0 child = 0x55b3a7f12cd0 #8 0x00007f0606657340 in apr_pool_walk_tree (pool=0x55b3a7f112a0, fn=0x7f0606658075 <pool_find>, data=0x7f054fffe570) at memory/unix/apr_pools.c:1515 rv = 0 child = 0x55b3a7f12750 #9 0x00007f060665815f in apr_pool_find (mem=0x55b38430cab3) at memory/unix/apr_pools.c:2284 pool = 0x55b38430cab3 #10 0x00007f060664cce1 in apr_table_mergen (t=0x7f05400582d0, key=0x55b38430caa8 "Connection", val=0x55b38430cab3 "close") at tables/apr_tables.c:752 pool = 0x0 next_elt = 0x0 end_elt = 0x7f05400584c0 checksum = 32517 hash = 21939