BUG #15193: Postgres Coredumped in AIX - Mailing list pgsql-bugs

From PG Bug reporting form
Subject BUG #15193: Postgres Coredumped in AIX
Date
Msg-id 152604878347.27210.17074682858732120290@wrigleys.postgresql.org
Whole thread Raw
Responses Re: BUG #15193: Postgres Coredumped in AIX
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      15193
Logged by:          Ayappan Perumal
Email address:      ayappap2@in.ibm.com
PostgreSQL version: 10.2
Operating system:   AIX
Description:

We are using Postgres 10.2 version ( compiled with xlc ) in AIX. We are
basically doing database operations via one of our C libraries. The issue
occurred when we invoked AIX command which internally invokes the insert
operation on the database. Segmentation fault occurred in Postgres. So far
we have seen this issue only once. I am copying the DB logs and the stack
trace of the core here.

DB logs 
======
2018-05-09 08:08:32.139 CDT|5af2f2d0.902c2|LOG:  statement: set
client_encoding to 'UTF8'
2018-05-09 08:08:32.140 CDT|5af2f2d0.902c2|LOG:  duration: 1.759 ms
2018-05-09 08:08:32.141 CDT|5af2f2d0.902c2|LOG:  statement: BEGIN;SET
search_path TO vios
2018-05-09 08:08:32.141 CDT|5af2f2d0.902c2|LOG:  duration: 0.049 ms
2018-05-09 08:08:32.141 CDT|5af2f2d0.902c2|LOG:  statement: COMMIT
2018-05-09 08:08:32.141 CDT|5af2f2d0.902c2|LOG:  duration: 0.030 ms
2018-05-09 08:08:32.141 CDT|5af2f2d0.1a03fa|LOG:  duration: 4.535 ms
2018-05-09 08:08:32.141 CDT|5af2f2d0.1a03fa|LOG:  statement: RELEASE
_EXEC_SVP_201f5988;SAVEPOINT _EXEC_SVP_201f5988;INSERT INTO
vios.lu(luid,fileid,capacity,type,report_derived,is_removed,udid)
VALUES(-7166
123177213094678,-7166123177213094678,1176,1,1,0,'7d035e84aeba113a9b7b73ecb1c3c400')
2018-05-09 08:08:32.144 CDT|5af2f2d0.1a03fa|LOG:  duration: 2.760 ms
2018-05-09 08:08:32.145 CDT|5af2f2d0.1a03fa|LOG:  statement: RELEASE
_EXEC_SVP_201f5988;SAVEPOINT _EXEC_SVP_201f5988;INSERT INTO
vios.disk(luid,label)
VALUES(-7166123177213094678,'_EAFA_faithv1_20180509080831')
2018-05-09 08:08:32.145 CDT|5af2f2d0.902c2|LOG:  statement: BEGIN;SELECT
COUNT(*) FROM event
2018-05-09 08:08:32.152 CDT|5af2f2d0.902c2|LOG:  duration: 6.909 ms
2018-05-09 08:08:32.152 CDT|5af2f2d0.902c2|LOG:  statement: SAVEPOINT
_EXEC_SVP_20123888;SELECT sequence_id FROM event ORDER BY id ASC LIMIT 1
2018-05-09 08:08:32.154 CDT|5af2f2d0.902c2|LOG:  duration: 1.631 ms
2018-05-09 08:08:32.154 CDT|5af2f2d0.902c2|LOG:  statement: select
n.nspname, c.relname, a.attname, a.atttypid, t.typname, a.attnum, a.attlen,
a.atttypmod, a.attnotnull, c.relhasrules, c.relkind, c.oid,
pg_get_expr(d.adbin, d.adrelid), case t.typtype when 'd' then t.typbasetype
else 0 end, t.typtypmod, c.relhasoids, attidentity from
(((pg_catalog.pg_class c inner join pg_catalog.pg_namespace n on n.oid =
c.relnamespace and c.oid = 16387) inner join pg_catalog.pg_attribute a on
(not a.attisdropped) and a.attnum > 0 and a.attrelid = c.oid) inner join
pg_catalog.pg_type t on t.oid = a.atttypid) left outer join pg_attrdef d on
a.atthasdef and d.adrelid = a.attrelid and d.adnum = a.attnum order by
n.nspname, c.relname, attnum
2018-05-09 08:08:32.173 CDT|5af2f2d0.902c2|LOG:  duration: 19.043 ms
2018-05-09 08:08:32.174 CDT|5af2f2d0.902c2|LOG:  statement: RELEASE
_EXEC_SVP_20123888;SAVEPOINT _EXEC_SVP_20123888;SELECT sequence_id FROM
event ORDER BY id DESC LIMIT 1
2018-05-09 08:08:32.174 CDT|5af2f2d0.902c2|LOG:  duration: 0.361 ms
2018-05-09 08:08:32.174 CDT|5af2f2d0.902c2|LOG:  statement: RELEASE
_EXEC_SVP_20123888;SAVEPOINT _EXEC_SVP_20123888;SELECT COUNT(*) FROM event
WHERE id >= (SELECT id FROM event WHERE sequence_id = (SELECT MI
N(sequence_id) FROM event where sequence_id >= 5246))
2018-05-09 08:08:32.176 CDT|5af2f2d0.1a03fa|LOG:  duration: 31.495 ms
2018-05-09 08:08:32.176 CDT|5af2f2d0.902c2|LOG:  duration: 1.923 ms
2018-05-09 08:08:32.176 CDT|5af2f2d0.1a03fa|LOG:  statement: COMMIT
2018-05-09 08:08:32.177 CDT|5af2f2d0.902c2|LOG:  statement: RELEASE
_EXEC_SVP_20123888;SAVEPOINT _EXEC_SVP_20123888;SELECT sequence_id,
event_type, object_type, object_udid FROM event WHERE id >= (SELECT id
FROM event WHERE sequence_id = (SELECT MIN(sequence_id) FROM event where
sequence_id >= 5246))
2018-05-09 08:08:32.178 CDT|5af2f2d0.1a03fa|LOG:  duration: 1.310 ms
2018-05-09 08:08:32.178 CDT|5af2f2d0.902c2|LOG:  duration: 1.384 ms
2018-05-09 08:08:32.178 CDT|5af2f2d0.902c2|LOG:  statement: RELEASE
_EXEC_SVP_20123888;SAVEPOINT _EXEC_SVP_20123888;SELECT COUNT(*) FROM
event_attribute WHERE sequence_id = 5246
2018-05-09 08:08:32.203 CDT|5af00961.ce0160|LOG:  server process (PID
590530) was terminated by signal 11
2018-05-09 08:08:32.203 CDT|5af00961.ce0160|DETAIL:  Failed process was
running: RELEASE _EXEC_SVP_20123888;SAVEPOINT _EXEC_SVP_20123888;SELECT
COUNT(*) FROM event_attribute WHERE sequence_id = 5246
2018-05-09 08:08:32.203 CDT|5af00961.ce0160|LOG:  terminating any other
active server processes
2018-05-09 08:08:32.203 CDT|5af2f2d0.1a03fa|WARNING:  terminating connection
because of crash of another server process
2018-05-09 08:08:32.203 CDT|5af2f2d0.1a03fa|DETAIL:  The postmaster has
commanded this server process to roll back the current transaction and exit,
because another server process exited abnormally and possibly corrupted
shared memory.
2018-05-09 08:08:32.203 CDT|5af2f2d0.1a03fa|HINT:  In a moment you should be
able to reconnect to the database and repeat your command.
2018-05-09 08:08:32.203 CDT|5af00961.bb01c6|WARNING:  terminating connection
because of crash of another server process
2018-05-09 08:08:32.203 CDT|5af00961.bb01c6|DETAIL:  The postmaster has
commanded this server process to roll back the current transaction and exit,
because another server process exited abnormally and possibly corrupted
shared memory.

