squid-1.0.beta16 crash in ipcache_call_pending()

From: James Aldridge <jhma@dont-contact.us>
Date: Wed, 12 Jun 1996 15:49:29 +0200

Our cache has just died with a segmentation fault in the
ipcache_call_pending() function (ipcache.c line 438):

(gdb) bt
#0 strlen () at strlen.s:15
#1 0xfabe3bc in _doprnt () at doprnt.c:1588
#2 0xfac7ffc in fprintf () at fprintf.c:45
#3 0x456f10 in storeWriteCleanLog () at store.c:2682
#4 0x45a1d4 in death (sig=11) at tools.c:133
#5 <signal handler called>
#6 0x4328f4 in ipcache_call_pending (i=0x178e0fe0) at ipcache.c:438
#7 0x4330c8 in ipcache_parsebuffer (
    buf=0x101c0bb8 "$fail www.sexmall.org\n$message Name Server for domain 'www.sexmall.org' is unavailable.\n$end\n", offset=93, dnsData=0x100f46f8)
    at ipcache.c:559
#8 0x433d84 in ipcache_dnsHandleRead (fd=1000, dnsData=0x100f46f8)
    at ipcache.c:732
#9 0x419838 in comm_select (sec=268449040, failtime=4405920) at comm.c:755
#10 0x43817c in main (argc=60, argv=0x10009dc0) at main.c:393

427 /* walks down the pending list, calling handlers */
428 static void ipcache_call_pending(i)
429 ipcache_entry *i;
430 {
431 struct _ip_pending *p = NULL;
432 int nhandler = 0;
433
434 i->lastref = squid_curtime;
435
436 while (i->pending_head != NULL) {
437 p = i->pending_head;
438 i->pending_head = p->next;
439 if (p->handler) {
440 nhandler++;
441 p->handler(p->fd,
442 (i->status == IP_CACHED) ? &(i->entry) : NULL,
443 p->handlerData);
444 }
445 memset(p, '\0', sizeof(struct _ip_pending));
446 safe_free(p);
447 }
448 i->pending_head = NULL; /* nuke list */
449 debug(14, 10, "ipcache_call_pending: Called %d handlers.\n", nhandler);
450 }

Has anyone else seen this problem? If so, has anyone got a fix to this
problem? I can provide more gdb output if anyone wants it.

The system is a SGI Challenge/S running Irix 5.3; the cache (squid-1.0.beta16
including the ipcache.c patch) is handling about 8 requests per second at
this time of day.

Thanks in advance,

James

======= ___ === James Aldridge, Network Engineer,
====== / / / ___ ____ _/_ ==== EUnet Communications Services BV
===== /--- / / / / /___/ / ===== Singel 540, 1017 AZ Amsterdam, NL
==== /___ /___/ / / /___ /_ ====== Tel. +31 20 6233803; Fax. +31 20 6224657
=== ======= [ 24hr emergency number +31 20 4210865 ]
Received on Wed Jun 12 1996 - 06:50:49 MDT

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