Re: Debug

From: Henrik Nordstrom <henrik@dont-contact.us>
Date: Tue, 09 Jan 2007 00:49:01 +0100

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..

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

Received on Mon Jan 08 2007 - 16:49:07 MST

This archive was generated by hypermail pre-2.1.9 : Thu Feb 01 2007 - 12:00:02 MST