Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1de80N-0006sO-MI for pgsql-bugs@arkaria.postgresql.org; Sat, 05 Aug 2017 22:57:11 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1de80N-0000aR-96 for pgsql-bugs@arkaria.postgresql.org; Sat, 05 Aug 2017 22:57:11 +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 1de80M-0000YR-FW for pgsql-bugs@postgresql.org; Sat, 05 Aug 2017 22:57:10 +0000 Received: from mail-pf0-x22d.google.com ([2607:f8b0:400e:c00::22d]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1de80H-0007zx-HO for pgsql-bugs@postgresql.org; Sat, 05 Aug 2017 22:57:10 +0000 Received: by mail-pf0-x22d.google.com with SMTP id h68so6586430pfk.0 for ; Sat, 05 Aug 2017 15:57:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=BZt4yXanH2bqLPiVQPlL4r+QeJaqHll8t+M+o/3dpbI=; b=WQhCkr9rXSSnIJfhF4FP/LE8gYi9FtfljLYU7XH7ZFXlFDhjVjE2DkQFKiB0qtmqdy vOV1QMCgoTjQWUdz5WoYgN5GrLsdY8pUG/jFytfFdPk6dRDAU4o8FWw+XOKiwVMOnrBx eKvNOXEf8mIZAKarXmhVfzbP+iA5MiXS3GGmI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=BZt4yXanH2bqLPiVQPlL4r+QeJaqHll8t+M+o/3dpbI=; b=rtzFZebbAzZ/JDh5jpD6UZ5+xhjH0RudGVWnZGGkZjDw86W7A77vNz0+CCaOB6oNbQ uEbCnaW32EmOla3iYJDrIqd/jjc5OGL9CZUGCTgXw5n4T1WTXijt4mdhJHZ5cROWkNo2 cPPCub6h+CdKBWX87F5sG6aSoeYOtsLllsVcdGK2fRYrd9tH3/6Gzbgd19CJ41IIX14E euAZxBJiPlgF8bxL8ZggFo8WsZxPlNm1wGqqKUTkkE+jdisPOT+3AXUk3/nOG6YPeYUk NSlMJR7TpWKpC1zgsFq8eeWCa/iyyAGF3/pfaYCdbfWmc11MfB/LDOI8BiN3bincTrBP e+wA== X-Gm-Message-State: AIVw112nnAyAzNBHwoY/mssv+ab/qFpfObFJhT/JZv317T+xJeGJZrf/ Pqn0X+xL5qqwwDO+oU01dw== X-Received: by 10.84.238.1 with SMTP id u1mr8421456plk.187.1501973822961; Sat, 05 Aug 2017 15:57:02 -0700 (PDT) Received: from rfd.leadboat.com (c-73-158-248-138.hsd1.ca.comcast.net. [73.158.248.138]) by smtp.gmail.com with ESMTPSA id g1sm9597268pfk.92.2017.08.05.15.57.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Aug 2017 15:57:01 -0700 (PDT) Date: Sat, 5 Aug 2017 15:56:59 -0700 From: Noah Misch To: Peter Eisentraut Cc: Daniel Verite , PostgreSQL mailing lists , Peter Geoghegan , Andres Freund , pgsql-hackers@postgresql.org Subject: Re: Crash report for some ICU-52 (debian8) COLLATE and work_mem values Message-ID: <20170805225659.GA3178094@rfd.leadboat.com> References: <71cd77ab-a421-443f-8536-821be9bd15ed@manitou-mail.org> <20170805225510.GA3178002@rfd.leadboat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170805225510.GA3178002@rfd.leadboat.com> User-Agent: Mutt/1.5.24 (2015-08-30) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Adding -hackers. On Sat, Aug 05, 2017 at 03:55:13PM -0700, Noah Misch wrote: > On Thu, Aug 03, 2017 at 11:42:25AM -0700, Peter Geoghegan wrote: > > On Thu, Aug 3, 2017 at 8:49 AM, Daniel Verite wrote: > > > With query #2 it ends up crashing after ~5hours and produces > > > the log in log-valgrind-2.txt.gz with some other entries than > > > case #1, but AFAICS still all about reading uninitialised values > > > in space allocated by datumCopy(). > > > > Right. This part is really interesting to me: > > > > ==48827== Uninitialised value was created by a heap allocation > > ==48827== at 0x4C28C20: malloc (vg_replace_malloc.c:296) > > ==48827== by 0x80B597: AllocSetAlloc (aset.c:771) > > ==48827== by 0x810ADC: palloc (mcxt.c:862) > > ==48827== by 0x72BFEF: datumCopy (datum.c:171) > > ==48827== by 0x81A74C: tuplesort_putdatum (tuplesort.c:1515) > > ==48827== by 0x5E91EB: advance_aggregates (nodeAgg.c:1023) > > > > If you actually go to datum.c:171, you see that that's a codepath for > > pass-by-reference datatypes that lack a varlena header. Text is a > > datatype that has a varlena header, though, so that's clearly wrong. I > > don't know how this actually happened, but working back through the > > relevant tuplesort_begin_datum() caller, initialize_aggregate(), does > > suggest some things. (tuplesort_begin_datum() is where datumTypeLen is > > determined for the entire datum tuplesort.) > > > > I am once again only guessing, but I have to wonder if this is a > > problem in commit b8d7f053. It seems likely that the problem begins > > before tuplesort_begin_datum() is even called, which is the basis of > > this suspicion. If the problem is within tuplesort, then that could > > only be because get_typlenbyval() gives wrong answers, which seems > > very unlikely. > > [Action required within three days. This is a generic notification.] > > The above-described topic is currently a PostgreSQL 10 open item. Peter > (Eisentraut), since you committed the patch believed to have created it, you > own this open item. If some other commit is more relevant or if this does not > belong as a v10 open item, please let us know. Otherwise, please observe the > policy on open item ownership[1] and send a status update within three > calendar days of this message. Include a date for your subsequent status > update. Testers may discover new open items at any time, and I want to plan > to get them all fixed well in advance of shipping v10. Consequently, I will > appreciate your efforts toward speedy resolution. Thanks. > > [1] https://www.postgresql.org/message-id/20170404140717.GA2675809%40tornado.leadboat.com -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs