Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dRkIz-0001dp-Ud for pgsql-bugs@arkaria.postgresql.org; Sun, 02 Jul 2017 19:13:14 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dRkIz-0004qq-EW for pgsql-bugs@arkaria.postgresql.org; Sun, 02 Jul 2017 19:13:13 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dRkIG-0002QN-IZ; Sun, 02 Jul 2017 19:12:28 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dRkID-0000PS-Az; Sun, 02 Jul 2017 19:12:27 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id E30DE20971; Sun, 2 Jul 2017 15:12:23 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute5.internal (MEProxy); Sun, 02 Jul 2017 15:12:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=ruuCPEtBPnflBDx1e1k9RHoxdJoPd2T672PIG17xYnU=; b=gRhn3Sq4 ufyPvlgpJUV38/5K4WUawQC9jYfSL+Qv5YiQLBQ6VdImDK1nTXCdHHajedofrQjY t+sWRtDj5ZdZ5DzdWb971MrGES+2IfRciYFMZ3YVdndp7MLhk/OFirR5p0ANbT17 486RCBsP8yB0xTk+Bua1vSBXAx1u/Ugk0a16D99ncPdfKQQf2/KPHtjp0RTsgz9W GbHusHSGS8IInYKiFolfaSJWHdviBuWjg7TLARYcsNQSe4t5bP+KcZnHmSXNDUQf 4SKk+irPWqHMePahzsVcX9Ym9/URH7E0XCc1frNpnwIzAvux81Pn/oy7CV5WFk82 n1GXtWrPZkFeIA== X-ME-Sender: X-Sasl-enc: i/FZVIe0uAFHPZalOuRQn0i6PRNrQ9TR+FJ/hMBJnVes 1499022743 Received: from intern.anarazel.de (unknown [136.24.76.72]) by mail.messagingengine.com (Postfix) with ESMTPA id A4A497E070; Sun, 2 Jul 2017 15:12:23 -0400 (EDT) Date: Sun, 2 Jul 2017 12:12:22 -0700 From: Andres Freund To: Michal =?iso-8859-1?Q?Novotn=FD?= Cc: Merlin Moncure , Tom Lane , pgsql-bugs , PostgreSQL-development Subject: Re: [HACKERS] Segmentation fault in libpq Message-ID: <20170702191222.uk4hokc2iumzeenh@alap3.anarazel.de> References: <2a0f743f-4d96-30b1-8b5d-86541e8bcb34@greycortex.com> <14445.1498745576@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Hi, On 2017-07-02 20:58:52 +0200, Michal Novotný wrote: > thank you all for your advice. I've been investigating this a little more > and finally it turned out it's not a bug in libpq although I got confused > by going deep as several libpq functions. The bug was really on our side > after trying to use connection pointer after calling PQfinish(). The code > is pretty complex so it took some time to investigate however I would like > to apologize for "blaming" libpq instead of our code. Usually using a tool like valgrind is quite helpful to find issues like that, because it'll show you the call-stack accessing the memory and *also* the call-stack that lead to the memory being freed. - Andres -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs