pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: badfilez@gmail.com <badfilez@gmail.com>
To: pgsql-bugs@lists.postgresql.org
Subject: Re: PG17.6 wal apply bug (SIGSEGV)
Date: Mon, 20 Oct 2025 19:34:14 +0300
Message-ID: <bc81dce6-3e38-46ad-92e1-7783560bb9a2@gmail.com> (raw)
In-Reply-To: <d9d1c712-875f-4cef-aeab-e9346cf6a0a3@gmail.com>
References: <d9d1c712-875f-4cef-aeab-e9346cf6a0a3@gmail.com>

backrtace

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000000000057eff2 in _bt_restore_page (page=0x7f6f48fd1000 "", from=0x7f6fe2eccd80 "", len=<optimized out>) at nbtxlog.c:63
63            itemsz = MAXALIGN(itemsz);
(gdb) bt full
#0  0x000000000057eff2 in _bt_restore_page (page=0x7f6f48fd1000 "", from=0x7f6fe2eccd80 "", len=<optimized out>) at nbtxlog.c:63
         itupdata = <optimized out>
         itemsz = 0
         end = 0x7f6fe2ecd8c0 "(\265/\375`\260\005\205\023"
         items = {0x0 <repeats 227 times>, 0x7f6f00000000 "\211\243\362hw\366\371\003\b", 0x7f6fe2eccd80 "" <repeats 180 times>}
         itemsizes = {24 <repeats 33 times>, 0 <repeats 375 times>}
         i = 1318
         nitems = <optimized out>
         __func__ = "_bt_restore_page"
         __errno_location = <optimized out>


On 20/10/2025 13:58, badfilez@gmail.com wrote:
> Hello,
>
> Postgres 17 cluster from official repo on RHEL8 (master and 2 replicas)
>
> on both replicas, I get
>
> 2025-10-18 15:40:50.843 MSK [1448] LOG:  entering standby mode
> 2025-10-18 15:40:50.865 MSK [1448] LOG:  redo starts at 1F35/D08DE298
> 2025-10-18 15:41:14.553 MSK [1381] LOG:  startup process (PID 1448) was terminated by signal 11: Segmentation fault
> 2025-10-18 15:41:14.553 MSK [1381] LOG:  terminating any other active server processes
> 2025-10-18 15:41:14.555 MSK [1381] LOG:  shutting down due to startup process failure
> 2025-10-18 15:41:14.677 MSK [1381] LOG:  database system is shut down
>
> After debugging,
>
> replica recovery creates corrupted index file from wal,
> waldump does not show any wal corruption, no prior io errors in logs
> master has not crashed and working ok, no errors in log
>
> the operation on which segfault happens is (if i stop recovery on previous operation it does not trigger segfault)
>
> rmgr: Btree len (rec/tot): 3758/ 5774, tx: 1711720455, lsn: 1F36/30E3C7B8, prev 1F36/30E3C760, desc: SPLIT_L level: 0, firstrightoff: 140, 
> newitemoff: 140, postingoff: 0, blkref #0: rel 1663/16385/151181595blk 63203FPW, blkref #1: rel 1663/16385/151181595blk 112208, blkref #2: rel 
> 1663/16385/151181595blk 108144FPW
>
> the wal segment containing the instruction attached
>
>

view thread (5+ messages)  latest in thread

Message-ID: <bc81dce6-3e38-46ad-92e1-7783560bb9a2@gmail.com>
Permalink:  ../bc81dce6-3e38-46ad-92e1-7783560bb9a2@gmail.com/
Also on:    postgresql.org/message-id/bc81dce6-3e38-46ad-92e1-7783560bb9a2@gmail.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: badfilez@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: PG17.6 wal apply bug (SIGSEGV)
  In-Reply-To: <bc81dce6-3e38-46ad-92e1-7783560bb9a2@gmail.com>

* 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