Re: bugs in HEAD

From: Andres Kroonmaa <andre@dont-contact.us>
Date: Wed, 8 May 2002 16:34:37 +0300

On 8 May 2002, at 12:59, Henrik Nordstrom <hno@marasystems.com> wrote:

> Hmm.. the trace seems to suggest the error is in cache digests.. but cache
> digests take place regardless of no-query.. so I am a bit confused.. if it
> was digests then one would think the error should always occur..

 I see that event peerDigestCheck is not registered at startup. I wonder why.
 Looks like digests from peers are not fetched unless some client requests
 is seen.

> To try to isolate this please first try with no-digest-exchanges, then if it
> does not make a difference, recompile Squid without cache digest support.
 
 With added no-digest it doesn't crash. It doesn't also

> The fact that c prints out as NULL is most likely a gdb optimization ghost
> (gdb being confused by gcc).. "0xdf5f0018 - some small amount" is defnitely
> not NULL..

 yes, indeed. after recompiling witout -O
(gdb) p *c
$21 = {valid = 1, locks = 0, type = 30, y = 32685799, data = {pointer = 0x82cefa8, double_float = -1.5566686953890647e+151,
    integer = 137162664}}

> What I think most likely has happened here is that cbdataReferenceValid has
> been called for a non-cbdata pointer. This will make cbdata quite upset and
> abort in the CBDATA_CHECK macro.

 I'm very unfamiliar with this code, but to me is seems that right pointer
 is passed, but that pointer is not cbdatalocked.

cvs/HEAD/src>egrep fetch.+cbd *.c
peer_digest.c: fetch = cbdataAlloc(DigestFetchState);
peer_digest.c: fetch->pd = cbdataReference(pd);
peer_digest.c: * must be called only when fetch and pd cbdata are valid */
peer_digest.c: * must be called only when fetch cbdata is valid */

cvs/HEAD/src>egrep cbd.+fetch *.c
peer_digest.c: cbdataInternalLock(fetch);
peer_digest.c: if (cbdataReferenceValid(fetch)) {
peer_digest.c: cbdataInternalUnlock(fetch);
peer_digest.c: const int fcb_valid = cbdataReferenceValid(fetch);
peer_digest.c: const int pdcb_valid = fcb_valid && cbdataReferenceValid(fetch->pd);
peer_digest.c: const int pcb_valid = pdcb_valid && cbdataReferenceValid(fetch->pd->peer);
peer_digest.c: cbdataReferenceDone(fetch->pd);
peer_digest.c: cbdataFree(fetch);

 I get impression that cbdataInternalLock(fetch) is used in some func to
 avoid such assert faults. but on this specific case fetch has zero locks
 on it.
 I'm still not qualified to do anything about it, so I'd rather
 ask you to look into it or file a bug report.

------------------------------------
 Andres Kroonmaa <andre@online.ee>
 CTO, Microlink Online
 Tel: 6501 731, Fax: 6501 725
 Pärnu mnt. 158, Tallinn,
 11317 Estonia
Received on Wed May 08 2002 - 07:42:17 MDT

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