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

From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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 22:15:24
Message-ID: 462D2FFC.2080501@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers pgsql-patches

Tom Lane wrote:
> I wrote:
>> Heikki Linnakangas <heikki(at)enterprisedb(dot)com> writes:
>>> Dave, would you please create a new binary with the attached patch? And
>>> LOCK_DEBUG and assertions and debug enabled.
>
>> Also, it would be worth adding "lockmode" to the set of things printed
>> by the panic message in the patch I sent earlier.
>
> Also: as long as we are building a custom-hacked executable to probe
> into this, let's hack it to not remove the 2PC state file, so we can
> double check what's really in there. I believe what you'd need to
> remove is the RemoveTwoPhaseFile calls at twophase.c line 1583 (where
> it thinks it's "stale") and xact.c line 4223 (where it's replaying a
> XLOG_XACT_COMMIT_PREPARED WAL record).

Yeah, sounds like a good idea.

Patch attached that incorporates all the ideas this far:

1. More verbose PANIC message, including lockmode
2. More debug info in AtPrepare_Locks. I even put a DumpLocks call in
it, that should give us a good picture of what's in the lock structures
at the time of commit
3. Instead of removing twophase-file in recovery, rename it to
*.removed. (it will be ignored by postgresql after that, because it
doesn't follow the normal naming rules of 2PC state files)

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

Attachment Content-Type Size
atprepare-debug-2.patch text/x-diff 2.9 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Daniele Varrazzo 2007-04-23 23:27:05 ILIKE fails with accented letters on utf8 locale
Previous Message Tom Lane 2007-04-23 21:44:34 Re: BUG #3245: PANIC: failed to re-find shared loc k o b j ect

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2007-04-23 22:17:47 Re: [HACKERS] Wild idea: 9.0?
Previous Message Peter Eisentraut 2007-04-23 22:11:29 Re: Better error message for select_common_type()

Browse pgsql-patches by date

  From Date Subject
Next Message Koichi Suzuki 2007-04-24 01:15:15 Re: [HACKERS] Full page writes improvement, code update
Previous Message Josh Berkus 2007-04-23 21:46:45 Re: [HACKERS] Full page writes improvement, code update