pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Fielding <rob@dsvr.net>
To: pgsql-admin@postgresql.org
Subject: Hang in semop() in 'waiting' backends
Date: Thu, 7 Apr 2005 00:02:02 +0100
Message-ID: <9daeb170ec2df50ae120e6403845e285@dsvr.net> (raw)

Hi,

I'm afraid information is a little sketchy with this one, but I'll 
present to you quickly what's going on as best as I can. Your 
assistance is appreciated:

platform: Linux 2.4.20 #19 SMP RedHat 9 base, PG 7.4.5 (also 7.4.2)
problem: postgres backends waiting forever

strace shows:

semop(19529737, 0xbfffe020, 1

SELECT domain_add ('robf', 'testdomain123456.uk', '212.69.194.46' )  ;\
<hang forever>

domain_add is a very complex function which calls lots of the SELECT 
functions and performs string functions on the input.

I've tried reindexing both domains_pkey and domains_vs_idx indexes 
attached to the domains table with no effect. I've also restarted the 
service several times. This only results as a temporary fix in clearing 
the waiting processes, but not adding domains.

Instead I have suspended service, dumped and recreated the DNS 
database. I have also upgraded to PG 7.4.5 (I know not the latest, but 
this machine doesn't have external access). The dump and restore 
resolved the issue temporarily.

ipcs shows all shared memory use clears when the service is stopped, 
and resumes when restarted.

Individual calls to domain_add() work; multiple calls within a 
transaction block on the first call. The individual calls from a psql 
shell also fail after this. The only fix is to kill the backends which 
are waiting.

This is a production system which has suddenly gone wrong. Last schema 
update was posted to CVS 2005/03/21 which included UPDATE and DELETE 
constraints and foreign key updates; It seems strange updates from 23rd 
of last month would start causing problems now. I will need to talk to 
the developer responsible if any updates haven't been posted to CVS - 
however this is not our practice. Given the hang, could it still be 
described as a bug anyway?

Best regards,

Rob Fielding
Designer Servers
Business Serve plc




view thread (2+ messages)  latest in thread

Message-ID: <9daeb170ec2df50ae120e6403845e285@dsvr.net>
Permalink:  ../9daeb170ec2df50ae120e6403845e285@dsvr.net/
Also on:    postgresql.org/message-id/9daeb170ec2df50ae120e6403845e285@dsvr.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: rob@dsvr.net
  Subject: Re: Hang in semop() in 'waiting' backends
  In-Reply-To: <9daeb170ec2df50ae120e6403845e285@dsvr.net>
  References: <9daeb170ec2df50ae120e6403845e285@dsvr.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox