[Monetdb-developers] memory problems (black smoke) from the [HEAD]

Jens Teubner jens.teubner at in.tum.de
Tue Jan 30 15:41:26 CET 2007

On Tue, Jan 30, 2007 at 03:13:14PM +0100, Jan Flokstra wrote:

> We (Henning and I) are currently experiencing some strange problems
> with the HEAD of Pathfinder. It looks like there is a problem with
> memory management in Pathfinder. On our 64 bit SuSe9.3 system crashes
> every time we do a second query through the Mapi interface.

I don't know if this is the cause of your problem, but the
implementation of PFrealloc() is completely broken (there's already a
bug report on file).

In the gdb trace that you sent, PFrealloc() is called with a NULL
pointer argument.  Though the documentation in include/mem.h says `If
mem is 0, this behaves like PFmalloc', the actual implementation will
fail with the segmentation fault that you see.  Most probably, this
error sneaked in when the Boehm garbage collector was disabled in

Since we have seen some problems with memory management in the recent
past, Jan R already introduced the Boehm garbage collector back into
Pathfinder.  But it will only be enabled in the standalone compiler and
if it was found during the ./configure run.

What remains a bit strange in your gdb trace is that PFrealloc() is
called with a NULL pointer after all.  If I look into the code, the
functions in array.c shouldn't do that.

> [...]
> 0x00002aaaac67e3d2 in memcpy () from /lib64/tls/libc.so.6
> (gdb) where
> #0  0x00002aaaac67e3d2 in memcpy () from /lib64/tls/libc.so.6
> #1  0x00002aaab6546150 in ?? ()
> #2  0x00002aaab4c31c02 in mem_realloc (pa=<value optimized out>, p=0x0,
> n=2048) at mem.c:133
> #3  0x00002aaab4c31c4e in PFrealloc_ (n=<value optimized out>,
> mem=<value optimized out>, file=0x2aaab4d1212c "array.c",
>     func=0x2aaab4d120fc "PFarray_at", line=128) at mem.c:165
> [...]

Wishes from Munich,


Jens Teubner
Technische Universitaet Muenchen, Department of Informatics
D-85748 Garching, Germany
Tel: +49 89 289-17259     Fax: +49 89 289-17263

Portability is for people who cannot write new programs.
                         -- Linus Torvalds, 1992 in comp.os.minix

More information about the developers-list mailing list