Re: Valgrind Memcheck support

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Greg Stark <stark(at)mit(dot)edu>
Cc: Noah Misch <noah(at)leadboat(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Valgrind Memcheck support
Date: 2013-09-11 21:36:09
Message-ID: 20130911213609.GH1138556@alap2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2013-09-06 21:55:09 +0100, Greg Stark wrote:
> On Sun, Jun 9, 2013 at 10:25 PM, Noah Misch <noah(at)leadboat(dot)com> wrote:
>
> > - Test recovery, such as by running a streaming replica under Memcheck
> > while
> > the primary runs "make installcheck-world".
> >
>
> In general we need a lot more testing on the recovery code.
>
>
> > - Memcheck has support for detecting leaks. I have not explored that
> > side at
> > all, always passing --leak-check=no. We could add support for freeing
> > "everything" at process exit, thereby making the leak detection
> > meaningful.
> >
>
> I think this is missing the type of leaks we actually care about. The way
> palloc works we can be virtually certain that if we did that we wouldn't
> have any leaks. All it would detect are the random one-off mallocs we know
> very well are there.

Well, we do have a good number of things that allocate stuff in
TopMemoryContext. So it might already catch leaks into that. IIRC we
don't reset that, but even if, that can easily be removed.
Valgrind's detection for "unreachable memory" is nice for that.

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2013-09-11 22:00:54 citext tests "with and without index" had no index
Previous Message Andres Freund 2013-09-11 21:28:47 Re: INSERT...ON DUPLICATE KEY LOCK FOR UPDATE