Re: Someone stomping on our memory

From: Andres Kroonmaa <andre@dont-contact.us>
Date: Mon, 20 Nov 2000 12:43:24 +0200

On 20 Nov 2000, at 8:50, Stephen R. van den Berg <srb@cuci.nl> wrote:

> Andres Kroonmaa wrote:
> >> > doesn't occur when mempools are disabled.
> >> > Seems that we call xfree where we should call memFree.
>
> >> > Looks like I can reproduce it quite reliably with requests
> >> > ftp://username:password@ftp.site.com/
>
> > I used --enable-xmalloc-debug with empty cache_swap. Did its job
> > very well.
>
> I hate to say it, but I squashed these leaks in my code more than two
> years ago (which proves that you didn't look at my patch 8-).

 hmm. weird. to my knowledge 2 years ago we didn't have ftp.c on pools.
 I came across this bug when I started to look close into 2.4. 2.3 did
 not have this bug, as it didn't have mempools in ftp.c

 I did look at your patch, but only in relation to chunked pools. I hope
 you agree that it is quite unexpected to find a bug fix to bug in a patch
 to s2.2, and to bug introduced between 2.3 and 2.4...

> From my old diffs:
>
> diff -U 2 -b -B -p -r -d --horizon-lines=2 -X /usr/local/etc/xdiff squid-2.2.STA
> BLE3/src/ftp.c squid-B2/src/ftp.c
> --- squid-2.2.STABLE3/src/ftp.c Tue May 11 22:34:36 1999
> +++ squid-B2/src/ftp.c Sun Jun 27 04:52:54 1999

> So it appears that you might have missed another spot still.
> I didn't compare it with the current code yet.

 there are many changes in your patch that are most probably not compatible
 with current state, therefore it is very difficult to judge whether any
 part of it may fix our current problems.

@@ -1179,5 +1217,5 @@ clientCacheHit(void *data, char *buf, ss
        debug(33, 3) ("clientCacheHit: request aborted\n");
        return;
- } else if (size < 0) {
+ } else if (size <= 0) {
        /* swap in failure */
        memFree(buf, MEM_CLIENT_SOCK_BUF);

 I can see few places in your patch that may be related to crashes I'm
 seeing, but I'm unable to see how they interact with other areas you
 address, so its difficult to say whether they are applicable.

 Perhaps you would care to take 2.4 and review you changes, and extract
 those that could fix any bugs we've missed?

------------------------------------
 Andres Kroonmaa <andre@online.ee>
 Delfi Online
 Tel: 6501 731, Fax: 6501 708
 Pärnu mnt. 158, Tallinn,
 11317 Estonia
Received on Mon Nov 20 2000 - 03:46:59 MST

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