Re: I want tips for debugging deadlocks

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Hannu Krosing <hannu(at)tm(dot)ee>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: I want tips for debugging deadlocks
Date: 2000-10-04 15:08:13
Message-ID: 3264.970672093@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hannu Krosing <hannu(at)tm(dot)ee> writes:
> I'm in a situation where I urgently need to debug PostgreSQL 7.0.2
> for deadlocks that it does not notice/timeout

The most likely bet is that you are seeing deadlocks that involve a
buffer spinlock (LockBuffer() in bufmgr.c) --- there's no timeout or
deadlock detection check in that code. I have been suspicious for
some time that there are deadlocks possible there, but haven't had
any luck getting a reproducible example to study. (If you can present
a reproducible way to make the problem happen, please post it!)

> Where can I find info about running several concurrent backends
> under a debugger ?

Just fire up N backends and attach to each one with N instances of gdb.
It's a little confusing but I've done it ...

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Meskes 2000-10-04 15:16:08 yacc guru needed
Previous Message Reimer, Fred 2000-10-04 13:14:29 ld.so error when inserting with a plpgsql trigger function