Hello, thank you for reprising this thread.

This issue is technically disucssed in the thread Tom suggested
upthread.

https://www.postgresql.org/message-id/flat/2628.1474272158%40localhost

At Tue, 26 Jun 2018 08:09:18 +0000, "Imai, Yoshikazu" 
<imai.yoshik...@jp.fujitsu.com> wrote in 
<0F97FA9ABBDBE54F91744A9B37151A5116E4DD@g01jpexmbkw24>
> Hi,
> 
> > At 2018-05-15 01:49:41, "Tom Lane" <t...@sss.pgh.pa.us> wrote:
> > >=?GBK?B?19S8ug==?= <zoulx1...@163.com> writes:
> > >> i run test using pg10.0 on my machine, and the program crashed on 
> > >> _bt_getbuf.
> > >> And i found the following code:
> > >> the routine _bt_page_recyclable say maybe the page is all-zero page,
> > >> if so then the code run (BTPageOpaque) PageGetSpecialPointer(page);
> > >> it will be failed because it access invalid memory.
> > >> I don't know whether it is so. Look forward t your reply, thanks.
> > >
> > >This code's clearly broken, as was discussed before:
> > >
> > >https://www.postgresql.org/message-id/flat/2628.1474272158%40localhost
> > >
> > >but nothing was done about it, perhaps partly because we didn't have a
> > >reproducible test case.  Do you have one?
> > >
> > >                   regards, tom lane
> > 
> > Unfortunately, I don't have a complete test case.
> 
> I recently checked about this code and previous discussion and tried to occur 
> a crash.
> I will describe how to occur a crash in the last of this mail, but I don't 
> know whether it is useful because I used gdb to occur a crash, that it is not 
> actually a reproducible test case.
> 
> As was discussed before, this crash happens when recycling an all-zeroes page 
> in an index.
> Referring to below comments in code, an all-zeroes page is created when 
> backend downs in the split process after extending the index's relation to 
> get a new page and before making WAL entries for that.

I'm not sure if there's no other cases to create such pages but
at least your steps does as mentioned in the comment of
_bt_page_recyclable(). And I agree to Amit's diagnosis and Tom's
solution.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center


Reply via email to