pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jelte Fennema <postgres@jeltef.nl>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: duspensky@ya.ru
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16160: Minor memory leak in case of starting postgres server with SSL encryption
Date: Tue, 16 Mar 2021 13:36:24 -0400
Message-ID: <3345317.1615916184@sss.pgh.pa.us> (raw)
In-Reply-To: <CAGECzQQv-iQ=-EyouczH_s8M6oyT-ga6TwpY+RN9JZH-17bX7w@mail.gmail.com>
References: <16160-18367e56e9a28264@postgresql.org>
	<20191213063915.GE1942@paquier.xyz>
	<20191214092456.GB70616@paquier.xyz>
	<CAGECzQTucR20CLwb6mw_JLdVST8GqYNqYr1OmAnNS2Byg8r+dg@mail.gmail.com>
	<3255514.1615912277@sss.pgh.pa.us>
	<CAGECzQQv-iQ=-EyouczH_s8M6oyT-ga6TwpY+RN9JZH-17bX7w@mail.gmail.com>

Jelte Fennema <postgres@jeltef.nl> writes:
> I'm pretty sure it was the only cause in this specific case. When running
> postgres with valgrind this was the only block that was repeatedly being
> leaked.

Yeah, after doing some testing locally it seems that the non-error path,
at least, is free of additional problems.  I set up a shell loop to hit
the postmaster with SIGHUP ten times a second.  Looking at v12, an
ssl-enabled postmaster leaks very visibly after a few moments; while
there's no detectable leak in HEAD.  So +1 for back-patching the DH_free
fix.  (Michael, do you want to do the honors?)

> Looking at it again now, I see that if an error occurs when parsing
> ssl_crl_file the root_cert_list is in fact leaked. This was easy to
> reproduce by specifying a bogus path for ssl_crl_file.

Interesting.  While this case doesn't seem likely to pose much of a
practical problem, maybe we should clean it up.  I'd already wondered
what was the point of separating the creation and use of the
root_cert_list by so much --- seems like we could install it
immediately after creation.

			regards, tom lane





view thread (16+ messages)  latest in thread

Message-ID: <3345317.1615916184@sss.pgh.pa.us>
Permalink:  ../3345317.1615916184@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3345317.1615916184@sss.pgh.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, postgres@jeltef.nl, michael@paquier.xyz, duspensky@ya.ru, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #16160: Minor memory leak in case of starting postgres server with SSL encryption
  In-Reply-To: <3345317.1615916184@sss.pgh.pa.us>

* 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