httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Fritsch>
Subject Is mpm_event missing allocator mutexes?
Date Sun, 05 Feb 2017 21:39:19 GMT

I may be missing something but this looks wrong to me:

apr_allocator uses a mutex to be thread safe. Pools use this mutex also to 
protect sub-pool creation, cleanup registering, etc. When apr creates the 
initial allocator and global_pool in apr_pool_initialize(), it also creates a 
mutex for this allocator. But mpm_event creates a new allocator for each 
transaction pool and does not create a mutex for it. And gdb shows that in 
listener_thread() at the get_worker() call, ptrans->allocator->mutex is NULL 
(checked in 2.4.25).

Shouldn't we allocate a mutex there and call apr_allocator_mutex_set()? If no, 
why not. If yes, why does it still work as well as it does right now? Or could 
the lacking mutex explain some weird segfaults?


View raw message