[squid-dev] [PATCH] tentative fix for bug 4438

Kinkie gkinkie at gmail.com
Sun Mar 6 18:16:31 UTC 2016


On Sat, Mar 5, 2016 at 10:21 PM, Alex Rousskov
<rousskov at measurement-factory.com> wrote:
> On 03/05/2016 04:31 AM, Kinkie wrote:
>> ensuring that mempools are initialized before MemBlob is
>> used.
>
> Please explain how
>
>   * a call to Mem::Init()
>
> at some random time during dynamic initialization[1] would _ensure_ that
> Mem::Init() is called before
>
>   * MemBlob is used.

In fact, it doesn't, and my attempt failed - alternatively I got my
analysis wrong and the issue is not caused by a non-pooled allocation.
It seems I got wrong how initialization works.

> P.P.P.S. Please note that whether your patch helps Yuri is irrelevant
> for the long-term fix. If the bug is a usage/initialization race, then
> it may appear to be fixed when you reshuffle random events, but it will
> happen again unless properly fixed.

As I cannot reproduce the issue it's really hard to do a root cause analysis.
At this point I'm thinking about reinstrumenting MemBlob not to use
mem/old_api but to use its own pools. It's essentially code
duplication, but it should ensure that pools are fully initialized
when used.

-- 
    Francesco


More information about the squid-dev mailing list