Re: PQexec hangs, stuck on malloc_consolidate - Mailing list pgsql-novice

From Tom Lane
Subject Re: PQexec hangs, stuck on malloc_consolidate
Date
Msg-id 18585.1073853769@sss.pgh.pa.us
Whole thread Raw
In response to PQexec hangs, stuck on malloc_consolidate  (Tor Gunston <tor@tor.to>)
Responses Re: PQexec hangs, stuck on malloc_consolidate
List pgsql-novice
Tor Gunston <tor@tor.to> writes:
> 4) gdb backtrace shows the process stuck in malloc_consolidate:

> #0  0x42074d44 in malloc_consolidate () from /lib/tls/libc.so.6
> #1  0x420743c9 in _int_malloc () from /lib/tls/libc.so.6
> #2  0x4207378d in malloc () from /lib/tls/libc.so.6

This suggests to me that something has clobbered malloc's internal data
structures.  The most common cause of such an error is writing past the
end of a memory block obtained from malloc; other likely causes are
writing on already-freed memory, and ye ever-popular plain old wild store.

> This seems like a bug in libpq to me, but since this is my first attempt
> at using Postgresql, I'm going to assume that I'm the idiot and post it
> here.

I think it much more likely to be a bug in your surrounding program.
If you can provide a simple test case that reproduces the problem,
though, we can investigate the possibility of a bug in libpq.

            regards, tom lane

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: psql error: could not connect to server
Next
From: George Weaver
Date:
Subject: Re: Get error during initdb