httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niklas Edmundsson <ni...@acc.umu.se>
Subject Re: mod_socache_shmcb segfaults
Date Wed, 20 Feb 2013 11:50:19 GMT

Noone familiar enough with this code to have a clue/hint on what's 
going on and what's really supposed to happen?

On Sun, 10 Feb 2013, Niklas Edmundsson wrote:

> On Fri, 8 Feb 2013, Joe Orton wrote:
>
>> On Sun, Feb 03, 2013 at 08:32:11PM +0100, Niklas Edmundsson wrote:
>>> Hi all!
>>> 
>>> Something is definitely fishy with mod_socache_shmcb as shipped with
>>> httpd 2.4.3. I'm hacking on a module that uses 16byte indexes
>>> (IP(v6) addresses) to store 2byte counters (16bit uint), these sizes
>>> are given as hints in the call to the init function.
>>> 
>>> After an hour or so with production load, which means
>>> retrieve/store/remove for each connection, it consistently crashes
>>> in mod_socache_shmcb.c
>> 
>> Hi Niklas, thanks for the report and the analysis.  You are passing
>> specifically avg_obj_size = 2, avg_id_len = 16 in the hints?
>
> Yup, that's the intention at least. The actual hint-struct is declared as:
>
> static struct ap_socache_hints iplimit_cache_hints = {
> 	16, /* average length of IDs */
> 	sizeof(apr_uint16_t), /* avg size of objects */
> 	300000000 /* interval between expiry runs */
> };
>
>> It looks like something goes wrong with the sizing heuristics with small
>> obj/id sizes.  I can't work out exactly why but it's definitely a bug.
>
> I'm hoping for someone familiar with that code to chime in with ideas, as the 
> fix for this isn't really obvious to me either...
>
> /Nikke
>


/Nikke
-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  Niklas Edmundsson, Admin @ {acc,hpc2n}.umu.se      |     nikke@acc.umu.se
---------------------------------------------------------------------------
  Buddhism means never having to say you're sorry.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Mime
View raw message