Re: BUG #3245: PANIC: failed to re-find shared loc k ob ject - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #3245: PANIC: failed to re-find shared loc k ob ject
Date
Msg-id 9863.1177273154@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #3245: PANIC: failed to re-find shared loc k ob ject  (Dave Page <dpage@postgresql.org>)
List pgsql-bugs
Dave Page <dpage@postgresql.org> writes:
> Heikki Linnakangas wrote:
>> I think we need to see more debug-information. Is there a debug- and
>> assertion-enabled binary available for Windows?

> Unfortunately no - 95% of the time we've found that Mingw/gdb on windows
> simply doesn't work. That's one of the major reasons why we're working
> on moving to VC++.

> I can build one tomorrow if you want to try for the 5%. What version was
> this?

Having assertions turned on would be useful regardless of debug support.
What I was going to suggest was to add some detail printout to the PANIC
message --- in particular, dump the fields of the problem LOCKTAG, so
we can at least find out *what* lock is being lost.  If you build a
custom copy for Michel, please add this patch (untested but should work):

*** src/backend/storage/lmgr/lock.c.orig    Thu Feb  1 15:09:33 2007
--- src/backend/storage/lmgr/lock.c    Sun Apr 22 16:17:01 2007
***************
*** 2430,2437 ****
                                                  HASH_FIND,
                                                  NULL);
      if (!lock)
!         elog(PANIC, "failed to re-find shared lock object");
!
      /*
       * Re-find the proclock object (ditto).
       */
--- 2430,2443 ----
                                                  HASH_FIND,
                                                  NULL);
      if (!lock)
!         elog(PANIC, "failed to re-find shared lock object: %u %u %u %u %u %u",
!              locktag->locktag_field1,
!              locktag->locktag_field2,
!              locktag->locktag_field3,
!              locktag->locktag_field4,
!              locktag->locktag_type,
!              locktag->locktag_lockmethodid);
! }
      /*
       * Re-find the proclock object (ditto).
       */


            regards, tom lane

pgsql-bugs by date:

Previous
From: Dave Page
Date:
Subject: Re: BUG #3245: PANIC: failed to re-find shared loc k ob ject
Next
From: Heikki Linnakangas
Date:
Subject: Re: BUG #3245: PANIC: failed to re-find shared loc k ob ject