pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michal Novotny <michal.novotny@greycortex.com>
To: Andres Freund <andres@anarazel.de>
Cc: Merlin Moncure <mmoncure@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs <pgsql-bugs@postgresql.org>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: [BUGS] Segmentation fault in libpq
Date: Mon, 3 Jul 2017 09:33:31 +0200
Message-ID: <cfa95e37-84c9-3372-290f-f71c4539346c@greycortex.com> (raw)
In-Reply-To: <20170702191222.uk4hokc2iumzeenh@alap3.anarazel.de>
References: <b58db7a6-a80a-8db2-9ef2-5ae0fd3ca545@greycortex.com>
	<CAHyXU0zPsUz5qWDPpzYZ3LYOgDRdiB45RJ91pi32NvcN9xPEWQ@mail.gmail.com>
	<2a0f743f-4d96-30b1-8b5d-86541e8bcb34@greycortex.com>
	<CAHyXU0x29T3QWFDwUT6jvVhdp6dhoJC2B20XR52AR=54Em=Vpw@mail.gmail.com>
	<14445.1498745576@sss.pgh.pa.us>
	<CAHyXU0yjj49MzD5Sei3g4ihL_gzVDxFhJt2Qs9NfgYkaJEw4hA@mail.gmail.com>
	<CACSGxCNfmqBXKoK6MqZvofsrcX0ZpTc-Cx+mCZWxhHL=RzZabw@mail.gmail.com>
	<20170702191222.uk4hokc2iumzeenh@alap3.anarazel.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>



On 07/02/2017 09:12 PM, Andres Freund wrote:
> 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

Well, I've tried but I was unable to locate the issue so I had to 
investigate the code our little further and finally I've been able to 
find the issue.

Thanks again,
Michal


-- 
Michal Novotny
System Development Lead
michal.novotny@greycortex.com

GREYCORTEX s.r.o.
Purkynova 127, 61200 Brno
Czech Republic
www.greycortex.com



-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (11+ messages)  latest in thread

Message-ID: <cfa95e37-84c9-3372-290f-f71c4539346c@greycortex.com>
Permalink:  ../cfa95e37-84c9-3372-290f-f71c4539346c@greycortex.com/
Also on:    postgresql.org/message-id/cfa95e37-84c9-3372-290f-f71c4539346c@greycortex.com

 · 

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-bugs@postgresql.org
  Cc: michal.novotny@greycortex.com, andres@anarazel.de, mmoncure@gmail.com, tgl@sss.pgh.pa.us, pgsql-hackers@postgresql.org
  Subject: Re: [BUGS] Segmentation fault in libpq
  In-Reply-To: <cfa95e37-84c9-3372-290f-f71c4539346c@greycortex.com>
  References: <b58db7a6-a80a-8db2-9ef2-5ae0fd3ca545@greycortex.com> <CAHyXU0zPsUz5qWDPpzYZ3LYOgDRdiB45RJ91pi32NvcN9xPEWQ@mail.gmail.com> <2a0f743f-4d96-30b1-8b5d-86541e8bcb34@greycortex.com> <CAHyXU0x29T3QWFDwUT6jvVhdp6dhoJC2B20XR52AR=54Em=Vpw@mail.gmail.com> <14445.1498745576@sss.pgh.pa.us> <CAHyXU0yjj49MzD5Sei3g4ihL_gzVDxFhJt2Qs9NfgYkaJEw4hA@mail.gmail.com> <CACSGxCNfmqBXKoK6MqZvofsrcX0ZpTc-Cx+mCZWxhHL=RzZabw@mail.gmail.com> <20170702191222.uk4hokc2iumzeenh@alap3.anarazel.de> <cfa95e37-84c9-3372-290f-f71c4539346c@greycortex.com>

* 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