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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
Cc: "Dorochevsky,Michel" <michel(dot)dorochevsky(at)softcon(dot)de>, pgsql-bugs(at)postgresql(dot)org, Dave Page <dpage(at)postgresql(dot)org>
Subject: Re: BUG #3245: PANIC: failed to re-find shared loc k o b j ect
Date: 2007-04-23 19:47:20
Message-ID: 12597.1177357640@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers pgsql-patches

Heikki Linnakangas <heikki(at)enterprisedb(dot)com> writes:
> Locking the same lock twice is usually handled correctly, I don't
> understand why it fails in this case. I'm thinking that the locallock
> structs somehow get out of sync with the lock structs in shared memory.
> The twophase-records are created from the locallock structs alone, so if
> there's extra entries in the locallocks table for some reason, we'd get
> the symptoms we have.

Hmm. I was just noticing this comment in PostPrepare_Locks:

* We do this separately because we may have multiple locallock entries
* pointing to the same proclock, and we daren't end up with any dangling
* pointers.

I'm not clear at the moment on why such a state would exist, but could
it be related?

> Unless you have a better idea, I'd like to add some more debug-prints to
> AtPrepare_Locks to see what gets written to the state file and why.

Seems like a reasonable thing to pursue.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message William Lawrance 2007-04-23 21:02:04 Re: BUG #3244: problem with PREPARE
Previous Message Heikki Linnakangas 2007-04-23 19:35:08 Re: BUG #3245: PANIC: failed to re-find shared loc k o b j e ct

Browse pgsql-hackers by date

  From Date Subject
Next Message Neil Conway 2007-04-23 20:04:07 Re: RESET command seems pretty disjointed now
Previous Message Heikki Linnakangas 2007-04-23 19:30:44 Re: BUG #3245: PANIC: failed to re-find shared loc k o b j ect

Browse pgsql-patches by date

  From Date Subject
Next Message Heikki Linnakangas 2007-04-23 21:22:04 Re: BUG #3245: PANIC: failed to re-find shared loc k o b j ect
Previous Message Heikki Linnakangas 2007-04-23 19:30:44 Re: BUG #3245: PANIC: failed to re-find shared loc k o b j ect