Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YdCS4-00032Z-0G for pgsql-bugs@arkaria.postgresql.org; Wed, 01 Apr 2015 06:48:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YdCS2-0006BQ-5R for pgsql-bugs@arkaria.postgresql.org; Wed, 01 Apr 2015 06:48:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YdCS1-0006BF-6O for pgsql-bugs@postgresql.org; Wed, 01 Apr 2015 06:48:33 +0000 Received: from d.mail.sonic.net ([64.142.111.50]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YdCRw-0008MO-NT for pgsql-bugs@postgresql.org; Wed, 01 Apr 2015 06:48:32 +0000 Received: from engels (184-23-2-96.dsl.dynamic.fusionbroadband.com [184.23.2.96]) (authenticated bits=0) by d.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id t316mMLC007185 (version=TLSv1.2 cipher=DHE-RSA-AES256-SHA256 bits=256 verify=NOT); Tue, 31 Mar 2015 23:48:23 -0700 Date: Tue, 31 Mar 2015 23:48:28 -0700 From: David Gould To: Tom Lane Cc: Vladimir Borodin , pgsql-bugs@postgresql.org Subject: Re: BUG #12918: Segfault in BackendIdGetTransactionIds Message-ID: <20150331234828.5270fd12@engels> In-Reply-To: <27537.1427734801@sss.pgh.pa.us> References: <20150330162247.2492.923@wrigleys.postgresql.org> <17494.1427733227@sss.pgh.pa.us> <27537.1427734801@sss.pgh.pa.us> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.23; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Sonic-CAuth: UmFuZG9tSVbAdjItn8mhiGwAbUGS5S9OkI67zzVKFoGr5OpGQD6L4KmYaAc6bLpIdIacE08504RVpqz/NkziGBrD003tz2RR X-Sonic-ID: C;3i3KFjvY5BGRuqSqki+G8Q== M;ZrAUFzvY5BGRuqSqki+G8Q== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-Pg-Spam-Score: -2.6 (--) 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 Mon, 30 Mar 2015 13:00:01 -0400 Tom Lane wrote: > Vladimir Borodin writes: > > I=E2=80=99ve also tried to revert dd1a3bcc where this function appeared= but couldn=E2=80=99t do it :( If you would be able to make a build without= this commit (if it is easier than fix it in right way), I could install it= on several production hosts to test it. >=20 > Try this. Nice to see a patch, in advance of need ;-) Thanks! We have had a couple segfaults recently but once we enabled core files it stopped happening. Until just now. I can build with the patch, but if a 9.4.2 is immanent it would be nice to know before scheduling an extra round of downtimes. This is apparently from a python trigger calling get_app_name(). I can provide the rest of the stack if it would be useful. Program terminated with signal 11, Segmentation fault. #0 0x000000000066148b in BackendIdGetTransactionIds (backendID=3D, xid=3D0x7f5d56ae1598, xmin=3D0x7f5d56ae159c) at sinvaladt.c:426 426 sinvaladt.c: No such file or directory. in sinvaladt.c Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.149.el6_6.= 5.x86_64 zlib-1.2.3-29.el6.x86_64 (gdb) bt #0 0x000000000066148b in BackendIdGetTransactionIds (backendID=3D, xid=3D0x7f5d56ae1598, xmin=3D0x7f5d56ae159c) at sinvaladt.c:426 #1 0x000000000061f064 in pgstat_read_current_status () at pgstat.c:2871 #2 0x000000000061f0e9 in pgstat_fetch_stat_numbackends () at pgstat.c:2342 #3 0x00000000006ef373 in pg_stat_get_activity (fcinfo=3D0x7fffd2e78f50) at= pgstatfuncs.c:591 #4 0x00000000005977ec in ExecMakeTableFunctionResult (funcexpr=3D0x17fdae0= , econtext=3D0x17fd770, argContext=3D,=20 expectedDesc=3D0x17ffd70, randomAccess=3D0 '\000') at execQual.c:2193 #5 0x00000000005a91f2 in FunctionNext (node=3D0x17fd660) at nodeFunctionsc= an.c:95 #6 0x00000000005982ce in ExecScanFetch (node=3D0x17fd660, accessMtd=3D0x5a= 8f40 , recheckMtd=3D0x5a8870 ) at execScan.c:82 #7 ExecScan (node=3D0x17fd660, accessMtd=3D0x5a8f40 , rechec= kMtd=3D0x5a8870 ) at execScan.c:167 #8 0x00000000005913c8 in ExecProcNode (node=3D0x17fd660) at execProcnode.c= :426 #9 0x000000000058ff32 in ExecutePlan (queryDesc=3D0x17f81f0, direction=3D<= value optimized out>, count=3D1) at execMain.c:1486 #10 standard_ExecutorRun (queryDesc=3D0x17f81f0, direction=3D, count=3D1) at execMain.c:319 #11 0x00007f69a7d3867b in explain_ExecutorRun (queryDesc=3D0x17f81f0, direc= tion=3DForwardScanDirection, count=3D1) at auto_explain.c:243 #12 0x00007f69a7b33965 in pgss_ExecutorRun (queryDesc=3D0x17f81f0, directio= n=3DForwardScanDirection, count=3D1) at pg_stat_statements.c:873 #13 0x000000000059bd6c in postquel_getnext (fcinfo=3D)= at functions.c:853 #14 fmgr_sql (fcinfo=3D) at functions.c:1148 #15 0x0000000000595f85 in ExecMakeFunctionResultNoSets (fcache=3D0x17ed920,= econtext=3D0x17ed730, isNull=3D0x17ee2a8 " ",=20 isDone=3D) at execQual.c:2023 #16 0x0000000000591e53 in ExecTargetList (projInfo=3D,= isDone=3D0x7fffd2e798fc) at execQual.c:5304 #17 ExecProject (projInfo=3D, isDone=3D0x7fffd2e798fc)= at execQual.c:5519 #18 0x00000000005a98fb in ExecResult (node=3D0x17ed620) at nodeResult.c:155 #19 0x0000000000591478 in ExecProcNode (node=3D0x17ed620) at execProcnode.c= :373 #20 0x000000000058ff32 in ExecutePlan (queryDesc=3D0x166c610, direction=3D<= value optimized out>, count=3D0) at execMain.c:1486 #21 standard_ExecutorRun (queryDesc=3D0x166c610, direction=3D, count=3D0) at execMain.c:319 #22 0x00007f69a7d3867b in explain_ExecutorRun (queryDesc=3D0x166c610, direc= tion=3DForwardScanDirection, count=3D0) at auto_explain.c:243 #23 0x00007f69a7b33965 in pgss_ExecutorRun (queryDesc=3D0x166c610, directio= n=3DForwardScanDirection, count=3D0) at pg_stat_statements.c:873 #24 0x00000000005b39d0 in _SPI_pquery (plan=3D0x7fffd2e79d10, paramLI=3D0x0= , snapshot=3D, crosscheck_snapshot=3D0x0,=20 read_only=3D0 '\000', fire_triggers=3D1 '\001', tcount=3D0) at spi.c:23= 72 #25 _SPI_execute_plan (plan=3D0x7fffd2e79d10, paramLI=3D0x0, snapshot=3D, crosscheck_snapshot=3D0x0,=20 read_only=3D0 '\000', fire_triggers=3D1 '\001', tcount=3D0) at spi.c:21= 60 #26 0x00000000005b4076 in SPI_execute (src=3D0x15f6054 "SELECT get_app_name= () AS a", read_only=3D0 '\000', tcount=3D0) at spi.c:386 #27 0x00007f5d5672f702 in PLy_spi_execute_query (query=3D0x15f6054 "SELECT = get_app_name() AS a", limit=3D0) at plpy_spi.c:357 -dg --=20 David Gould 510 282 0869 daveg@sonic.net If simplicity worked, the world would be overrun with insects. --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs