pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: icegood1980@gmail.com
Subject: BUG #15627: libpq memory leak
Date: Sun, 10 Feb 2019 16:30:29 +0000
Message-ID: <15627-292cee37a2b87e13@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      15627
Logged by:          ice ice
Email address:      icegood1980@gmail.com
PostgreSQL version: 11.1
Operating system:   Ubuntu 18.04.1 LTS
Description:        

PQisBusy has memory leak with next valgrind stack:

  1: malloc in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so
  2: PQmakeEmptyPGresult in
/opt/src/postgres/src/interfaces/libpq/fe-exec.c:146
  3: getRowDescriptions in
/opt/src/postgres/src/interfaces/libpq/fe-protocol3.c:492
  4: pqParseInput3 in
/opt/src/postgres/src/interfaces/libpq/fe-protocol3.c:293
  5: parseInput in /opt/src/postgres/src/interfaces/libpq/fe-exec.c:1747
  6: PQisBusy in /opt/src/postgres/src/interfaces/libpq/fe-exec.c:1764

The problem is that if PQisBusy doesn't revoke memory for item

/* Status for asynchronous result construction */
	PGresult   *result;			/* result being constructed */

in struct pg_conn



view thread (3+ messages)  latest in thread

Message-ID: <15627-292cee37a2b87e13@postgresql.org>
Permalink:  ../15627-292cee37a2b87e13@postgresql.org/
Also on:    postgresql.org/message-id/15627-292cee37a2b87e13@postgresql.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-bugs@postgresql.org
  Cc: noreply@postgresql.org, icegood1980@gmail.com
  Subject: Re: BUG #15627: libpq memory leak
  In-Reply-To: <15627-292cee37a2b87e13@postgresql.org>
  References: <15627-292cee37a2b87e13@postgresql.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