Re: How to debug a locked backend ?

From: Csaba Nagy <nagy(at)ecircle-ag(dot)com>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: Postgres general mailing list <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to debug a locked backend ?
Date: 2005-11-18 14:55:01
Message-ID: 1132325701.10890.422.camel@coppola.muc.ecircle.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Richar, Martijn,

Thanks for answering, but I had to kill the process in the meantime. I
tried kill -11 in the hope it will produce a core dump at least, but it
either didn't dump core or I don't know where to look for it as I can't
find it.

In any case, this is the second time I experience such a lock-up this
week, so I will definitely need to find out what's going on.

I would exclude hardware failure, as it happened exactly with the same
process, involving exactly the same queries/table and the same failure
symptoms, which is not characteristic for hardware failures (that should
be more random).

So, in order to find out what's going on, what should I do if it happens
again ? Use gdb, and do what ?
Strace is a good idea, I'll do that too if there is a next time.

In any case, this time I have more details of the locks and what was
still running. I'll try to make a test case out of it, maybe I'll catch
the error on a development machine...

Cheers,
Csaba.

On Fri, 2005-11-18 at 14:23, Richard Huxton wrote:
> Csaba Nagy wrote:
> > Hi all,
> >
> > I have right now a locked backend, similar to what I had a few days ago.
> > It won't answer to pg_cancel_backend.
> > Is there a way to diagnoze what it is actually doing ?
> >
> > If you answer, please do it quickly as in max 15 minutes I'll kill -9
>
> Have you tried "strace -p <pid>" to see what calls it's making?
>
> --
> Richard Huxton
> Archonet Ltd

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stefan Balzter 2005-11-18 15:05:40 Re: trigger
Previous Message Richard Huxton 2005-11-18 13:35:44 Re: trigger