Re: crash upon reconfigure?

From: Kinkie <gkinkie_at_gmail.com>
Date: Sat, 12 Jul 2008 15:06:16 +0200

On Sat, Jul 12, 2008 at 12:17 PM, Amos Jeffries <squid3_at_treenet.co.nz> wrote:
> Kinkie wrote:
>>
>> Sorry for the double-posting, I hit "send" by mistake.
>>
>>
>> I am seeing consistent crashes in squid-3-trunk upon reconfigure.
>>
>> It complains that
>>
>> 2008/07/12 10:02:25| commBind: Cannot bind socket FD 14 to
>> 0.0.0.0:3128: (98) Address already in use
>> FATAL: Cannot open HTTP Port
>>
>> Might it be useful to insert some delay before reopening the http
>> ports upon reconfigure?
>
> This is bug 2351 by the sound of it. Are you able to trace the cause
> precisely? The reconfigure sequence already has the entire
> close+parse+restart sequence for a delay. Which can be a few seconds.

I'll try but it won't be easy..

>> Or even not closing it at all if it has not
>> changed?
>
> That would be ideal, but a fair bit of work for someone. It would mean
> creating a better startup and reconfigure sequence.
> We are partially there towards a config method that would allow it. Some of
> the new components have their one XConfig objects.
>
> It would need to parse squid.conf into a temporary object of each component
> and have each module handle their own startup and change from existing 'old'
> config to 'new' config objects only if needed in its reconfigure/startup
> handler.

Hm.. yeah. But we need to modularize more before we get there.
It could be delegated to objects, somehow splitting the reconfigure
operation into a preparation and an activation phase (which would
become a noop if no changes need to be performed).

> This would mean virtually 0-seconds reconfigure service delay on most
> reconfigures. Also the startup/reconfigure could be merged into one code
> sequence.

Yes.

> Thats what I've been holding up the back-sleeve of my head for a while now.
> I may have time to mentor/audit someone doing it. All the best if you want
> to give it a try.

One step at a time. I believe that for the next month or so I'll try
to do janitorial (aka refactoring) work like I'm doing on
CacheManager. If something comes up, I'll try to tackle it but I'd
like to lay some groundwork first.

-- 
 /kinkie
Received on Sat Jul 12 2008 - 13:06:19 MDT

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 12:00:05 MDT