Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1de7zK-0006qF-FD for pgsql-bugs@arkaria.postgresql.org; Sat, 05 Aug 2017 22:56:06 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1de7zJ-0000XG-Rp for pgsql-bugs@arkaria.postgresql.org; Sat, 05 Aug 2017 22:56:05 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1de7yc-0007gA-40 for pgsql-bugs@postgresql.org; Sat, 05 Aug 2017 22:55:22 +0000 Received: from mail-pf0-x22b.google.com ([2607:f8b0:400e:c00::22b]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1de7yY-0006IT-Ms for pgsql-bugs@postgresql.org; Sat, 05 Aug 2017 22:55:20 +0000 Received: by mail-pf0-x22b.google.com with SMTP id c28so19721843pfe.3 for ; Sat, 05 Aug 2017 15:55:18 -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=jYhgeZCx8OO7+S+3CDlnb9g6yLm2Q6P6qDWAi/XNjws=; b=MfgZTw4jSiMdXxnoyybs/5p8P02CHfx7gMPKax2JUg/ERx1ZNds74HcpQotHVgbWNf 2Uzgiwmj+wWzJ6LoVieqk7Y0qPje+VGfLYI5pf0JscfcbXaBUW1yQhNL+20eRIi0BZGy hxAqUwkjawJGcEmuQTl7hRcpSrWlPz1WzoWFA= 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=jYhgeZCx8OO7+S+3CDlnb9g6yLm2Q6P6qDWAi/XNjws=; b=pNWnJ6SdiTzzG5T+6qoIg1SOkaNa3ALBVkFyPMCNsIEoaq/iBAS9xCyncGdAKqLaHL E0Yr7LjwlEQztELv/PZYRuLbmGvteH09kcsCjO90/Zpn9uMDgQKyoPuL1j+MYe9ZHzbP hxNDAGQGnEj/Aor7fTy9O62f99k9fqKNXE3Sz7KXyfS7Qvt0F4y54IOLWDGHdCuQ70qn x9dvGBfiepmS7qwKqMniHqjlWo1ntRQBZ0PIyC27z/oNBDUK/pevRrUJTjotMltAKuMj O6SQtu9qCWXLn+N4GuR/SeL25fHJxuH/i7U9sSEHgmftLx/GYVPKzVC60XLWA0kZEzqX uCAg== X-Gm-Message-State: AIVw113/HsCbAo0wXxpzyLEgBbZkxvnHtF4wzGqw8P7b0F2xHNWtlCNw KF1DB5P+onUwEyIl X-Received: by 10.98.35.145 with SMTP id q17mr7097615pfj.101.1501973717405; Sat, 05 Aug 2017 15:55:17 -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 i90sm9584849pfi.106.2017.08.05.15.55.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Aug 2017 15:55:16 -0700 (PDT) Date: Sat, 5 Aug 2017 15:55:13 -0700 From: Noah Misch To: Peter Eisentraut Cc: Daniel Verite , PostgreSQL mailing lists , Peter Geoghegan , Andres Freund Subject: Re: Crash report for some ICU-52 (debian8) COLLATE and work_mem values Message-ID: <20170805225510.GA3178002@rfd.leadboat.com> References: <71cd77ab-a421-443f-8536-821be9bd15ed@manitou-mail.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 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