Description of problem: When network interfaces go down and up, squid hangs and runs into timeouts when pages are requested. Version-Release number of selected component (if applicable): squid-2.5.STABLE13-1.FC5 How reproducible: Easy Steps to Reproduce: 1. Start squid 2. Bring an interface down and up again (tested with (W)LAN/DHCP with and without change of IP address, addition/removal of VPNC tun device) 3. Try to access a web page Actual results: squid doesn't fetch & deliver the web page Expected results: squid fetches & delivers the web page Additional info:
It works for me fine (IP changes, bringing an interface down and up). How can I reproduce it? Do you use any special options in squid.conf, direct connections or something else?
Perhaps it's that I use Networkmanager/-vpnc which casually writes a new /etc/resolv.conf whenever there is a status change? I'll try to provoke the problem, the do an strace.
Hmm, I can't reproduce it in the RH office here, but it was repeatable at home. I'll try it there.
I could reproduce it here. When I ran strace on the squid processes, I saw that it tried to resolve web site names via the name server in the office, rather than what NetworkManager put into /etc/resolv.conf when the interface came up. Does squid somehow cache the contents of /etc/resolv.conf? I figure it doesn't use normal glibc functions (gethostbyname() etc.) to resolve names, but has its own code for that. Perhaps it should check whether /etc/resolv.conf has changed?
Created attachment 131646 [details] This patch adds reloading of /etc/resolv.conf (when it changes)
Created attachment 132681 [details] updated patch for 2.6 branch
Unfortunately it doesn't work if you use ipcache....
It should work when the current ip record expires and there aren't any cached dns queries...
closing as WONTFIX. I think this problem isn't so common and it's a bit overhead for a production environment.