From: Alexander Lakhin <exclusion@gmail.com>
To: Noah Misch <noah@leadboat.com>
Cc: Nitin Motiani <nitinmotiani@google.com>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@postgresql.org, Tom Lane <tgl@sss.pgh.pa.us>
Cc: Smolkin Grigory <smallkeen@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>
Subject: Re: race condition in pg_class
Date: Mon, 21 Oct 2024 22:00:00 +0300
Message-ID: <6c92f59b-f5bc-e58c-9bdd-d1f21c17c786@gmail.com> (raw)
In-Reply-To: <20240924224352.93.nmisch@google.com>
References: <CAH5HC96yPfrLVQ-srZ65R73t_dBLNM4mCR-RGcT5zNa04DHSxA@mail.gmail.com>
<20240903212329.61.nmisch@google.com>
<CAH5HC96ASNkXyYVEG7pO98qr1WARGTohxGjVpBsu4c3hkM_OcA@mail.gmail.com>
<20240904195720.cf.nmisch@google.com>
<CAH5HC96ZwrjKF-RBijntw9uX2UzUtEKC3A7cxB_Xh8arVuKhKw@mail.gmail.com>
<20240905220434.80.nmisch@google.com>
<CAH5HC974+yieU=uTWPtpY1+irUZAY+5GiGKiXjfKhLzo+jsE+g@mail.gmail.com>
<20240906185531.48.nmisch@google.com>
<CAH5HC94xjj7JvRXD4LHVMgv=qVxuMm0On+2OvrGqeON4U-FTuQ@mail.gmail.com>
<20240919213346.0a.nmisch@google.com>
<20240924224352.93.nmisch@google.com>
Hello Noah,
25.09.2024 01:43, Noah Misch wrote:
> Pushed, but the pushes contained at least one defect:
>
Please look at an anomaly introduced with a07e03fd8.
With the attached modification for intra-grant-inplace.spec, running this
test triggers a Valgrind-detected error for me:
==00:00:00:09.624 319033== Conditional jump or move depends on uninitialised value(s)
==00:00:00:09.624 319033== at 0x25D120: DoesMultiXactIdConflict (heapam.c:7373)
==00:00:00:09.624 319033== by 0x25B45A: heap_inplace_lock (heapam.c:6265)
==00:00:00:09.624 319033== by 0x27D8CB: systable_inplace_update_begin (genam.c:867)
==00:00:00:09.624 319033== by 0x33F717: index_update_stats (index.c:2856)
==00:00:00:09.624 319033== by 0x33FEE2: index_build (index.c:3106)
==00:00:00:09.625 319033== by 0x33C7D3: index_create (index.c:1276)
==00:00:00:09.625 319033== by 0x451000: DefineIndex (indexcmds.c:1216)
==00:00:00:09.625 319033== by 0x48D091: ATExecAddIndex (tablecmds.c:9156)
==00:00:00:09.625 319033== by 0x483F8E: ATExecCmd (tablecmds.c:5302)
==00:00:00:09.625 319033== by 0x483877: ATRewriteCatalogs (tablecmds.c:5186)
==00:00:00:09.625 319033== by 0x482B9A: ATController (tablecmds.c:4741)
==00:00:00:09.625 319033== by 0x4827A1: AlterTable (tablecmds.c:4387)
==00:00:00:09.625 319033==
Perhaps current_is_member in heap_inplace_lock() should be initialized
before the DoesMultiXactIdConflict() call as in other places...
Best regards,
Alexander
Attachments:intra-grant-inplace-mod.patch (text/x-patch, 404B) downloaddiff --git a/src/test/isolation/specs/intra-grant-inplace.spec b/src/test/isolation/specs/intra-grant-inplace.specindex 2992c85b44..3339c9f400 100644--- a/src/test/isolation/specs/intra-grant-inplace.spec+++ b/src/test/isolation/specs/intra-grant-inplace.spec@@ -90,9 +90,9 @@ permutation
# inplace wait NO KEY UPDATE w/ KEY SHARE
permutation
- keyshr5
b3
sfnku3
+ keyshr5
addk2(r3)
r3
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-hackers@postgresql.org
Cc: exclusion@gmail.com, noah@leadboat.com, nitinmotiani@google.com, hlinnaka@iki.fi, robertmhaas@gmail.com, tgl@sss.pgh.pa.us, smallkeen@gmail.com, michael@paquier.xyz
Subject: Re: race condition in pg_class
In-Reply-To: <6c92f59b-f5bc-e58c-9bdd-d1f21c17c786@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