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 1itZhH-0003nS-PX for pgsql-bugs@arkaria.postgresql.org; Mon, 20 Jan 2020 16:14:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1itZhF-00022v-9q for pgsql-bugs@arkaria.postgresql.org; Mon, 20 Jan 2020 16:14:37 +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 1itZhF-000224-1U for pgsql-bugs@lists.postgresql.org; Mon, 20 Jan 2020 16:14:37 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1itZhA-0008Mz-Db for pgsql-bugs@lists.postgresql.org; Mon, 20 Jan 2020 16:14:36 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 00KGEQTx013590; Mon, 20 Jan 2020 11:14:26 -0500 From: Tom Lane To: julian.schauder@gmx.de cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16219: EvalPlanQualFetchRowMark segfaults on Updates In-reply-to: <16219-578ae955109d9fd2@postgresql.org> References: <16219-578ae955109d9fd2@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Mon, 20 Jan 2020 14:54:34 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <13588.1579536866.1@sss.pgh.pa.us> Date: Mon, 20 Jan 2020 11:14:26 -0500 Message-ID: <13589.1579536866@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk PG Bug reporting form writes: > for a week now (upgrade pg11=>12) we're experiencing a bug that causes > segfaults on a daily basis. > I've yet to reproduce this exact behaviour as the querys do not fail all the > time but rather now-and-then > when run concurrently. ( ~4 Crashes so far ) Not sure if you realize that the EvalPlanQual stuff is only called when there's an uncommitted conflicting update on a target row. So the way I'd try to reproduce something like this is session 1 session 2 begin; issue update query; issue same update query; commit; which should take the race-condition issue out of the equation, since session 2 will certainly be trying to update the same rows that session 1 did but hasn't yet committed. There may be other hard-to-reproduce factors at work, of course. If you can test on a debug build (with --enable-cassert), that'd help remove a few more variables. >> earm = 0x5576c7176258 >> erm = 0x24 > Excerpt shows the pointer 0x24 of erm to be uninitialized'ish. Yeah. If you could do "p *earm" here, that might offer some clues; I'm wondering if that entire struct has gotten trashed (likely because somebody freed it too soon). regards, tom lane