Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k586m-0007tS-3L for pgsql-bugs@arkaria.postgresql.org; Mon, 10 Aug 2020 13:45:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k586k-0001hs-0V for pgsql-bugs@arkaria.postgresql.org; Mon, 10 Aug 2020 13:44:58 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k586j-0001hk-QJ for pgsql-bugs@lists.postgresql.org; Mon, 10 Aug 2020 13:44:57 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k586c-0001pJ-TF for pgsql-bugs@postgresql.org; Mon, 10 Aug 2020 13:44:57 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 07ADidwX3119912; Mon, 10 Aug 2020 09:44:41 -0400 From: Tom Lane To: =?gb2312?B?v7XHxca9?= cc: "pgsql-bugs@postgresql.org" , =?gb2312?B?6O+zpMPn?= Subject: Re: a segfault failure of query In-reply-to: <506f7ad1400b4c7d991dd0fa2a2e234e@pingan.com.cn> References: <506f7ad1400b4c7d991dd0fa2a2e234e@pingan.com.cn> Comments: In-reply-to =?gb2312?B?v7XHxca9?= message dated "Mon, 10 Aug 2020 10:14:26 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3119910.1597067079.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 10 Aug 2020 09:44:39 -0400 Message-ID: <3119911.1597067079@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk =3D?gb2312?B?v7XHxca9?=3D writes: > I encountered segmentation fault when executing the sql statement of t= he query. Hm... > #0 pg_detoast_datum_packed (datum=3D0x0) at fmgr.c:1951 > #1 0x0000000000806fa2 in text_to_cstring (t=3D0x0) at varlena.c:185 > #2 0x0000000000831845 in FunctionCall1Coll (flinfo=3D,= collation=3Dcollation@entry=3D0, arg1=3D) at fmgr.c:1123 > #3 0x000000000083293a in OutputFunctionCall (flinfo=3D= , val=3D) at fmgr.c:1755 This isn't terribly helpful. It seems that the query has returned a text datum that's actually a null (zero) pointer, but where that came from is impossible to tell at this very late stage of query execution. > This problem can be temporarily solved after executing the command set= max_parallel_workers_per_gather=3D0. That's pretty interesting, but again, not very useful for localizing the source of the issue. Parallel query invokes a *lot* of code that is not in the non-parallel path. The first thing I'd note is that 11.3 is five minor releases ago (and it'll be six minor releases out of date by the end of the week). So really the *first* thing you ought to do is update to 11.8 to see if this is already fixed. If it turns out it's not fixed, is there any chance of showing us a self-contained test case? regards, tom lane