Re: conn = PQconnectdb(conninfo);

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Kroon <plakroon(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: conn = PQconnectdb(conninfo);
Date: 2015-07-17 22:15:48
Message-ID: 19182.1437171348@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Peter Kroon <plakroon(at)gmail(dot)com> writes:
> Every now and then my program will abort.
> IAnd this is because: conn = PQconnectdb(conninfo);
> The error given:
> *** Error in `./server_prog': malloc(): smallbin double linked list
> corrupted: 0x092c10a0 ***

This looks like malloc() complaining because something has corrupted its
bookkeeping data, which generally means that something previously wrote
past the end of a malloc'd data chunk, or tried to write into an
already-freed chunk. The odds are very high that the bug is in your
program rather than libpq, though, because no such problems have been
found within libpq recently.

valgrind is a fairly useful tool for tracking down such issues.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Amitabh Kant 2015-07-18 09:59:24 Recovering database from crashed HD (bad sectors)
Previous Message Peter Kroon 2015-07-17 21:00:07 conn = PQconnectdb(conninfo);