Henrik Nordstrom wrote:
> mån 2007-01-08 klockan 17:27 +1300 skrev Amos Jeffries:
>
>> The problem I am tracking is a DNS timeout when a TCP_MISS:DIRECT begins
>> but can't figure out how to get any action-by-action or
>> function-by-function record of what calls are being made in the area.
>
> Well. it is not so easy. Squid is effectively one big state machine
> centered around the comm loop. While it's waiting for an external event
> (network I/O mainly) there is no code only state..
I'm getting to see the picture as clearly an opaque problem. ;-)
Over the last two days. The more I work on this the more I wish there
was some developer documentation saying things like this clearly
available in the source or on the website. So newbies like myself can
quickly get a picture of where to look for the entry points to all the
events without having to ask.
>
> Assuming it's an address lookup failing then the two most important
> entry points to look as is ipcache_nbgethostbyname and idnsGrokReply.
>
> ipcache_nbgethostbyname is the entry point to the DNS code for looking
> up the address of a host name.
>
> idnsGrokReply is where the raw DNS responses is processed and results
> handed back to the module which asked for it..
>
> ipcache_nbgethostbyname to the point where the DNS query is ready to be
> sent should be normal linear code.
>
> idnsGrokReply is all linear code up to an including the callback to the
> module which initiated the DNS query (i.e. all the way to the forwarding
> code when the query came from there.). But there is one or two callbacks
> before the forwarding code is reached so it's perhaps not entirely
> obvious if only reading code.
>
> Regards
> Henrik
>
Stranger, and stranger.
Thank you for those entry points. I found the idnsGrokReply after much
random code reading yesterday and found it doing something.
Also, the error has moved further down the sequence now from DNS timeout
to connection timeout (to localhost apache!). Without any code changes
on my part. I'm going to have to trace the traffic in my environment I
think to see exactly what its asking for before I get further into the
code. :-(
Amos
Received on Mon Jan 08 2007 - 17:30:48 MST
This archive was generated by hypermail pre-2.1.9 : Thu Feb 01 2007 - 12:00:02 MST