Re: IRe: BUG #16792: silent corruption of GIN index resulting in SELECTs returning non-matching rows

From: Pawel Kudzia <kudzia(at)gmail(dot)com>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: Peter Geoghegan <pg(at)bowt(dot)ie>, Alexander Korotkov <aekorotkov(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: IRe: BUG #16792: silent corruption of GIN index resulting in SELECTs returning non-matching rows
Date: 2021-07-21 10:49:57
Message-ID: CAJYBUS-mtUbfFF=-k4SY=pr9z=dKHwRu9hQvWUgFk8_XmQ=jgA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Jul 20, 2021 at 5:34 PM Heikki Linnakangas <hlinnaka(at)iki(dot)fi> wrote:
>
[..]
>
> Looking at the amcheck code for that check, that's a false alarm too.
> amcheck is calculating the size of this array incorrectly, thinking that
> there are more entries on the page than there really are. The entries
> above up to (1749215, 4) are valid, but the rest are not real entries,
> just amcheck's misinterpretation. Unfortunately 'amcheck' stopped at
> that error again.
>
> Sigh. I fixed those issues in amcheck again. And also added some more
> checks on the high keys. At least we're making the amcheck patch better,
> even if we're not any wiser about the original issue...
>
> Pawel: Can you test once again with the attached amcheck version?

patch v4-0001-Amcheck-for-GIN-13stable.patch applied to
postgresql-13_13.3.orig.tar.bz2

since the compressed logs are quite large - i've sent them directly to Heikki.

i've executing "select
gin_index_parent_check('entity_attribute_name_ids_gin');" took
considerably longer this time and it ended with :

[524767.920498] postgres[29716]: segfault at fffffffffffffffe ip
00007f214c20a2d8 sp 00007ffe2a5fd040 error 5 in
amcheck.so[7f214c209000+6000]
[524767.920521] Code: 00 00 41 0f b7 4e 04 41 8b 56 0c 41 8b 76 10 49
89 c1 48 8d 04 40 c1 e1 10 45 0f b7 46 08 48 8d 7c 43 fa 41 0f b7 46
06 09 c1 <0f> b7 47 04 50 0f b7 07 0f b7 7f 02 c1 e0 10 09 f8 50 0f b7
43 04

>
> - Heikki

--
regards,
Pawel Kudzia

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2021-07-21 15:03:51 Re: BUG #17066: Cache lookup failed when null (unknown) is passed as anycompatiblemultirange
Previous Message Alexander Korotkov 2021-07-21 10:25:39 Re: BUG #17066: Cache lookup failed when null (unknown) is passed as anycompatiblemultirange