1.2b1 bug..

From: Michael O'Reilly <michael@dont-contact.us>
Date: 27 Oct 1997 10:01:53 +0800

Ok. the fix on this has been a little stumped..

squid: comm.c:336: commConnectDnsHandle: Assertion `ia->cur < ia->count' failed.

Traceback below.

As near as I can tell, it's failing to unwind properly. It {tried to
connect, failed, did an ipcache_nbgethostbyname} x 4, did an
ipcacheRemoveBadAddr, and returned, but then the ipcache_call_pending
did the callback again (because it had been added 4 times without
being removed yet??), which promptly died because ipcacheRemoveBadAddr
had set ia->cur == 0, which isn't less than 0. :)

Ideas on a fix?

#0 0x400888ad in __kill ()
#1 0x4005a6b5 in raise (sig=136701672) [ this is actually
                commConnectDnsHandle, but gdb loses the context ]

#2 0x806f117 in ipcache_call_pending (i=0x825e6d8) at ipcache.c:462
#3 0x806fc63 in ipcache_nbgethostbyname (name=0x8261898 "mrtg.iinet.net.au",
    handler=0x805751c <commConnectDnsHandle>, handlerData=0x8261848) at ipcache.c:694
#4 0x8057931 in commConnectHandle (fd=25, data=0x8261848) at comm.c:414
#5 0x80575fb in commConnectDnsHandle (ia=0x825e6e8, data=0x8261848) at comm.c:338
#6 0x806f117 in ipcache_call_pending (i=0x825e6d8) at ipcache.c:462
#7 0x806fc63 in ipcache_nbgethostbyname (name=0x8260c20 "mrtg.iinet.net.au",
    handler=0x805751c <commConnectDnsHandle>, handlerData=0x8260bd0) at ipcache.c:694
#8 0x8057931 in commConnectHandle (fd=24, data=0x8260bd0) at comm.c:414
#9 0x80575fb in commConnectDnsHandle (ia=0x825e6e8, data=0x8260bd0) at comm.c:338
#10 0x806f117 in ipcache_call_pending (i=0x825e6d8) at ipcache.c:462
#11 0x806fc63 in ipcache_nbgethostbyname (name=0x825ee10 "(\013&\b\214!\f@et.net.a\030",
    handler=0x805751c <commConnectDnsHandle>, handlerData=0x825edd8) at ipcache.c:694
#12 0x8057931 in commConnectHandle (fd=23, data=0x825edd8) at comm.c:414
#13 0x80575fb in commConnectDnsHandle (ia=0x825e6e8, data=0x825edd8) at comm.c:338
#14 0x806f117 in ipcache_call_pending (i=0x825e6d8) at ipcache.c:462
#15 0x806fc63 in ipcache_nbgethostbyname (name=0x8261898 "mrtg.iinet.net.au",
    handler=0x805751c <commConnectDnsHandle>, handlerData=0x8261848) at ipcache.c:694
#16 0x8057931 in commConnectHandle (fd=25, data=0x8261848) at comm.c:414
#17 0x80575fb in commConnectDnsHandle (ia=0x825e6e8, data=0x8261848) at comm.c:338
#18 0x806f117 in ipcache_call_pending (i=0x825e6d8) at ipcache.c:462
#19 0x806fc63 in ipcache_nbgethostbyname (name=0x8260c20 "mrtg.iinet.net.au",
    handler=0x805751c <commConnectDnsHandle>, handlerData=0x8260bd0) at ipcache.c:694
#20 0x8057931 in commConnectHandle (fd=24, data=0x8260bd0) at comm.c:414
#21 0x80575fb in commConnectDnsHandle (ia=0x825e6e8, data=0x8260bd0) at comm.c:338
#22 0x806f117 in ipcache_call_pending (i=0x825e6d8) at ipcache.c:462
#23 0x806fc63 in ipcache_nbgethostbyname (name=0x825ee10 "(\013&\b\214!\f@et.net.a\030",
    handler=0x805751c <commConnectDnsHandle>, handlerData=0x825edd8) at ipcache.c:694
#24 0x8057931 in commConnectHandle (fd=23, data=0x825edd8) at comm.c:414
#25 0x80575fb in commConnectDnsHandle (ia=0x825e6e8, data=0x825edd8) at comm.c:338
#26 0x806f117 in ipcache_call_pending (i=0x825e6d8) at ipcache.c:462
#27 0x806fc63 in ipcache_nbgethostbyname (name=0x8261898 "mrtg.iinet.net.au",
    handler=0x805751c <commConnectDnsHandle>, handlerData=0x8261848) at ipcache.c:694
#28 0x8057931 in commConnectHandle (fd=25, data=0x8261848) at comm.c:414
#29 0x80575fb in commConnectDnsHandle (ia=0x825e6e8, data=0x8261848) at comm.c:338
#30 0x806f117 in ipcache_call_pending (i=0x825e6d8) at ipcache.c:462
#31 0x806fc63 in ipcache_nbgethostbyname (name=0x8260c20 "mrtg.iinet.net.au",
    handler=0x805751c <commConnectDnsHandle>, handlerData=0x8260bd0) at ipcache.c:694
#32 0x8057931 in commConnectHandle (fd=24, data=0x8260bd0) at comm.c:414
#33 0x80575fb in commConnectDnsHandle (ia=0x825e6e8, data=0x8260bd0) at comm.c:338
#34 0x806f117 in ipcache_call_pending (i=0x825e6d8) at ipcache.c:462
#35 0x806fc63 in ipcache_nbgethostbyname (name=0x825ee10 "(\013&\b\214!\f@et.net.a\030",
    handler=0x805751c <commConnectDnsHandle>, handlerData=0x825edd8) at ipcache.c:694
#36 0x8057931 in commConnectHandle (fd=23, data=0x825edd8) at comm.c:414
#37 0x80575fb in commConnectDnsHandle (ia=0x825e6e8, data=0x825edd8) at comm.c:338
#38 0x806f117 in ipcache_call_pending (i=0x825e6d8) at ipcache.c:462
#39 0x806f969 in ipcache_dnsHandleRead (fd=4, data=0x8127480) at ipcache.c:619
#40 0x8059182 in comm_select (sec=1) at comm.c:1046
#41 0x8071e56 in main (argc=1, argv=0xbffffdbc) at main.c:656
#42 0x804abbe in ___crt_dummy__ ()

squid: comm.c:336: commConnectDnsHandle: Assertion `ia->cur < ia->count' failed.

Program received signal SIGABRT, Aborted.

(gdb) up
#1 0x4005a6b5 in raise (sig=136701672)
(gdb) up
#2 0x806f117 in ipcache_call_pending (i=0x825e6d8) at ipcache.c:462
462 p->handler(i->status == IP_CACHED ? &i->addrs : NULL,
(gdb) print *i
$1 = {name = 0x825f1e0 "mrtg.iinet.net.au", next = 0x0, lastref = 877802191,
  expires = 877802191, addrs = {count = 0 '\000', cur = 0 '\000', in_addrs = 0x824c1d8},
  pending_head = 0x8258918, error_message = 0x0, locks = 11 '\013', status = 0}
Received on Tue Jul 29 2003 - 13:15:44 MDT

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