Re: Someone stomping on our memory

From: Andres Kroonmaa <andre@dont-contact.us>
Date: Mon, 13 Nov 2000 22:30:33 +0200

On 10 Nov 2000, at 20:54, Henrik Nordstrom <hno@hem.passagen.se> wrote:

> > I only mentioned this piece because I've had several backtraces
> > passing through these lines. Sure I might be mislead. I gotta stare
> > more at that module source before I can really talk ;)
>
> If we are seing the same bug, then it is quite unlikely that the
> stacktrace indicates where the problem is. The malloc problem has most
> likely been introduced some time before, in perhaps a completely
> different routine. The fact that the stacktraces are different, all
> crashing inside malloc is further evidence of this.
>
> The use of a good malloc debugger without mempools should spot this
> immediately, provided a situation where the problem can be reproduced is
> found without requiring a huge workingset of allocations... (the problem
> with good malloc debuggers is that they are slow, and quite often bloat
> the memory usage by many orders of magnitude)

 jepp, pretty painful.

#8 0x80d0971 in fatal_dump (message=0x841f5e0 "xfree: ERROR: s=84cd280 not found!") at tools.c:375
#9 0x80dd33c in check_free (s=0x84cd280) at util.c:230
#10 0x80dd622 in xfree (s=0x84cd280) at util.c:479
#11 0x808f9ad in ftpTraverseDirectory (ftpState=0xaa5dc18) at ftp.c:1480
#12 0x808f88b in ftpReadType (ftpState=0xaa5dc18) at ftp.c:1454
#13 0x808f39f in ftpHandleControlReply (ftpState=0xaa5dc18) at ftp.c:1321
#14 0x808f0da in ftpReadControlReply (fd=12, data=0xaa5dc18) at ftp.c:1276
#15 0x807f5ba in comm_poll (msec=10) at comm_select.c:449
#16 0x80a643a in main (argc=4, argv=0x8047880) at main.c:708

 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'll look into it, but maybe someone (Adrian?) who converted ftp.c
 to some mempools, can find faster what should be checked or done.

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

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