Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id A2BCF2E003C for ; Tue, 11 Dec 2007 11:20:19 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 14842-07 for ; Tue, 11 Dec 2007 11:20:17 -0400 (AST) Received: from lists.commandprompt.com (host-159.commandprompt.net [207.173.203.159]) by postgresql.org (Postfix) with ESMTP id AF9C22E02CC for ; Tue, 11 Dec 2007 11:20:16 -0400 (AST) Received: from perhan.alvh.no-ip.org (200-126-76-117.bk5-dsl.surnet.cl [200.126.76.117]) (authenticated bits=0) by lists.commandprompt.com (8.13.8/8.13.8) with ESMTP id lBBFKBQq005491 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 11 Dec 2007 07:20:14 -0800 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id D259B47C85; Tue, 11 Dec 2007 12:20:10 -0300 (CLST) Date: Tue, 11 Dec 2007 12:20:10 -0300 From: Alvaro Herrera To: Craig James Cc: pgsql-performance@postgresql.org Subject: Re: libgcc double-free, backend won't die Message-ID: <20071211152010.GE10710@alvh.no-ip.org> References: <7EB0D6C0-48E2-4155-8559-9113D3BD2785@ketema.net> <4728CF7B.7040306@gmail.com> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <475EA9FD.9000706@emolecules.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (lists.commandprompt.com [207.173.203.159]); Tue, 11 Dec 2007 07:20:14 -0800 (PST) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/136 X-Sequence-Number: 27952 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. -- Alvaro Herrera http://www.amazon.com/gp/registry/5ZYLFMCVHXC "When the proper man does nothing (wu-wei), his thought is felt ten thousand miles." (Lao Tse)