segfault in hot standby for hash indexes

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: segfault in hot standby for hash indexes
Date: 2017-03-21 07:58:07
Message-ID: CAMkU=1w-9Qe=Ff1o6bSaXpNO9wqpo7_9GL8_CVhw4BoVVHasqg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Against an unmodified HEAD (17fa3e8), I got a segfault in the hot standby.

Using the attached files, I start the test case like this:

nice sh do_nocrash_sr.sh >& do_nocrash_sr.err &

And start the replica like:

rm -r /tmp/data2_replica/ ;
psql -p 9876 -c "select pg_create_physical_replication_slot('foo')";
~/pgsql/pure_origin/bin/pg_basebackup -p 9876 -D /tmp/data2_replica -R -S
foo;
~/pgsql/pure_origin/bin/pg_ctl start -D /tmp/data2_replica/ -o "--port=9874"

After less than a minute, the replica fails.

#0 0x00000000004b85fe in hash_xlog_vacuum_get_latestRemovedXid
(record=0x1925418) at hash_xlog.c:1006
1006 iitemid = PageGetItemId(ipage, unused[i]);
(gdb) bt
#0 0x00000000004b85fe in hash_xlog_vacuum_get_latestRemovedXid
(record=0x1925418) at hash_xlog.c:1006
#1 0x00000000004b881f in hash_xlog_vacuum_one_page (record=0x1925418) at
hash_xlog.c:1113
#2 0x00000000004b8bed in hash_redo (record=0x1925418) at hash_xlog.c:1217
#3 0x000000000051a96c in StartupXLOG () at xlog.c:7152
#4 0x0000000000789ffb in StartupProcessMain () at startup.c:216
#5 0x000000000052d617 in AuxiliaryProcessMain (argc=2,
argv=0x7fffe7661500) at bootstrap.c:421
#6 0x00000000007890cf in StartChildProcess (type=StartupProcess) at
postmaster.c:5256
#7 0x000000000078419d in PostmasterMain (argc=4, argv=0x18fc300) at
postmaster.c:1329
#8 0x00000000006cd78e in main (argc=4, argv=0x18fc300) at main.c:228

'unused' is NULL at that point.

Cheers,

Jeff

Attachment Content-Type Size
count.pl application/octet-stream 9.6 KB
do_nocrash_sr.sh application/x-sh 5.0 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Antonin Houska 2017-03-21 08:17:21 Re: Partition-wise aggregation/grouping
Previous Message Haribabu Kommi 2017-03-21 07:46:47 Re: Proposal: GetOldestXminExtend for ignoring arbitrary vacuum flags