Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eNEov-0001bP-D3 for pgsql-bugs@arkaria.postgresql.org; Fri, 08 Dec 2017 09:19:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eNEou-0007PA-Sp for pgsql-bugs@arkaria.postgresql.org; Fri, 08 Dec 2017 09:19:48 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eNEou-0007P0-NL for pgsql-bugs@lists.postgresql.org; Fri, 08 Dec 2017 09:19:48 +0000 Received: from dd6214.kasserver.com ([85.13.131.7]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eNEos-0004Ov-1L for pgsql-bugs@postgresql.org; Fri, 08 Dec 2017 09:19:47 +0000 Received: from niheb.land.credativ.lan (fw-front.credativ.com [62.154.226.94]) by dd6214.kasserver.com (Postfix) with ESMTPSA id 1468F1BC062D; Fri, 8 Dec 2017 10:19:45 +0100 (CET) Message-ID: <1512724784.9720.39.camel@oopsware.de> Subject: Re: PostgreSQL crashes with SIGSEGV From: Bernd Helmle To: Peter Geoghegan Cc: pgsql-bugs@postgresql.org Date: Fri, 08 Dec 2017 10:19:44 +0100 In-Reply-To: References: <1512661638.9720.34.camel@oopsware.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.24.6 (3.24.6-1.fc26) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Am Donnerstag, den 07.12.2017, 18:54 -0800 schrieb Peter Geoghegan: > So, as you said, the question that we probably need to answer is: > just > how did grouping sets/nodeAgg.c code end up getting tuple memory > lifetime wrong. One good way to get more information is to rerun > Valgrind, but this time with track origins enabled. I myself run > Valgrind like this when I want to see the origin of memory involved > in > an error. I specify: > > $ valgrind --leak-check=no --gen-suppressions=all --trace- > children=yes > --track-origins=yes --read-var-info=yes > -- > suppressions=/home/pg/postgresql/root/source/src/tools/valgrind.supp > -v postgres --log_line_prefix="%m %p " --log_statement=all > --shared_buffers=64MB 2>&1 | tee postmaster.log > > (Probably the only change that you'll need is to make is to run > Valgrind with an the extra "--track-origins=yes".) > > --track-origins=yes is usually something I use when I already know > that Valgrind will complain, but want more information about the > nature of the problem. That's what i've already did. My usage of valgrind was this: valgrind --leak-check=no --gen-suppressions=all \ --track-origins=yes --suppressions=src/tools/valgrind.supp \ --time-stamp=yes --trace-children=yes postgres