[mpm-itk] segfaults pfn_ap_logio_get_last_bytes(r->connection)

Arkadiusz Miśkiewicz arekm at maven.pl
Wed Sep 24 13:59:03 CEST 2014

On Wednesday 24 of September 2014, Arkadiusz Miśkiewicz wrote:
> Hello.
> One one machine where mpm_itk (2.4.7-02) is installed I'm getting
> segfaults. Restart cures them for some time and then back again. If
> segfaults start then segfault rate is like few segfaults per second.
> [error] [pid 21260] [client child died with signal 11 mpm_itk
> [error] [pid 21105] [client child died with signal 11 mpm_itk
> [error] [pid 21213] [client child died with signal 11 mpm_itk
> I'm using mod_logio to log number of bytes sent per vhost and that seems to
> be related,
> ap_increment_counts() is doing:
>     if (pfn_ap_logio_get_last_bytes != NULL) {
>         bytes = pfn_ap_logio_get_last_bytes(r->connection);
>     }
> Now not sure if that's itk fault but not hitting this on other machines
> with the same software, just without itk.
> Any ideas?
> Program terminated with signal SIGSEGV, Segmentation fault.
> #0  0x00007f8dd58f4b30 in ?? ()
> (gdb) bt
> #0  0x00007f8dd58f4b30 in ?? ()
> #1  0x00000000004357c5 in ap_increment_counts (sb=0x4b0bec0,
> r=r at entry=0x4b11d00) at

Found http://mail-archives.apache.org/mod_mbox/httpd-
dev/200912.mbox/%3C4B16CF0C.60000 at apache.org%3E

which describes similar problem. pfn_ap_logio_get_last_bytes is a pointer to a 
function provided by mod_logio module. Sometimes address of this function can 
change at reload.

httpd people update this pointer on reload in few places:
pfn_ap_logio_get_last_bytes = 

What I think is happening is that this pointer becomes invalid in mpm created 
child. It gets called after itk->ap_run_process_connection->....-

Called function address in backtrace is such invalid pointer
#0  0x00007f8dd58f4b30 in ?? ()

So not sure (yet) if this is correct thinking and why pointer doesn't get 

Arkadiusz Miśkiewicz, arekm / maven.pl

More information about the mpm-itk mailing list