Re: BUG #3245: PANIC: failed to re-find shared loc k o b j ect - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #3245: PANIC: failed to re-find shared loc k o b j ect
Date
Msg-id 23704.1177389440@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #3245: PANIC: failed to re-find shared loc k o b j ect  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #3245: PANIC: failed to re-find shared loc k o b j ect
Re: BUG #3245: PANIC: failed to re-find shared lock object
List pgsql-bugs
I wrote:
> Now to start debugging.

It looks to me like the problem is that AtPrepare_Locks invokes
LockTagIsTemp, and that goes and reads various system catalogs, which
can result in new entries in the LOCALLOCK hash table, which might
result in a bucket split in same, which would result in some entries
possibly being scanned twice by the hash_seq_search scan.

Not sure about good fix, except that AtPrepare is probably a really
bad time to be doing fresh catalog searches.

Also, we have a generic issue that making fresh entries in a hashtable
might result in a concurrent hash_seq_search scan visiting existing
entries more than once; that's definitely not something any of the
existing callers are thinking about.

I'm too tired to think about fixes right now, but we've definitely
found a hotbed of actual and potential bugs.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #3245: PANIC: failed to re-find shared loc k o b j ect
Next
From: Marcin Waldowski
Date:
Subject: Re: BUG #3242: FATAL: could not unlock semaphore: error code 298