dbx stack trace of the core file
dbx /usr/ios/db/bin/postgres core.590530.09130832
Type 'help' for help.
warning: The core file is not a fullcore. Some info may
not be available.
[using memory image in core.590530.09130832]
reading symbolic information ...warning: no source compiled with -g


Segmentation fault in SHMQueueDelete at 0x100122a94
0x100122a94 (SHMQueueDelete+0x14) f8a40000            std   r5,0x0(r4)
(dbx) t
SHMQueueDelete() at 0x100122a94
CleanUpLock() at 0x100158fa0
LockRelease() at 0x10015eae4
UnlockRelationId() at 0x100158930
relation_close() at 0x100053314
SearchCatCache() at 0x100033cb4
SearchSysCache() at 0x100030d80
examine_simple_variable() at 0x1002394d0
examine_variable() at 0x10023f708
get_restriction_variable() at 0x10023f028
eqsel_internal() at 0x10023b914
eqsel() at 0x100241fd0
OidFunctionCall4Coll() at 0x100015848
restriction_selectivity() at 0x10024c1a8
clause_selectivity() at 0x100254cf4
clauselist_selectivity() at 0x100255408
set_baserel_size_estimates() at 0x1002466dc
set_rel_size() at 0x1005259c0
set_base_rel_sizes@AF148_36() at 0x100526ad4
make_one_rel() at 0x1005265d8
query_planner() at 0x100518818
grouping_planner() at 0x1002800d0
subquery_planner() at 0x100281850
standard_planner() at 0x10028221c
postgres.ProcessInterrupts.pg_plan_query@AF171_45() at 0x100062ab0
pg_plan_queries() at 0x100061310
exec_simple_query() at 0x10005d7b4
PostgresMain() at 0x10005fce8
BackendRun() at 0x1000b98f8
BackendStartup() at 0x1000b8e50
postmaster.BackendStartup.ServerLoop() at 0x1000b961c
PostmasterMain() at 0x1000bdb6c
main() at 0x1000006bc


pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #15080: ecpg on windows doesn't define HAVE_LONG_LONG_INT
Next
From: 007reader@gmail.com
Date:
Subject: Abnormal JSON query performance