Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iXpqF-0000Es-FE for pgsql-bugs@arkaria.postgresql.org; Thu, 21 Nov 2019 17:02:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iXpqE-0000UH-9h for pgsql-bugs@arkaria.postgresql.org; Thu, 21 Nov 2019 17:02:02 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1iXpqE-0000UA-1f for pgsql-bugs@lists.postgresql.org; Thu, 21 Nov 2019 17:02:02 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iXpq6-0004Hn-UD for pgsql-bugs@lists.postgresql.org; Thu, 21 Nov 2019 17:02:01 +0000 Received: by mail-wr1-x444.google.com with SMTP id z7so1909788wrl.13 for ; Thu, 21 Nov 2019 09:01:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=ojgqwuPosFwiYiSRpB7oOuuYHLa71CBkrq109nuXFWs=; b=cR0tpubnbWg9T2EjzPbfD05jpBFF135J5VlFH99xzGCuTyoiCRXSWWkCPXFaYQRNyW /ik84N5fgLQ2jccDjijVuTKLy/MejzhUEQOejaRjdqV8H2eZl9o8DlFXo4XTE2Uk8v4N SxRmZ+DsYKNk6VY+iD8c2vDti8KGBcvkMmP1tsr/0wcxSIOvej/oUSyMVdo1eY1FkzPY 06B6/kKFSHUQWat19PAGeyEYj873HmqXwQvvI1TLof8K82HDwlymXySqhcQ5YWQs+JeL FamocZsLil5nDTGbEnhEllwoQISvyU8iHu29FuOj0C+nf4QVxajVm1YBkfovonW1jJtI Nmog== 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:content-transfer-encoding :in-reply-to; bh=ojgqwuPosFwiYiSRpB7oOuuYHLa71CBkrq109nuXFWs=; b=fuI6KyX2ZweIRs2CiBfwnF1mwl/o/VzRoHiEt6Z+6UFroOErilrE5LmSJSW6xSeAjT BQZdjD+t19kzLfJnwvv5mOh0LZ9nk45c2o0IYK5dgem5JLkfmaFpgJKJPxu1WiPKAo5E yGmR5awTewQY9z7cttdwQjR+lSO28QySMhgrlhy2oCzrcckXkY9fbXxYlADcmCVFb7df nHl9ruCay8NWfdpJBJlXdsbSejua4P+SVoZn/cWc8mEmCKW6n0JvG1fz6cNTHLt2A8Ur a90BGKac5P1C/gKWESd1PidXjAx0IgNjLurYPAvcR50hqoJBm2QdVNNJQHCqcMPSCp6U FvpA== X-Gm-Message-State: APjAAAVzftM23cGXVPDb8/6o0AggNji8i/52jN4ZjuOpjuiMOm0IFG0y Ia6n/cBNn2/T+7BkVtL5IMy0KA== X-Google-Smtp-Source: APXvYqzf9svcNJ5rb7VhOW0PslVh/a+HSkHY/suLJLC1NA2Kz3W8wPtnHit7H0qz8A16/6q6s0iQUA== X-Received: by 2002:adf:94a6:: with SMTP id 35mr11852532wrr.108.1574355714185; Thu, 21 Nov 2019 09:01:54 -0800 (PST) Received: from localhost (static-84-42-175-93.net.upcbroadband.cz. [84.42.175.93]) by smtp.gmail.com with ESMTPSA id y78sm236105wmd.32.2019.11.21.09.01.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Nov 2019 09:01:53 -0800 (PST) Date: Thu, 21 Nov 2019 18:01:52 +0100 From: Tomas Vondra To: =?utf-8?Q?Ond=C5=99ej?= Jirman Cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16129: Segfault in tts_virtual_materialize in logical replication worker Message-ID: <20191121170152.6vi2dly5ade6eyga@development> References: <20191121115326.arierrbeok6we5sv@core.my.home> <20191121125913.4dhhwpbw67vqx37o@core.my.home> <20191121133237.vgxoilemblaqmstu@development> <20191121135523.aybyo7o6yzxxungd@core.my.home> <20191121143503.nkdwgjwb7xjopeuq@development> <20191121150716.szxqukxrtpjpckm3@core.my.home> <20191121152732.hu6y4wzw7nkxpsvk@development> <20191121155707.pqkgjphh65o5fapz@core.my.home> <20191121160906.wpq5u6yh6pxv6hyo@development> <20191121163506.pfe4u3jinrjdodtx@core.my.home> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20191121163506.pfe4u3jinrjdodtx@core.my.home> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, Nov 21, 2019 at 05:35:06PM +0100, Ondřej Jirman wrote: >On Thu, Nov 21, 2019 at 05:09:06PM +0100, Tomas Vondra wrote: > >> On Thu, Nov 21, 2019 at 04:57:07PM +0100, Ondřej Jirman wrote: >> > On Thu, Nov 21, 2019 at 04:27:32PM +0100, Tomas Vondra wrote: >> > > On Thu, Nov 21, 2019 at 04:07:16PM +0100, Ondřej Jirman wrote: >> > > > I've also managed to get valgrind output on the segfaulting process: >> > > > >> > > > https://megous.com/dl/tmp/valgrind-105524-109020.log >> > > > >> > > > Though it probably doesn't show much new. >> > > > >> > > >> > > Is postgres actually compiled with valgrind support? What does pg_config >> > > say? >> > >> > I don't see any valgrind related options in configure --help, I repackaged it >> > just with CFLAGS set to -ggdb -Og. >> > >> >> You need to use -DUSE_VALGRIND or edit pg_config_manual.h. I usually >> just use >> >> CFLAGS="-DRANDOMIZE_ALLOCATED_MEMORY -DUSE_VALGRIND -O0 -ggdb" >> >> which does the trick. Without the USE_VALGRIND defined, we don't include >> the valgrind instrumentation, so I suppose the previous results are bogus. > >Two new valgrind logs, now with -DUSE_VALGRIND: > >https://megous.com/dl/tmp/valgrind-172090.log >https://megous.com/dl/tmp/valgrind-172143.log > Unfortunately, I only get HTTP 403 :-( >A lots of uninitialized 1b accesses around VARATT_IS_EXTERNAL_EXPANDED. > >So slot->tts_values[natt] is probably uninitialized. > >Which is why the backtrace had a weird value there, I guess. > Possibly. Something is clearly wrong. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services