Re: Misc fixes

From: Stephen R. van den Berg <srb@dont-contact.us>
Date: Tue, 25 Aug 1998 00:39:39 +0200

Henrik Nordstrom wrote:
>Stephen R. van den Berg wrote:

>> aio_do_close(aio_request_t * requestp)
>...
>> + debug(43, 0) ("aio_do_close: FD %d, errno %d\n", requestp->fd, errno);

>Hmm.. is it wise to have debug calls inside a thread? Is stdio to the
>same FILE and syslog MT-safe on all platforms? I would not bet on it..

You're right. I wasn't really expecting close() to return EAGAIN
actually, I was merely guessing (this was put in while I was hunting
for the filedescriptor leak (which has been closed a while ago)).

>> ********************************************************
>> An extension to allow the redirector to act differently
>> depending on the port the request was made on
>> (for junk-buster and non-junk-buster decisions).
>> ********************************************************

>to this specific case. Or perhaps associate each http_port with
>a configurable tag to simplify the redirectors job & configuration.

This sounds good. To quote Picard: "Make it so!" :-)

>Hmm.. thinking about http_port a bit more. Maybe we should
>generalize http_port + tcp_incoming_address + redirect tag
>to one config option?

Even better. I already was wondering why this was separated.

>> --- squid-1.2.beta24/src/filemap.c Wed Jul 22 22:37:19 1998
>> +++ squid-BuGless/src/filemap.c Thu Jul 23 17:54:28 1998
>...
>> - word = (word + 1) % fm->nwords;
>> + if (++word == fm->nwords)
>> + word = 0;

>I would use >= here. Not that is matters unless something unexplainable
>happens..

If something unexplainable happens, we *want* this to crash and burn,
so that we'll take notice. It would put in a safety net which should
*not* be catching anything, ever. I don't think this would be good.

>> ********************************************************
>> Self explanatory?
>> ********************************************************
>>
>> diff -u -b -r squid-1.2.beta24/src/forward.c squid-BuGless/src/forward.c
>> --- squid-1.2.beta24/src/forward.c Wed Aug 19 08:05:52 1998
>> +++ squid-BuGless/src/forward.c Sat Aug 22 04:37:41 1998

>> +#if 0 /* SRB bogus assertion? */
>> assert(fwdState->fail.err_code);
>> +#endif

>Is it?

>We should not get there unless a error was detected and registered. If
>it isn't then there is a bug somewhere else.

Ok, then bug probably was somewhere else at one point. I'll have to
remember enable the assertion in my tree some time.

>> ********************************************************
>> Missing argument; why I am the only one seeing this
>> problem?
>> ********************************************************

>You are not. Problem is that Duane does not use async-io..

Sometimes the answers are so simple :-).

>same error on storeValidateComplete.

Apparently I'm not using that function in my squid, I've not seen it
cause problems yet.

>I sent a patch to squid-bugs yesterday for this the q == data problem.

This one was a bastard to find, BTW. Threading and debugging don't mix
so well.
Does your patch add more code than mine? (Just curious; since I patched
with only minimal knowledge; you must know more about this function
than I do).

>A recommendation: Always compile your Squid using -Wall -Werror. It

Indeed, squid compiles -Wall-free. I didn't know that. I personally
don't like some of the -Wall options of gcc, so I rarely use it on
foreign sources.

-- 
Sincerely,                                                          srb@cuci.nl
           Stephen R. van den Berg (AKA BuGless).
This signature third word omitted, yet is comprehensible.
Received on Tue Jul 29 2003 - 13:15:52 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:11:52 MST