Re: pg15b3: crash in paralell vacuum - Mailing list pgsql-hackers

From Masahiko Sawada
Subject Re: pg15b3: crash in paralell vacuum
Date
Msg-id CAD21AoAjjtoHOsahbKb5Yv_UoPXT_DxP66oG=rKZ0f71rxaa0w@mail.gmail.com
Whole thread Raw
In response to Re: pg15b3: crash in paralell vacuum  (Justin Pryzby <pryzby@telsasoft.com>)
Responses Re: pg15b3: crash in paralell vacuum
Re: pg15b3: crash in paralell vacuum
List pgsql-hackers
On Thu, Aug 18, 2022 at 11:04 PM Justin Pryzby <pryzby@telsasoft.com> wrote:
>
> On Thu, Aug 18, 2022 at 08:34:06AM -0500, Justin Pryzby wrote:
> > Unfortunately, it looks like the RPM packages are compiled with -O2, so this is
> > of limited use.  So I'll be back shortly with more...
>
> #3  0x00000000006874f1 in parallel_vacuum_process_all_indexes (pvs=0x25bdce0, num_index_scans=0,
vacuum=vacuum@entry=false)at vacuumparallel.c:611
 
> 611                     Assert(indstats->status == PARALLEL_INDVAC_STATUS_INITIAL);
>
> (gdb) p *pvs
> $1 = {pcxt = 0x25bc1e0, indrels = 0x25bbf70, nindexes = 8, shared = 0x7fc5184393a0, indstats = 0x7fc5184393e0,
dead_items= 0x7fc5144393a0, buffer_usage = 0x7fc514439280, wal_usage = 0x7fc514439240,
 
>   will_parallel_vacuum = 0x266d818, nindexes_parallel_bulkdel = 5, nindexes_parallel_cleanup = 0,
nindexes_parallel_condcleanup= 5, bstrategy = 0x264f120, relnamespace = 0x0, relname = 0x0, indname = 0x0,
 
>   status = PARALLEL_INDVAC_STATUS_INITIAL}
>
> (gdb) p *indstats
> $2 = {status = 11, parallel_workers_can_process = false, istat_updated = false, istat = {num_pages = 0,
estimated_count= false, num_index_tuples = 0, tuples_removed = 0, pages_newly_deleted = 0, pages_deleted = 1,
 
>     pages_free = 0}}

The status = 11 is invalid value. Probably because indstats was not
initialized to 0 as I mentioned.

Justin, if it's reproducible in your environment, could you please try
it again with the attached patch?

Regards,

--
Masahiko Sawada
EDB:  https://www.enterprisedb.com/

Attachment

pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: pg15b3: crash in paralell vacuum
Next
From: vignesh C
Date:
Subject: Re: Skipping schema changes in publication