Re: BUG #15114: logical decoding Segmentation fault

From: Петър Славов <pet(dot)slavov(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15114: logical decoding Segmentation fault
Date: 2018-03-15 22:55:32
Message-ID: CAC5T6ECKrNntmnDn5w1z7ZOvX5vv5Z7G+UBkiZaOveqEy32scw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Here is the code dump with bt:

Reading symbols from /usr/lib/postgresql/10/bin/postgres...Reading symbols
from
/usr/lib/debug/.build-id/a3/2aff963eb198ec48d1946523ef49379fa49c5e.debug...done.
done.
[New LWP 26112]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `postgres: 10/main: wal sender process lg_replica
ip-10-4-1-11.eu-west-1.compute'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 GetActiveSnapshot () at
/build/postgresql-10-drhiey/postgresql-10-10.3/build/../src/backend/utils/time/snapmgr.c:843
843
/build/postgresql-10-drhiey/postgresql-10-10.3/build/../src/backend/utils/time/snapmgr.c:
No such file or directory.
(gdb) bt
#0 GetActiveSnapshot () at
/build/postgresql-10-drhiey/postgresql-10-10.3/build/../src/backend/utils/time/snapmgr.c:843
#1 0x00005649b753e928 in postquel_start (fcache=0x5649b89b7968,
es=0x5649b89c1288) at
/build/postgresql-10-drhiey/postgresql-10-10.3/build/../src/backend/executor/functions.c:809
#2 fmgr_sql (fcinfo=0x5649b89b5c48) at
/build/postgresql-10-drhiey/postgresql-10-10.3/build/../src/backend/executor/functions.c:1150
#3 0x00005649b7530ae1 in ExecInterpExpr (state=0x5649b89b5b68,
econtext=0x5649b89b6468, isnull=<optimized out>) at
/build/postgresql-10-drhiey/postgresql-10-10.3/build/../src/backend/executor/execExprInterp.c:650
#4 0x00005649b75d9bc7 in ExecEvalExprSwitchContext (isNull=0x7fff8d0a8794
"", econtext=<optimized out>, state=0x5649b89b5b68) at
/build/postgresql-10-drhiey/postgresql-10-10.3/build/../src/include/executor/executor.h:308
#5 evaluate_expr (expr=<optimized out>, result_type=result_type(at)entry=1114,
result_typmod=result_typmod(at)entry=-1,
result_collation=result_collation(at)entry=0) at
/build/postgresql-10-drhiey/postgresql-10-10.3/build/../src/backend/optimizer/util/clauses.c:4739
#6 0x00005649b75dba31 in evaluate_function (context=0x7fff8d0a8b50,
func_tuple=0x7f76e7843548, funcvariadic=0 '\000', args=0x5649b89b2730,
input_collid=0, result_collid=0, result_typmod=-1, result_type=1114,
funcid=16506)
at
/build/postgresql-10-drhiey/postgresql-10-10.3/build/../src/backend/optimizer/util/clauses.c:4296
#7 simplify_function (funcid=16506, result_type=1114, result_typmod=-1,
result_collid=result_collid(at)entry=0, input_collid=input_collid(at)entry=0,
args_p=args_p(at)entry=0x7fff8d0a8930, funcvariadic=0 '\000', process_args=1
'\001', allow_non_const=1 '\001', context=0x7fff8d0a8b50)
at
/build/postgresql-10-drhiey/postgresql-10-10.3/build/../src/backend/optimizer/util/clauses.c:3936
#8 0x00005649b75dc449 in eval_const_expressions_mutator
(node=0x5649b89b2530, context=0x7fff8d0a8b50) at
/build/postgresql-10-drhiey/postgresql-10-10.3/build/../src/backend/optimizer/util/clauses.c:2595
#9 0x00005649b757bc8b in expression_tree_mutator (node=<optimized out>,
mutator=mutator(at)entry=0x5649b75dc210 <eval_const_expressions_mutator>,
context=context(at)entry=0x7fff8d0a8b50) at
/build/postgresql-10-drhiey/postgresql-10-10.3/build/../src/backend/nodes/nodeFuncs.c:2903
#10 0x00005649b75dbfce in simplify_function (funcid=2057, result_type=16,
result_typmod=result_typmod(at)entry=-1, result_collid=0, input_collid=0,
args_p=args_p(at)entry=0x7fff8d0a8b00, funcvariadic=0 '\000', process_args=1
'\001', allow_non_const=1 '\001', context=0x7fff8d0a8b50)
at
/build/postgresql-10-drhiey/postgresql-10-10.3/build/../src/backend/optimizer/util/clauses.c:3927
#11 0x00005649b75dc38b in eval_const_expressions_mutator
(node=node(at)entry=0x5649b89b0888,
context=context(at)entry=0x7fff8d0a8b50) at
/build/postgresql-10-drhiey/postgresql-10-10.3/build/../src/backend/optimizer/util/clauses.c:2643
#12 0x00005649b75ddabf in eval_const_expressions (root=root(at)entry=0x0,
node=node(at)entry=0x5649b89b0888) at
/build/postgresql-10-drhiey/postgresql-10-10.3/build/../src/backend/optimizer/util/clauses.c:2437
#13 0x00005649b777181a in RelationGetIndexPredicate
(relation=relation(at)entry=0x7f76e7841568)
at
/build/postgresql-10-drhiey/postgresql-10-10.3/build/../src/backend/utils/cache/relcache.c:4813
#14 0x00005649b7443d60 in BuildIndexInfo (index=index(at)entry=0x7f76e7841568)
at
/build/postgresql-10-drhiey/postgresql-10-10.3/build/../src/backend/catalog/index.c:1660
#15 0x00005649b7771b90 in RelationGetIndexAttrBitmap
(relation=relation(at)entry=0x7f76e7836638,
attrKind=attrKind(at)entry=INDEX_ATTR_BITMAP_IDENTITY_KEY)
at
/build/postgresql-10-drhiey/postgresql-10-10.3/build/../src/backend/utils/cache/relcache.c:4938
#16 0x00005649b7614368 in logicalrep_write_attrs (rel=0x7f76e7836638,
out=0x5649b88dee38) at
/build/postgresql-10-drhiey/postgresql-10-10.3/build/../src/backend/replication/logical/proto.c:530
#17 logicalrep_write_rel (out=0x5649b88dee38, rel=0x7f76e7836638) at
/build/postgresql-10-drhiey/postgresql-10-10.3/build/../src/backend/replication/logical/proto.c:317
#18 0x00007f76998b5e6f in pgoutput_change (ctx=<optimized out>,
txn=<optimized out>, relation=0x7f76e7836638, change=0x5649b899b1f8) at
/build/postgresql-10-drhiey/postgresql-10-10.3/build/../src/backend/replication/pgoutput/pgoutput.c:324
#19 0x00005649b760fbc9 in change_cb_wrapper (cache=<optimized out>,
txn=<optimized out>, relation=<optimized out>, change=<optimized out>) at
/build/postgresql-10-drhiey/postgresql-10-10.3/build/../src/backend/replication/logical/logical.c:711
#20 0x00005649b761844b in ReorderBufferCommit (rb=0x5649b89848a8,
xid=xid(at)entry=71743261, commit_lsn=commit_lsn(at)entry=463103922872,
end_lsn=end_lsn(at)entry=463103922928,
commit_time=commit_time(at)entry=574385433206439,
origin_id=origin_id(at)entry=0, origin_lsn=0)
at
/build/postgresql-10-drhiey/postgresql-10-10.3/build/../src/backend/replication/logical/reorderbuffer.c:1445
#21 0x00005649b760e012 in DecodeCommit (xid=71743261,
parsed=0x7fff8d0a91e0, buf=<synthetic pointer>, ctx=0x5649b88b0d48) at
/build/postgresql-10-drhiey/postgresql-10-10.3/build/../src/backend/replication/logical/decode.c:611
#22 DecodeXactOp (buf=<synthetic pointer>, ctx=0x5649b88b0d48) at
/build/postgresql-10-drhiey/postgresql-10-10.3/build/../src/backend/replication/logical/decode.c:241
#23 LogicalDecodingProcessRecord (ctx=0x5649b88b0d48, record=<optimized
out>) at
/build/postgresql-10-drhiey/postgresql-10-10.3/build/../src/backend/replication/logical/decode.c:113
#24 0x00005649b761ff19 in XLogSendLogical () at
/build/postgresql-10-drhiey/postgresql-10-10.3/build/../src/backend/replication/walsender.c:2781
#25 0x00005649b7621883 in WalSndLoop (send_data=send_data(at)entry=0x5649b761feb0
<XLogSendLogical>) at
/build/postgresql-10-drhiey/postgresql-10-10.3/build/../src/backend/replication/walsender.c:2149
#26 0x00005649b76224c3 in StartLogicalReplication (cmd=<optimized out>) at
/build/postgresql-10-drhiey/postgresql-10-10.3/build/../src/backend/replication/walsender.c:1102
#27 exec_replication_command (cmd_string=cmd_string(at)entry=0x5649b8966768
"START_REPLICATION SLOT \"rbank_staging\" LOGICAL 0/0 (proto_version '1',
publication_names '\"big_tables\"')")
at
/build/postgresql-10-drhiey/postgresql-10-10.3/build/../src/backend/replication/walsender.c:1539
#28 0x00005649b766ca72 in PostgresMain (argc=<optimized out>,
argv=argv(at)entry=0x5649b88d9990, dbname=0x5649b88d9838 "receiptbank",
username=<optimized out>) at
/build/postgresql-10-drhiey/postgresql-10-10.3/build/../src/backend/tcop/postgres.c:4084
#29 0x00005649b73a60d9 in BackendRun (port=0x5649b88d7000) at
/build/postgresql-10-drhiey/postgresql-10-10.3/build/../src/backend/postmaster/postmaster.c:4405
#30 BackendStartup (port=0x5649b88d7000) at
/build/postgresql-10-drhiey/postgresql-10-10.3/build/../src/backend/postmaster/postmaster.c:4077
#31 ServerLoop () at
/build/postgresql-10-drhiey/postgresql-10-10.3/build/../src/backend/postmaster/postmaster.c:1755
#32 0x00005649b75fc78b in PostmasterMain (argc=5, argv=<optimized out>) at
/build/postgresql-10-drhiey/postgresql-10-10.3/build/../src/backend/postmaster/postmaster.c:1363
#33 0x00005649b73a74d5 in main (argc=5, argv=0x5649b8891850) at
/build/postgresql-10-drhiey/postgresql-10-10.3/build/../src/backend/main/main.c:228
(gdb)

2018-03-15 15:56 GMT+01:00 Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>:

> PG Bug reporting form wrote:
>
> > --- Code dump: ---
> > ------------------
> > Reading symbols from /usr/lib/postgresql/10/bin/postgres...Reading
> symbols
> > from
> > /usr/lib/debug/.build-id/a3/2aff963eb198ec48d1946523ef4937
> 9fa49c5e.debug...done.
> > done.
> > [New LWP 26112]
> > [Thread debugging using libthread_db enabled]
> > Using host libthread_db library "/lib/x86_64-linux-gnu/
> libthread_db.so.1".
> > Core was generated by 'postgres: 10/main: wal sender process lg_replica
> > ip-10-4-1-11.eu-west-1.compute'.
> > Program terminated with signal SIGSEGV, Segmentation fault.
> > #0 GetActiveSnapshot () at
> > /build/postgresql-10-drhiey/postgresql-10-10.3/build/../
> src/backend/utils/time/snapmgr.c:843
> > 843 /build/postgresql-10-drhiey/postgresql-10-10.3/build/../
> src/backend/utils/time/snapmgr.c:
> > No such file or directory.
> > (gdb)
>
> Can you do a "bt" in that gdb and paste the output, please?
>
>
>
> --
> Álvaro Herrera https://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andres Freund 2018-03-16 00:15:44 Re: BUG #15114: logical decoding Segmentation fault
Previous Message Tom Lane 2018-03-15 21:23:46 Re: contrib/start-scripts/freebsd script fails with Ambiguous output redirect.