pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Craig James <craig_james@emolecules.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: libgcc double-free, backend won't die
Date: Tue, 11 Dec 2007 12:28:39 -0300
Message-ID: <20071211152838.GH4708@alvh.no-ip.org> (raw)
In-Reply-To: <475EAB69.9@emolecules.com>
References: <4728FB3E.3070709@shaw.ca>
	<472978BE.9@hagander.net>
	<4729B1E9.2080306@gmail.com>
	<475E4133.5080009@emolecules.com>
	<20071211112128.GB4708@alvh.no-ip.org>
	<475EA754.1090307@emolecules.com>
	<20071211151416.GD10710@alvh.no-ip.org>
	<475EA9FD.9000706@emolecules.com>
	<20071211152010.GE10710@alvh.no-ip.org>
	<475EAB69.9@emolecules.com>

Craig James wrote:
> Alvaro Herrera wrote:
>> Craig James wrote:
>>> Alvaro Herrera wrote:
>>>> Craig James wrote:
>>>>
>>>>> Here is my guess -- and this is just a guess.  My functions use a
>>>>> third-party library which, of necessity, uses malloc/free in the
>>>>> ordinary way.  I suspect that there's a bug in the Postgres palloc()
>>>>> code that's walking over memory that regular malloc() allocates.  The
>>>>> third-party library (OpenBabel) has been tested pretty thoroughly by
>>>>> me an others and has no memory corruption problems.  All malloc's are
>>>>> freed properly.  Does that seem like a possibility?
>>>> Not really.  palloc uses malloc underneath.
>>> But some Postgres code could be walking off the end of a malloc'ed
>>> block, even if palloc() is allocating and deallocating correctly.
>>> Which is why I was hoping to use valgrind to see what's going on.
>>
>> I very much doubt it.  Since you've now shown that OpenBabel is
>> multithreaded, then that's a much more likely cause.
>
> Can you elaborate?  Are multithreaded libraries not allowed to be
> linked to Postgres?

Absolutely not.

-- 
Alvaro Herrera                         http://www.flickr.com/photos/alvherre/
"La gente vulgar solo piensa en pasar el tiempo;
el que tiene talento, en aprovecharlo"



view thread (28+ messages)  latest in thread

Message-ID: <20071211152838.GH4708@alvh.no-ip.org>
Permalink:  ../20071211152838.GH4708@alvh.no-ip.org/
Also on:    postgresql.org/message-id/20071211152838.GH4708@alvh.no-ip.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: alvherre@alvh.no-ip.org, craig_james@emolecules.com
  Subject: Re: libgcc double-free, backend won't die
  In-Reply-To: <20071211152838.GH4708@alvh.no-ip.org>
  References: <4728FB3E.3070709@shaw.ca> <472978BE.9@hagander.net> <4729B1E9.2080306@gmail.com> <475E4133.5080009@emolecules.com> <20071211112128.GB4708@alvh.no-ip.org> <475EA754.1090307@emolecules.com> <20071211151416.GD10710@alvh.no-ip.org> <475EA9FD.9000706@emolecules.com> <20071211152010.GE10710@alvh.no-ip.org> <475EAB69.9@emolecules.com> <20071211152838.GH4708@alvh.no-ip.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox