Re: BUG #17619: AllocSizeIsValid violation in parallel hash join - Mailing list pgsql-bugs

From Peter Geoghegan
Subject Re: BUG #17619: AllocSizeIsValid violation in parallel hash join
Date
Msg-id CAH2-Wz=HEKXguRbmAT4SHmDYGETMzoQskLzSRBYTSFOHiprZiw@mail.gmail.com
Whole thread Raw
In response to Re: BUG #17619: AllocSizeIsValid violation in parallel hash join  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #17619: AllocSizeIsValid violation in parallel hash join
List pgsql-bugs
On Tue, Sep 27, 2022 at 9:44 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Right, the missing piece is the intentional clobber.

That does seem like the best place to start. The attached patch adds
clobbering that works exactly as you'd expect. This approach is
obviously correct. It also doesn't require any reasoning about
Valgrind's treatment of memory mappings for shared memory, which is
quite complicated given the inconsistent rules about who initializes
what memory (if it's leader or workers).

I find that the tests pass with this patch -- so it probably won't
catch the bug that Thomas mentioned via running the tests (at least
not reliably). However, if I revert parallel VACUUM bugfix commit
662ba729 and then run the tests, they fail very reliably, in several
places. That seems like a big improvement.

I believe that Thomas was going to do something like this anyway. I'm
happy to leave it up to him, but I can pursue this separately if that
makes sense.
-- 
Peter Geoghegan

Attachment

pgsql-bugs by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: BUG #17619: AllocSizeIsValid violation in parallel hash join
Next
From: Thomas Munro
Date:
Subject: Re: BUG #17619: AllocSizeIsValid violation in parallel hash join