From: Andreas Seltenreich <seltenreich@gmx.de>
To: Peter Geoghegan <pg@heroku.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Cc: Piotr Stefaniak <postgres@piotr-stefaniak.me>
Subject: Re: [sqlsmith] Failed assertion in joinrels.c
Date: Mon, 03 Aug 2015 08:49:23 +0200
Message-ID: <877fpcx3ws.fsf@credativ.de> (raw)
In-Reply-To: <CAM3SWZTxGBsYzcESc=3jkUx4o0cY2m8+2mG-eH5L2SBcjLgBOw@mail.gmail.com>
References: <87wpxfygg9.fsf@credativ.de>
<CAM3SWZTxGBsYzcESc=3jkUx4o0cY2m8+2mG-eH5L2SBcjLgBOw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Peter Geoghegan writes:
> On Fri, Jul 31, 2015 at 5:56 PM, Andreas Seltenreich <seltenreich@gmx.de> wrote:
>> sqlsmith triggered the following assertion in master (c188204).
>
> Thanks for writing sqlsmith. It seems like a great tool.
>
> I wonder, are you just running the tool with assertions enabled when
> PostgreSQL is built?
Right. I have to admit my testing setup is still more tailored towards
testing sqlsmith than postgres.
> If so, it might make sense to make various problems more readily
> detected. As you may know, Clang has a pretty decent option called
> AddressSanitizer that can detect memory errors as they occur with an
> overhead that is not excessive.
I didn't known this clang feature yet, thanks for pointing it out. I
considered running some instances under valgrind to detect these, but
the performance penalty seemed not worth it.
> One might use the following configure arguments when building
> PostgreSQL to use AddressSanitizer:
>
> ./configure CC=clang CFLAGS='-O1 -g -fsanitize=address
> -fno-omit-frame-pointer -fno-optimize-sibling-calls' --enable-cassert
A quick attempt to sneak these in made my ansible playbooks unhappy due
to "make check" failures and other generated noise. I'll try to have an
instance with the AddressSanitizer active soon though.
> Of course, it remains to be seen if this pays for itself. Apparently
> the tool has about a 2x overhead [1]. I'm really not sure that you'll
> find any more bugs this way, but it's certainly possible that you'll
> find a lot more. Given your success in finding bugs without using
> AddressSanitizer, introducing it may be premature.
Piotr also suggested on IRC to run coverage tests w/ sqlsmith. This
could yield valuable hints in which direction to extend sqlsmith's
grammar.
Thanks,
Andreas
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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-hackers@postgresql.org
Cc: seltenreich@gmx.de, pg@heroku.com, postgres@piotr-stefaniak.me
Subject: Re: [sqlsmith] Failed assertion in joinrels.c
In-Reply-To: <877fpcx3ws.fsf@credativ.de>
References: <87wpxfygg9.fsf@credativ.de> <CAM3SWZTxGBsYzcESc=3jkUx4o0cY2m8+2mG-eH5L2SBcjLgBOw@mail.gmail.com> <877fpcx3ws.fsf@credativ.de>
* 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