pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Gould <daveg@sonic.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Vladimir Borodin <root@simply.name>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #12918: Segfault in BackendIdGetTransactionIds
Date: Tue, 31 Mar 2015 23:48:28 -0700
Message-ID: <20150331234828.5270fd12@engels> (raw)
In-Reply-To: <27537.1427734801@sss.pgh.pa.us>
References: <20150330162247.2492.923@wrigleys.postgresql.org>
	<17494.1427733227@sss.pgh.pa.us>
	<F209A528-1F4C-4E69-97A5-4E987248AA29@simply.name>
	<27537.1427734801@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On Mon, 30 Mar 2015 13:00:01 -0400
Tom Lane <tgl@sss.pgh.pa.us> wrote:

> Vladimir Borodin <root@simply.name> writes:
> > I’ve also tried to revert dd1a3bcc where this function appeared but couldn’t 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.
> 
> 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=<value optimized out>, xid=0x7f5d56ae1598, xmin=0x7f5d56ae159c)
    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=<value optimized out>, xid=0x7f5d56ae1598, xmin=0x7f5d56ae159c)
    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=0x7fffd2e78f50) at pgstatfuncs.c:591
#4  0x00000000005977ec in ExecMakeTableFunctionResult (funcexpr=0x17fdae0, econtext=0x17fd770, argContext=<value optimized out>, 
    expectedDesc=0x17ffd70, randomAccess=0 '\000') at execQual.c:2193
#5  0x00000000005a91f2 in FunctionNext (node=0x17fd660) at nodeFunctionscan.c:95
#6  0x00000000005982ce in ExecScanFetch (node=0x17fd660, accessMtd=0x5a8f40 <FunctionNext>, recheckMtd=0x5a8870 <FunctionRecheck>)
    at execScan.c:82
#7  ExecScan (node=0x17fd660, accessMtd=0x5a8f40 <FunctionNext>, recheckMtd=0x5a8870 <FunctionRecheck>) at execScan.c:167
#8  0x00000000005913c8 in ExecProcNode (node=0x17fd660) at execProcnode.c:426
#9  0x000000000058ff32 in ExecutePlan (queryDesc=0x17f81f0, direction=<value optimized out>, count=1) at execMain.c:1486
#10 standard_ExecutorRun (queryDesc=0x17f81f0, direction=<value optimized out>, count=1) at execMain.c:319
#11 0x00007f69a7d3867b in explain_ExecutorRun (queryDesc=0x17f81f0, direction=ForwardScanDirection, count=1) at auto_explain.c:243
#12 0x00007f69a7b33965 in pgss_ExecutorRun (queryDesc=0x17f81f0, direction=ForwardScanDirection, count=1)
    at pg_stat_statements.c:873
#13 0x000000000059bd6c in postquel_getnext (fcinfo=<value optimized out>) at functions.c:853
#14 fmgr_sql (fcinfo=<value optimized out>) at functions.c:1148
#15 0x0000000000595f85 in ExecMakeFunctionResultNoSets (fcache=0x17ed920, econtext=0x17ed730, isNull=0x17ee2a8 " ", 
    isDone=<value optimized out>) at execQual.c:2023
#16 0x0000000000591e53 in ExecTargetList (projInfo=<value optimized out>, isDone=0x7fffd2e798fc) at execQual.c:5304
#17 ExecProject (projInfo=<value optimized out>, isDone=0x7fffd2e798fc) at execQual.c:5519
#18 0x00000000005a98fb in ExecResult (node=0x17ed620) at nodeResult.c:155
#19 0x0000000000591478 in ExecProcNode (node=0x17ed620) at execProcnode.c:373
#20 0x000000000058ff32 in ExecutePlan (queryDesc=0x166c610, direction=<value optimized out>, count=0) at execMain.c:1486
#21 standard_ExecutorRun (queryDesc=0x166c610, direction=<value optimized out>, count=0) at execMain.c:319
#22 0x00007f69a7d3867b in explain_ExecutorRun (queryDesc=0x166c610, direction=ForwardScanDirection, count=0) at auto_explain.c:243
#23 0x00007f69a7b33965 in pgss_ExecutorRun (queryDesc=0x166c610, direction=ForwardScanDirection, count=0)
    at pg_stat_statements.c:873
#24 0x00000000005b39d0 in _SPI_pquery (plan=0x7fffd2e79d10, paramLI=0x0, snapshot=<value optimized out>, crosscheck_snapshot=0x0, 
    read_only=0 '\000', fire_triggers=1 '\001', tcount=0) at spi.c:2372
#25 _SPI_execute_plan (plan=0x7fffd2e79d10, paramLI=0x0, snapshot=<value optimized out>, crosscheck_snapshot=0x0, 
    read_only=0 '\000', fire_triggers=1 '\001', tcount=0) at spi.c:2160
#26 0x00000000005b4076 in SPI_execute (src=0x15f6054 "SELECT get_app_name() AS a", read_only=0 '\000', tcount=0) at spi.c:386
#27 0x00007f5d5672f702 in PLy_spi_execute_query (query=0x15f6054 "SELECT get_app_name() AS a", limit=0) at plpy_spi.c:357

-dg

-- 
David Gould              510 282 0869         daveg@sonic.net
If simplicity worked, the world would be overrun with insects.


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (12+ messages)  latest in thread

Message-ID: <20150331234828.5270fd12@engels>
Permalink:  ../20150331234828.5270fd12@engels/
Also on:    postgresql.org/message-id/20150331234828.5270fd12@engels

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: daveg@sonic.net, tgl@sss.pgh.pa.us, root@simply.name
  Subject: Re: BUG #12918: Segfault in BackendIdGetTransactionIds
  In-Reply-To: <20150331234828.5270fd12@engels>
  References: <20150330162247.2492.923@wrigleys.postgresql.org> <17494.1427733227@sss.pgh.pa.us> <F209A528-1F4C-4E69-97A5-4E987248AA29@simply.name> <27537.1427734801@sss.pgh.pa.us> <20150331234828.5270fd12@engels>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox