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 1mafFe-0002fl-5t for pgsql-bugs@arkaria.postgresql.org; Wed, 13 Oct 2021 14:29:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mafFd-0006IS-3E for pgsql-bugs@arkaria.postgresql.org; Wed, 13 Oct 2021 14:29:01 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mafFc-0006IG-TC for pgsql-bugs@lists.postgresql.org; Wed, 13 Oct 2021 14:29:00 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mafFa-0000oG-PU for pgsql-bugs@lists.postgresql.org; Wed, 13 Oct 2021 14:28:59 +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 19DEStTt649679; Wed, 13 Oct 2021 10:28:55 -0400 From: Tom Lane To: Alvaro Herrera cc: bernddorn@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17227: segmentation fault with jsonb_to_recordset In-reply-to: <202110131359.a6m35hpudkg7@alvherre.pgsql> References: <202110131359.a6m35hpudkg7@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Wed, 13 Oct 2021 10:59:06 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <649677.1634135335.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 13 Oct 2021 10:28:55 -0400 Message-ID: <649678.1634135335@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Alvaro Herrera writes: > Can you provide some sample data that would reproduce the crash? Huh? It's a self-contained example. I'm seeing this back-trace on HEAD: #0 pg_detoast_datum (datum=3D0x40) at fmgr.c:1724 #1 0x00000000008a2c9a in jsonb_path_query_array_internal (fcinfo=3D0x1976= 7d8, = tz=3D) at jsonpath_exec.c:463 #2 0x00000000006ab46e in ExecInterpExpr (state=3D0x19766e8, econtext=3D0x= 1976560, = isnull=3D) at execExprInterp.c:1260 #3 0x00000000006b8c04 in ExecEvalExpr (isNull=3D0x1991688, econtext=3D0x1= 976560, = state=3D) at ../../../src/include/executor/executor.h:3= 20 #4 ExecEvalFuncArgs (fcinfo=3D0x1991660, argList=3D0x198dd78, econtext=3D= 0x1976560) at execSRF.c:846 #5 0x00000000006b8f42 in ExecMakeTableFunctionResult (setexpr=3D0x1976650= , = econtext=3D0x1976560, argContext=3D0x1991540, expectedDesc=3D0x198de28= , = randomAccess=3Dfalse) at execSRF.c:181 #6 0x00000000006cb5ef in FunctionNext (node=3Dnode@entry=3D0x1976348) at nodeFunctionscan.c:94 #7 0x00000000006b9b91 in ExecScanFetch ( recheckMtd=3D0x6cb2e0 , accessMtd=3D0x6cb2f0 , = node=3D0x1976348) at execScan.c:133 #8 ExecScan (node=3D0x1976348, accessMtd=3D0x6cb2f0 , = recheckMtd=3D0x6cb2e0 ) at execScan.c:182 #9 0x00000000006e06d4 in ExecProcNode (node=3D0x1976348) at ../../../src/include/executor/executor.h:257 #10 ExecNestLoop (pstate=3D0x1975060) at nodeNestloop.c:160 regards, tom lane