--------------------- PatchSet 4702 Date: 2007/06/08 16:09:37 Author: amosjeffries Branch: squid3-ipv6 Tag: (none) Log: Update comments and todo list. Members: NOTES-IPv6:1.1.2.35->1.1.2.36 src/net_db.cc:1.13.4.19->1.13.4.20 Index: squid3/NOTES-IPv6 =================================================================== RCS file: /cvsroot/squid-sf//squid3/Attic/NOTES-IPv6,v retrieving revision 1.1.2.35 retrieving revision 1.1.2.36 diff -u -r1.1.2.35 -r1.1.2.36 --- squid3/NOTES-IPv6 8 Jun 2007 14:41:43 -0000 1.1.2.35 +++ squid3/NOTES-IPv6 8 Jun 2007 16:09:37 -0000 1.1.2.36 @@ -1,4 +1,4 @@ -$Id: NOTES-IPv6,v 1.1.2.35 2007/06/08 14:41:43 amosjeffries Exp $ +$Id: NOTES-IPv6,v 1.1.2.36 2007/06/08 16:09:37 amosjeffries Exp $ NP: All IPv6 builds from before 6 June 2007 contain a cache corruption bug and require a full cachedir deletion and rebuild. @@ -27,82 +27,23 @@ PROBLEM: Regular segfaults (~3 minutes after startup) CAUSE: The NetDB protocol that squid uses to transfer peer transit information - sends IP addresses and timing info, but squi dassumes its IPv4 info. - This appears to be the cause of the ipcache segfault, as the ipcache was were + sends IP addresses and timing info, but squid assumes its IPv4 info. + This appears to be the cause of the ipcache segfault, as the ipcache was where the netdb packet were being copied into as binary data plus garbage recevied -SOLUTION: I have lobotomised netdb so that even in Ipv6 mode it will only transfer +SOLUTION: I have lobotomised netdb so that even in IPv6 mode it will only transfer IPv4 data. Assuming, perhapse wrongly, that the peer is a non-IPv6 squid. Requires finding a netdb size header to get it going. PROBLEM: BUG 1965 - Memory Violation(s) in FwdState - Write violation is critical. Read's are only major. -NP: possible link to above SegFault, unconfirmed. -Valgrind trace: -==5271== 2 errors in context 20 of 26: -==5271== Invalid write of size 4 -==5271== at 0x8097943: FwdState::abort(void*) (RefCount.h:103) -==5271== by 0x8090896: EventDispatcher::dispatch() (event.cc:131) -==5271== by 0x8091833: EventLoop::runOnce() (EventLoop.cc:131) -==5271== by 0x8091919: EventLoop::run() (EventLoop.cc:100) -==5271== by 0x80CB05D: main (main.cc:1315) -==5271== Address 0x43E3DE4 is 20 bytes inside a block of size 56 free'd -==5271== at 0x402123A: free (vg_replace_malloc.c:233) -==5271== by 0x8125CDB: MemImplementingAllocator::free(void*) (MemPool.cc:555) -==5271== by 0x80704A2: cbdataInternalUnlock(void const*) (cbdata.cc:484) -==5271== by 0x81058E6: commCallCloseHandlers (comm.cc:1473) -==5271== by 0x810A0DF: _comm_close(int, char const*, int) (comm.cc:1646) -==5271== by 0x8097938: FwdState::abort(void*) (forward.cc:85) -==5271== by 0x8090896: EventDispatcher::dispatch() (event.cc:131) -==5271== by 0x8091833: EventLoop::runOnce() (EventLoop.cc:131) -==5271== by 0x8091919: EventLoop::run() (EventLoop.cc:100) -==5271== by 0x80CB05D: main (main.cc:1315) -==5271== -==5271== 2 errors in context 21 of 26: -==5271== Invalid read of size 4 -==5271== at 0x8097940: FwdState::abort(void*) (RefCount.h:102) -==5271== by 0x8090896: EventDispatcher::dispatch() (event.cc:131) -==5271== by 0x8091833: EventLoop::runOnce() (EventLoop.cc:131) -==5271== by 0x8091919: EventLoop::run() (EventLoop.cc:100) -==5271== by 0x80CB05D: main (main.cc:1315) -==5271== Address 0x43E3DE4 is 20 bytes inside a block of size 56 free'd -==5271== at 0x402123A: free (vg_replace_malloc.c:233) -==5271== by 0x8125CDB: MemImplementingAllocator::free(void*) (MemPool.cc:555) -==5271== by 0x80704A2: cbdataInternalUnlock(void const*) (cbdata.cc:484) -==5271== by 0x81058E6: commCallCloseHandlers (comm.cc:1473) -==5271== by 0x810A0DF: _comm_close(int, char const*, int) (comm.cc:1646) -==5271== by 0x8097938: FwdState::abort(void*) (forward.cc:85) -==5271== by 0x8090896: EventDispatcher::dispatch() (event.cc:131) -==5271== by 0x8091833: EventLoop::runOnce() (EventLoop.cc:131) -==5271== by 0x8091919: EventLoop::run() (EventLoop.cc:100) -==5271== by 0x80CB05D: main (main.cc:1315) -==5271== -==5271== 2 errors in context 22 of 26: -==5271== Invalid write of size 4 -==5271== at 0x8097939: FwdState::abort(void*) (forward.cc:86) -==5271== by 0x8090896: EventDispatcher::dispatch() (event.cc:131) -==5271== by 0x8091833: EventLoop::runOnce() (EventLoop.cc:131) -==5271== by 0x8091919: EventLoop::run() (EventLoop.cc:100) -==5271== by 0x80CB05D: main (main.cc:1315) -==5271== Address 0x43E3DDC is 12 bytes inside a block of size 56 free'd -==5271== at 0x402123A: free (vg_replace_malloc.c:233) -==5271== by 0x8125CDB: MemImplementingAllocator::free(void*) (MemPool.cc:555) -==5271== by 0x80704A2: cbdataInternalUnlock(void const*) (cbdata.cc:484) -==5271== by 0x81058E6: commCallCloseHandlers (comm.cc:1473) -==5271== by 0x810A0DF: _comm_close(int, char const*, int) (comm.cc:1646) -==5271== by 0x8097938: FwdState::abort(void*) (forward.cc:85) -==5271== by 0x8090896: EventDispatcher::dispatch() (event.cc:131) -==5271== by 0x8091833: EventLoop::runOnce() (EventLoop.cc:131) -==5271== by 0x8091919: EventLoop::run() (EventLoop.cc:100) -==5271== by 0x80CB05D: main (main.cc:1315) +NP: side-effects appear to be minor at present, the write occurs within dead + memory between requests and squid copes with it well. TODO: 1.2 Migrate code to using IPAddress object over any other method of struct storage -1.3 Track and close all bugs listed above. - 3 Push incremental patches to HEAD (on hold for 3.1 branch) 3.1 IPAddress.* @@ -114,9 +55,15 @@ 3.9 changes in / +4.0 Find netdb solution for sending IPv6 addresses. + 4.1 Add 'EPSV' FTP command for IPv6 PASV connections. 4.2 Write an rfc2874/3266 DNS Resolver library (IPv6 DNS extensions ) defines A6, DNAME, packet sizes +4.3 Write ICMPv6 engine (performs echo for peer-selection stats). + +4.4 Convert Auth modules to handle IPv6 addresses + 5 find more, bugs etc ??? Index: squid3/src/net_db.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/net_db.cc,v retrieving revision 1.13.4.19 retrieving revision 1.13.4.20 diff -u -r1.13.4.19 -r1.13.4.20 --- squid3/src/net_db.cc 8 Jun 2007 14:41:44 -0000 1.13.4.19 +++ squid3/src/net_db.cc 8 Jun 2007 16:09:37 -0000 1.13.4.20 @@ -1,6 +1,6 @@ /* - * $Id: net_db.cc,v 1.13.4.19 2007/06/08 14:41:44 amosjeffries Exp $ + * $Id: net_db.cc,v 1.13.4.20 2007/06/08 16:09:37 amosjeffries Exp $ * * DEBUG: section 38 Network Measurement Database * AUTHOR: Duane Wessels @@ -1262,9 +1262,8 @@ buf[i++] = (char) NETDB_EX_NETWORK; -/* FIXME INET6 : netdb has no size or type info on teh address. */ -/* we are forced to be brain-damaged with peers and assume IPv4 */ - +/* FIXME INET6 : So how do we cope with sending IPv6 addresses ?? */ +/* AYJ: for now we just assume the peer can handle IPv4 addresses only. */ addr.GetInAddr(line_addr); xmemcpy(&buf[i], &line_addr, sizeof(struct in_addr));